Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more-conversation-filters subscription link #6502

Merged
merged 4 commits into from
Apr 12, 2023

Conversation

kidonng
Copy link
Member

@kidonng kidonng commented Apr 12, 2023

Fix #6501

Test URLs

https://github.com/refined-github/refined-github/issues

Screenshot

I took the chance to make some slight visual changes:

image

Because previously when pressing back button you see this:

image

@kidonng kidonng added the bug label Apr 12, 2023
const subscriptionsLink = commentsLink.cloneNode(true);
subscriptionsLink.lastChild!.textContent = 'Everything you subscribed to';
subscriptionsLink.setAttribute('aria-checked', 'false'); // #4589
const subscriptionsLink = select('#filters-select-menu a:last-child')!.cloneNode(true);
Copy link
Member

Choose a reason for hiding this comment

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

Why change it? We have the same cloneNode code to create commentsLink. The error suggests that the only issue was the missing input element, which you're also fixing below

Copy link
Member Author

@kidonng kidonng Apr 12, 2023

Choose a reason for hiding this comment

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

It should be an external link, or it will act like a bogus filter:

Screen.Recording.2023-04-12.at.22.28.32.mov

Copy link
Member

Choose a reason for hiding this comment

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

Love it. Worth a comment though. I'd perhaps even just extract the source link to its own variable to clarify what it's targeting:

const searchSyntaxLink = select()
const subBlahBlah = searchSyntaxLink.clone(true)

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Can be merged after the comment nit

@kidonng kidonng merged commit 184d994 into main Apr 12, 2023
9 checks passed
@kidonng kidonng deleted the more-conversation-filters branch April 12, 2023 16:09
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.

more-conversation-filters: "Subscribed" link broken
2 participants