Skip to content

clean-conversation-filters - Add support for new beta view - #7876

Merged
fregante merged 5 commits into
refined-github:mainfrom
kovsu:fix-#7856-3
Oct 10, 2024
Merged

fregante merged 5 commits into
refined-github:mainfrom
kovsu:fix-#7856-3

Conversation

@kovsu

@kovsu kovsu commented Oct 9, 2024 •

Copy link
Copy Markdown
Member

@kovsu

kovsu commented Oct 9, 2024

Copy link
Copy Markdown
Member Author

It doesn't remove the milestones in the test URL, because it can't find the count dom.

@fregante

fregante commented Oct 9, 2024

Copy link
Copy Markdown
Member

It doesn't remove the milestones in the test URL, because it can't find the count dom.

Indeed it looks like they dropped the counter altogether.

This is a test repo that does have milestones, for reference: https://github.com/tc39/ecma402/issues

@fregante fregante changed the title clean-conversation-filters - Improve clean-conversation-filters - Fix error on new beta view Oct 9, 2024
@fregante fregante added the bug label Oct 9, 2024
(await elementReady('[data-hotkey="m"]'))!.parentElement!.remove();
const milestonesSelectors = [
'#milestones-select-menu', // TODO: Drop in March 2025
'[data-testid="action-bar-item-milestones"]',

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.

We can't remove the milestones here, so there's no need to add this code

Comment on lines +64 to +65
const projectsDropdown = $(projectSelectors, container);
projectsDropdown!.remove();

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.

As a rule, if you use $()!, then you should use expectElement instead

// The new beta view doesn't have the count selector, maybe we should do it like the projects
const milestones = $('[data-selected-links^="repo_milestones"] .Counter');
if (milestones && getCount(milestones) === 0) {
$(milestonesSelectors, container)?.remove();

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.

As mentioned before, this should likely not use ? and therefore I changed it to expectElement

@fregante fregante changed the title clean-conversation-filters - Fix error on new beta view clean-conversation-filters - Add support for new beta view Oct 10, 2024
@fregante
fregante enabled auto-merge (squash) October 10, 2024 11:30
@fregante
fregante merged commit 7237db5 into refined-github:main Oct 10, 2024
@kovsu
kovsu deleted the fix-#7856-3 branch October 10, 2024 15:03
@SunsetTechuila SunsetTechuila mentioned this pull request Feb 2, 2026
1 task done
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.

⚠️ Features broken on new issues (beta)

2 participants