Refined-github: Remove is:open/is:closed issue search query with a click

Created on 29 Nov 2019  Â·  13Comments  Â·  Source: sindresorhus/refined-github


Issuehunt badges

@fregante said:
For the bounty: 1. Use this https://github.com/sindresorhus/refined-github/issues/2574#issuecomment-559944187 2. Remove icons as suggested in https://github.com/sindresorhus/refined-github/issues/2574#issuecomment-564284650 3. Add `is:merged` filter in PRs

To see all issues (open and closed) you need to manually remove is:open/is:closed search query. Maybe add "All" next to "Open", "Closed", with or without counter, to remove this query with a click?

Example URL:
https://github.com/sindresorhus/refined-github/issues




IssueHunt Summary

karlheitmann karlheitmann has been rewarded.

Backers (Total: $15.00)

Submitted pull Requests

- #2745 Add extend-discussion-status-filters feature

Tips

IssueHunt has been backed by the following sponsors. Become a sponsor


Rewarded on Issuehunt enhancement good first issue help wanted

Most helpful comment

On sindresorhus/refined-github/issues, the Open link should be replaced from:

Open button will show all the queries this ways (which I don't felt intuitive), I think adding a all button is much better.

All 13 comments

i also like to remove the is:pr and is:issue and leave the sort:updated-desc:

Bildschirmfoto 2019-11-30 um 01 57 11

the one click link under the search bar reset it to is:pr is:open if i am in PR :(

@muescha commented on Nov 30, 2019, 1:58 AM GMT+1:

i also like to remove the is:pr and is:issue and leave the sort:updated-desc:
the one click link under the search bar reset it to is:pr is:open if i am in PR :(

There is an useful UserScript for that: GitHub Latest.

There is an useful UserScript for that: GitHub Latest

Also https://github.com/sindresorhus/show-all-github-issues or filter

remove this query with a click?

I think we can just replace the selected Open or Closed link:

Screenshot 2019-11-30 at 17 27 47

In this case, the Open links to the same page you're on, which is useless.


On https://github.com/sindresorhus/refined-github/issues, the Open link should be replaced from:

to:

Here's some untested code, probably 80% of the feature:

const currentQuery = new URLSearchParams(location.search).get('q') ?? select('#js-issues-search').value;
for (const link of select.all('open, close')) {
    const linkSearchParams = new URLSearchParams(link.search);
    const linkQuery = linkSearchParams.get('q');
    if (linkQuery === currentQuery) {
        linkSearchParams.set('q', linkQuery.replace(/is:open|is:closed/, '').trim())
        link.search = String(linkSearchParams);
        return; // The next link won't match this condition for sure
    }
}

On sindresorhus/refined-github/issues, the Open link should be replaced from:

Open button will show all the queries this ways (which I don't felt intuitive), I think adding a all button is much better.

  1. Open https://github.com/sindresorhus/refined-github/issues/created_by/fregante
  2. Open the Author filter
  3. Click fregante

What happens? The author:fregante filter is removed.

This is the same behavior I'm suggesting here: clicking Open (or Closed) will _remove_ is:open (or is:closed)

Open/Closed are filters after all and all the filters in that list act exactly the same way: clicking a selected filter removes it.

That sounds good, but the downside of this approach is that it is silent. You need to read changelog or stumble on this change by accident to know that now it's working.

That sounds good, but the downside of this approach is that it is silent. You need to read changelog or stumble on this change by accident to know that now it's working.

We have a lot of features like that. This specific feature can be replicated without buttons (i.e. just select and delete those 7 characters from the query) so it would make even more sense as "hidden" shortcut.

Adding a button for every feature (ours or GitHub’s) will just create a cluttered site.

clicking Open (or Closed) will _remove_ is:open (or is:closed)

If this is implemented, I would suggest to alter the closed icon.
If you select an author, label or any other dropdown, it is checked with an ✔ (check).
Currently, the closed status has that same ✔ (check) icon. Which confuses me; is the closed status now checked or not?!
Maybe just removing both icons, and prepending the ✔ (check) icon when it is selected.

Interesting point, I wouldn't mind removing the icons altogether simply to reduce noise and add space for a possible is:merged toggle in the future (open / closed / merged)

@fregante has funded $15.00 to this issue.


i would suggest to have:

  • 1,353 All | 80 Open | 1,273 Closed
    or
  • 80 Open | 1,273 Closed | 1,353 All

@sindresorhus has rewarded $13.50 to @karlheitmann. See it on IssueHunt

  • :moneybag: Total deposit: $15.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $1.50
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sompylasar picture sompylasar  Â·  3Comments

Celthi picture Celthi  Â·  3Comments

durka picture durka  Â·  3Comments

mareksuscak picture mareksuscak  Â·  3Comments

sindresorhus picture sindresorhus  Â·  3Comments