Skip to content

notifications-ui - Hide dropdowns when empty - #10152

Merged
fregante merged 1 commit into
mainfrom
noti-ui
Sep 30, 2026
Merged

fregante merged 1 commit into
mainfrom
noti-ui

Conversation


// Grouping is only available on the Inbox tab
if (!new URLSearchParams(location.search).get('query')) {
observe('.notification-group-by', replaceDropdown, {signal});

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 optimization was unnecessary, the selector is lightweight enough not to worry about it

Comment on lines +14 to +16
// Acceptable race condition. IF we can tell the view is empty in time, just remove the dropdowns, no point in altering them.
function isEmptyView(): boolean {
return elementExists('.blankslate-container');

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 point in showing dropdowns that do nothing, so we hide them instead when there are no notifications.

@fregante fregante added the bug label Sep 30, 2026
@fregante
fregante merged commit 90f7cb4 into main Sep 30, 2026
21 checks passed
@fregante
fregante deleted the noti-ui branch September 30, 2026 07:07
fregante added a commit that referenced this pull request Sep 30, 2026
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.

notifications-ui doesn't replace the grouping button in is:unread

1 participant