Skip to content

Remove is:open/is:closed issue search query with a click #2574

Closed

Description

@mikhaelkh

Issuehunt badges

@fregante said:
For the bounty:
  1. Use this Remove is:open/is:closed issue search query with a click #2574 (comment)
  2. Remove icons as suggested in Remove is:open/is:closed issue search query with a click #2574 (comment)
  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


Tips


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

Activity

  1. muescha commented on Nov 30, 2019

    @muescha
    Contributor

    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 :(

  2. jerone commented on Nov 30, 2019

    @jerone
    Contributor

    @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.

  3. fregante commented on Nov 30, 2019

    @fregante
    Member
  4. added
    small
    and removed on Nov 30, 2019
  5. fregante commented on Nov 30, 2019

    @fregante
    Member

    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
    	}
    }
  6. rahgurung commented on Dec 10, 2019

    @rahgurung
    Contributor

    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.

  7. fregante commented on Dec 10, 2019

    @fregante
    Member
    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.

  8. mikhaelkh commented on Dec 10, 2019

    @mikhaelkh
    Author

    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.

  9. fregante commented on Dec 10, 2019

    @fregante
    Member

    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.

  10. jerone commented on Dec 10, 2019

    @jerone
    Contributor

    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.

  11. fregante commented on Dec 11, 2019

    @fregante
    Member

    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)

  12. issuehunt-oss commented on Jan 22, 2020

    @issuehunt-oss

    @fregante has funded $15.00 to this issue.


  13. added
    💵 Funded on Issuehunt
    on Jan 22, 2020
  14. muescha commented on Jan 30, 2020

    @muescha
    Contributor

    i would suggest to have:

    • 1,353 All | 80 Open | 1,273 Closed
      or
    • 80 Open | 1,273 Closed | 1,353 All
  15. issuehunt-oss commented on Mar 31, 2020

    @issuehunt-oss

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

    • 💰 Total deposit: $15.00
    • 🎉 Repository reward(0%): $0.00
    • 🔧 Service fee(10%): $1.50
  16. added and removed
    💵 Funded on Issuehunt
    on Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedenhancementsmall

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions