Skip to content

Added time durations for DND tooltip. Fixes #561#1502

Open
Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Paperyduke6:update-dnd-timer
Open

Added time durations for DND tooltip. Fixes #561#1502
Paperyduke6 wants to merge 1 commit intozulip:mainfrom
Paperyduke6:update-dnd-timer

Conversation

@Paperyduke6
Copy link
Copy Markdown

Fixes #561
This PR picks up the work from #1419 and addresses the outstanding issues to bring it to a mergeable state.
Changes from #1419:

Moved checkDndExpirationOnStartup inside the dom-ready handler, the previous implementation called it before the renderer was ready, causing the IPC message to silently fail on startup
Moved the mouseleave listener outside the $dndButton click handler, previously a new listener was registered on every click, requiring multiple clicks to close the dropdown after repeated use
Fixed a config leak where cancelling "Until I resume" DND would leave dndExpiration persisted in the config indefinitely — removeConfigItem now always runs when DND is turned off regardless of whether a timeout exists
Added event.stopPropagation() to dropdown item click handlers to prevent clicks bubbling up to the $dndButton handler and re-toggling the dropdown immediately
Updated CSS to .dnd-dropdown and .dnd-dropdown-item classes rather than bare div selectors

Tested on: Windows

Screen Capture

DND.tooltip.update.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a feature to configure DND mode

2 participants