The issue has been closed
<!--
Thanks for reporting a bug! â›°
1. Make sure the bug is caused by Refined GitHub. Try disabling the extension first.
2. Include a full URL where the bug appears.
3. Include a screenshot/gif
Issues without a URL/screenshot will be closed
-->
When clicking on the Merged
filter in the head of the PR list (same for sindresorhus/refined-github), the Open
and Closed
filters are gone and it requires an additional step to go back to see only open ones. The only option given is to click on Total
and get a mixed view which is rarely useful/wanted.
I think there is an issue with the count for Total
(suggests all PR's) as well, looks more like the number of all merged PR's.
Running version 20.11.26 with FF 83.0 on Windows 10.
Screenshots
Open
selected

Closed
selected

Merged
selected

What should be shown when clicking on Merged
:
<kbd>10 Open</kbd> <kbd>1699 Closed</kbd> <kbd>✓ 1472 Merged</kbd>

This is a GitHub bug unrelated to Refined GitHub. I wonder if we should recreate the buttons (without counts)
posted by fregante over 4 years ago
posted by fregante over 4 years ago 
This is a GitHub bug unrelated to Refined GitHub. I wonder if we should recreate the buttons (without counts)
@fregante
I'd like to make an idea/suggestion for recreating the buttons with counts:
to temporarily store <sup>(via localStorage or the storage API)</sup> the outerHTML of the Open and Close buttons just before clicking Merged
,
and after clicking Merged to prepend
the stored outerHTML before the Merged button, i.e. to its ParentNode?
What do you think?
<details>
<summary>e.g. in this repo to store:</summary>
<a href="https://github.com/sindresorhus/refined-github/pulls?q=is%3Apr+sort%3Aupdated-desc" class="btn-link selected" data-ga-click="Pull Requests, Table state, Open"><svg aria-hidden="true" role="img" class="octicon octicon-check" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" style="display: inline-block; user-select: none; vertical-align: text-bottom;"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
4 Open
</a>
<a href="https://github.com/sindresorhus/refined-github/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Aclosed" class="btn-link " data-ga-click="Pull Requests, Table state, Closed">
1,896 Closed
</a>
</details>
posted by darkred about 4 years ago
store the outerHTML of the Open and Close buttons just before clicking Merged
,
That doesn't scale, i.e. when the user changes the query the counts are lost and it looks more of a bug.
API calls don't seem to be worth it in this case.
posted by fregante about 4 years ago