Skip to content

notifications-ui - Warn against "oldest first" sort - #9718

Merged
fregante merged 3 commits into
mainfrom
better-controls
Jun 13, 2026
Merged

fregante merged 3 commits into
mainfrom
better-controls

Conversation

@fregante

@fregante fregante commented Jun 8, 2026

Copy link
Copy Markdown
Member

Test URLs

https://github.com/notifications

Screenshot

Before After
Screenshot 3 Screenshot 4 Screenshot 2Screenshot 1

the other benefit is that on mobile it's also shorter vertically

Before After
Screenshot 6 Screenshot 5

@fregante fregante changed the title notifications-ui warn of oldest notifications-ui - Warn against oldest sort Jun 8, 2026
@fregante fregante changed the title notifications-ui - Warn against oldest sort notifications-ui - Warn against "oldest first" sort Jun 8, 2026
}

function init(): void {
for (const dropdown of $$(['.notification-sort-by', '.notification-group-by'])) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not sure why the observer was not used here. If we have issues on slow connections we should just implement element-ready's waitForChildren logic

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure why the observer was not used here

To avoid this:

#9368 (comment)

9a12ffd (#9368)

This issue is unrelated to slow connections

@fregante fregante Jun 13, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is bad and I'm not sure if anything can be done:

chrome_2jOU2eOr8Y

I don't see anything worse than all other features in Refined GitHub and on slower connections using awaitDomReady will actually make it worse, in fact I see that all the time on 5.24 already, with notifications-ui kicking in way too late on every load:

ScreenRecording_06-13-2026.13-48-49_1.mov

Will drop the awaitDomReady in the followup PR because I forgot here

label.replaceChildren(
<span className='fgColor-severe'>Oldest first</span>,
<SortAscIcon className='fgColor-severe' />,
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Not bad not great

Image Image

{buttons.map(button => transform(button))}
</ul>
</segmented-control>
</segmented-control>,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No changes here other than just extracting this callback

}
.notification-group-by {
order: 6;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Image Image

dropdown.classList.add('d-inline-block', 'width-auto');
function compactDropdown(dropdown: Element): void {
dropdown.classList.replace('width-full', 'width-auto');
dropdown.classList.replace('ml-0', 'ml-auto');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This moves the sort/group to the right:

Image

but it has the side effect that on phones it causes a bad wrap with the "oldest first" state. Given the rarity of this situation, I'm ok with its look.

Image

@fregante
fregante merged commit 1a124cf into main Jun 13, 2026
13 checks passed
@fregante
fregante deleted the better-controls branch June 13, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

notifications-ui - highlight "oldest" as "bad" option

2 participants