Skip to content

Active-state tooltip for Clone Formatting toolitem#15174

Merged
pedropintosilva merged 1 commit intomainfrom
private/darshan/clone-format-tooltip-animation
Mar 30, 2026
Merged

Active-state tooltip for Clone Formatting toolitem#15174
pedropintosilva merged 1 commit intomainfrom
private/darshan/clone-format-tooltip-animation

Conversation

@Darshan-upadhyay1110
Copy link
Copy Markdown
Contributor

Toolitem definitions can now declare activeTooltip and activeDoubleClickTooltip properties to show context-sensitive tooltips when their command state changes. On double-click activation, the button also plays a shake animation to draw the user's attention.

The tooltip and animation logic lives in UIManager.showAttention(), replacing the inline implementation that was previously duplicated in Map.Keyboard.js for the view-mode dropdown.

In JSDialogBuilder._toolitemHandler, the existing updateFunction now tracks activation via _wasActiveTooltip and _activatedByDoubleClick on the DOM element, so tooltips only appear on real user interactions and not during initial document load.

Applied to Clone Formatting as the first consumer:

  • single click: "Clone Formatting is active (click again or press Escape to exit)"
  • double click: "Clone Formatting is active (press Escape to exit)" with attention animation
  • deactivation: reverts to the original tooltip
Screencast.from.2026-03-23.23-28-43.webm

Change-Id: I30dea9dfd59594f1ea81477afdffa031b15103a5

  • Resolves: #
  • Target version: main

Summary

TODO

  • ...

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the private/darshan/clone-format-tooltip-animation branch from 6ac9693 to f46deee Compare March 24, 2026 06:00
@Darshan-upadhyay1110 Darshan-upadhyay1110 marked this pull request as ready for review March 24, 2026 06:13
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the private/darshan/clone-format-tooltip-animation branch from f46deee to 418627f Compare March 24, 2026 17:30
Copy link
Copy Markdown
Contributor

@eszkadev eszkadev left a comment

Choose a reason for hiding this comment

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

code looks fine

@github-project-automation github-project-automation Bot moved this from To Review to To Test in Collabora Online Mar 25, 2026
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the private/darshan/clone-format-tooltip-animation branch from 418627f to 5efb770 Compare March 25, 2026 07:02
'text': _UNO('.uno:FormatPaintbrush'),
'tooltip': _('Clone Formatting (double click to keep active)'),
'activeTooltip': _('Clone Formatting is active (click again or press Escape to exit)'),
'activeDoubleClickTooltip': _('Clone Formatting is active (press Escape to exit)'),
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.

why this one doesn't mention click. shouldn't be the same as the pprevious. Also please use Esc instead of Escape is shorter and easier on translations.

@github-project-automation github-project-automation Bot moved this from To Test to In Progress in Collabora Online Mar 25, 2026
@pedropintosilva
Copy link
Copy Markdown
Contributor

Thanks Darshan! Unfortunately I think some things need to go:

  • Tooltips shouldn't appear automatically, if we want to do that it should be only for discoverability purpose and thus only once and even then the tooltip would still obstruct important controls which is not good.
  • There is no need to animate the button because the user has just clicked on it and after that there was already a visual indicator (toggled on). Otherwise, it can be very disruptive and even unsettling

Let's keep the tooltips but only appear with normal mouseover. Additionally , we could think if we could add a new status bar status to signal whenever the Clone formatting is active, but better to wait for user feedback before doing that change.

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the private/darshan/clone-format-tooltip-animation branch 2 times, most recently from 7194d9c to 9d711d0 Compare March 25, 2026 13:05
 - this patch will add tooltip option for active element
 - it sets the tooltip if option is enable and then set back to normal on toggle back to normal state
 - When Clone Formatting is active, swap the tooltip to inform the user how to exit (click again or press Esc).

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I30dea9dfd59594f1ea81477afdffa031b15103a5
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the private/darshan/clone-format-tooltip-animation branch from 9d711d0 to 738aebf Compare March 27, 2026 05:13
@github-project-automation github-project-automation Bot moved this from In Progress to To Test in Collabora Online Mar 30, 2026
@pedropintosilva pedropintosilva merged commit 31c00e9 into main Mar 30, 2026
17 checks passed
@pedropintosilva pedropintosilva deleted the private/darshan/clone-format-tooltip-animation branch March 30, 2026 10:22
@github-project-automation github-project-automation Bot moved this from To Test to Done in Collabora Online Mar 30, 2026
@pedropintosilva pedropintosilva changed the title Add generic active-state tooltip and attention animation for toolitems Active-state tooltip for Clone Formatting toolitem Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants