Skip to content

Fix conversation-filters showing multiple checked marks - #5078

Merged
cheap-glitch merged 1 commit into
mainfrom
fix-conversation-filters
Nov 23, 2021
Merged

cheap-glitch merged 1 commit into
mainfrom
fix-conversation-filters

Conversation

@cheap-glitch

Copy link
Copy Markdown
Contributor

Fixes #4589

Test URLs

// https://github.com/refined-github/refined-github/issues?q=is%3Aopen+mentions%3A%40me

Screenshot

image

commentsLink.lastChild!.textContent = 'Everything commented by you';
commentsLink.removeAttribute('target');
new SearchQuery(commentsLink).set('is:open commenter:@me');
commentsLink.setAttribute('aria-checked', String(commentsLink.href === location.href)); // #4589

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allow marking the filter as selected, just like the native ones.

image

It follows the behavior of the native filters, that are only shown selected when the current search query matches exactly with the one they represent.

// Add "Everything you subscribed to" link
const subscriptionsLink = commentsLink.cloneNode(true);
subscriptionsLink.lastChild!.textContent = 'Everything you subscribed to';
subscriptionsLink.setAttribute('aria-checked', 'false'); // #4589

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never want this to be selected since it's just a link to another page.

@cheap-glitch cheap-glitch changed the title conversation-filters shows the wrong "current filter" checkbox Fix: conversation-filters shows the wrong "current filter" checkbox Nov 16, 2021
@cheap-glitch

This comment has been minimized.

@kidonng

This comment has been minimized.

@fregante

This comment has been minimized.

@fregante

This comment has been minimized.

@cheap-glitch

Copy link
Copy Markdown
Contributor Author

Opened #5090 to fix the issues with sort-conversations-by-update-time.

@fregante fregante left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested but TMNT

@cheap-glitch cheap-glitch changed the title Fix: conversation-filters shows the wrong "current filter" checkbox Fix conversation-filters showing multiple checked marks Nov 23, 2021
@cheap-glitch
cheap-glitch merged commit 047a6c4 into main Nov 23, 2021
@cheap-glitch
cheap-glitch deleted the fix-conversation-filters branch November 23, 2021 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

conversation-filters shows the wrong "current filter" checkbox

3 participants