Skip to content

Improve positioning of open-all-notifications - #5707

Merged
fregante merged 8 commits into
refined-github:mainfrom
FloEdelmann:wrap-notification-header
Jun 22, 2022
Merged

fregante merged 8 commits into
refined-github:mainfrom
FloEdelmann:wrap-notification-header

Conversation

@FloEdelmann

@FloEdelmann FloEdelmann commented Jun 19, 2022 •

Copy link
Copy Markdown
Member

Resolves #5705. Tested in Firefox and Chromium.

Test URLs

https://github.com/notifications

Screenshots before

grafik

grafik

grafik

Screenshots after

grafik

grafik

grafik

grafik

grafik

grafik

@cheap-glitch cheap-glitch left a comment

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 a huge fan of that wrapping strategy 🤔

How about breaking the header into two rows as soon as there's not enough space, one with the checkbox and the "Select" dropdown, one the with the "action buttons" ("Done", "Open all", etc.)?

@fregante

fregante commented Jun 20, 2022 •

Copy link
Copy Markdown
Member

@cheap-glitch I like that idea but we should change the Open button position first:

  • “open unread” should stay aligned right
  • “open selected” should be aligned left and simply labeled “Open”

The wrapping you’re suggesting should probably be part of select-notifications if possible, I can look into that.

@FloEdelmann can you try moving the Open button in this PR? It looks like the change might be tricky, by looking at the code (there’s a bit of variety in the UI)

@FloEdelmann

Copy link
Copy Markdown
Member Author

More screenshots:

grafik
grafik
grafik

Also works when grouped by repository now.

Comment thread source/refined-github.css Resolved
Comment on lines +88 to +90
appendBefore(
notificationHeaderSelector + ' .js-notifications-mark-selected-actions',
'details',

@FloEdelmann FloEdelmann Jun 22, 2022 •

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.

I've used appendBefore to avoid race conditions once #5704 is implemented and the details element might not exist anymore.

grafik

@fregante fregante changed the title Allow notification header wrapping Improve positioning of open-all-notifications Jun 22, 2022
@fregante
fregante merged commit dbcf997 into refined-github:main Jun 22, 2022
@fregante

Copy link
Copy Markdown
Member

EGGCELLENT 🥚

@FloEdelmann
FloEdelmann deleted the wrap-notification-header branch June 22, 2022 09:00
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.

open-all-notifications and select-notifications causes overflow on mobile

3 participants