Skip to content

feat(interpretations): visual design and UX improvements#1830

Open
cooper-joe wants to merge 3 commits intomasterfrom
interpretations-adjustments
Open

feat(interpretations): visual design and UX improvements#1830
cooper-joe wants to merge 3 commits intomasterfrom
interpretations-adjustments

Conversation

@cooper-joe
Copy link
Copy Markdown
Member

@cooper-joe cooper-joe commented Apr 20, 2026

Implements UX-198


Key features

  1. Visual and UX refresh for the Interpretation and related components

Description

This PR makes visual and ux-focused changes to the Interpretation and its related components. The changes remove some unnecessary elements.

Summary of major changes to each component:

Message

  • Removed card-style layout
  • Improved typography and readability
  • Adjusted date format
  • Improve footer action buttons, removed 0 counts
  • Added delete confirmation

List

  • Removed date-grouped headers

Thread/Modal

  • Removed visualization title from modal title. This was added when this modal was designed for use on Dashboards, but this functionality hasn't materialised. Repeating the visualization name in DV/Maps is poor use of space. If this functionality is needed in the future we can add it elsewhere.
  • Adjusted content width calculation for the updated modal component, fixes spacing bugs.
  • Improved thread rendering
  • Moved interpretation date to the modal title.

Rich text editor

  • Custom button usage, reduce the border-stacking poor visual appearance
  • Improve visual design

Storybook stories were added to support testing, I kept these in as they seem useful.


TODO

  • PRs for all affected apps created
  • Storybook added

Screenshots

image image image image image image

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@HendrikThePendric HendrikThePendric left a comment

Choose a reason for hiding this comment

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

Most of the changes look good, but I have some doubts about this delete confirmation UX. Firstly, it has a small bug that can be triggered like so:

  • Click delete button once
  • Move mouse to the right so that the cursor is over the right end of the now-expanded button. You'll see the "Click again to delete" tooltip
  • Wait until the timeout expires, now the cursor is no longer over the button. So this means there was a mouse-enter event but never a mouse-leave event and the tooltip remains visible

I think by applying different markup and keeping the delete button the same size you'd be able to avoid all of this.

From a UX perspective this button is quite nice, because it's quite subtle. But it's not a conventional solution (I think) and since the timeout is fairly short and because you don't see a counter, it's also a bit surprising/confusing. It'd be very nice if there would be some sort of visual clue to what is happening. Possibly you could have a circle with an animation or animate the fill of the background or sth?

@cooper-joe
Copy link
Copy Markdown
Member Author

Most of the changes look good, but I have some doubts about this delete confirmation UX. Firstly, it has a small bug that can be triggered like so:

* Click delete button once

* Move mouse to the right so that the cursor is over the right end of the now-expanded button. You'll see the "Click again to delete" tooltip

* Wait until the timeout expires, now the cursor is no longer over the button. So this means there was a mouse-enter event but never a mouse-leave event and the tooltip remains visible

I think by applying different markup and keeping the delete button the same size you'd be able to avoid all of this.

Good catch on that bug. A markup change to avoid the issue completely sounds ideal.

From a UX perspective this button is quite nice, because it's quite subtle. But it's not a conventional solution (I think) and since the timeout is fairly short and because you don't see a counter, it's also a bit surprising/confusing. It'd be very nice if there would be some sort of visual clue to what is happening. Possibly you could have a circle with an animation or animate the fill of the background or sth?

Could you elaborate or reword this? I don't follow? Specifically,

because you don't see a counter, it's also a bit surprising/confusing. It'd be very nice if there would be some sort of visual clue to what is happening

What do you mean by counter? I do think a label appearing saying Delete?, plus the colour change, does bring the user's attention to the fact that "confirmation is required to perform that action". But I'm curious to know the solution you describe above.

Comment on lines 17 to 42
<Tooltip closeDelay={200} content={tooltipContent}>
{({ ref, onMouseOver, onMouseOut }) => (
<span
ref={ref}
onMouseOver={onMouseOver}
onMouseOut={onMouseOut}
className="wrapper"
>
<button
onClick={(event) => {
event.stopPropagation()
onClick()
}}
className={cx('button', { selected, viewOnly })}
className={cx('button', {
selected,
viewOnly,
confirming,
})}
disabled={disabled}
data-test={dataTest}
>
{count && count}
<Icon />
{label !== undefined && label !== null && (
<span className="label">{label}</span>
)}
</button>
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.

I'm thinking that if you wrap <Icon /> with the tooltip anchor span, then that anchor will have a constant size which will avoid the bug I reported earlier. Downside would be that if you hover the right end of the button now the tooltip will disappear, but I think this is less of an issue.

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.

I don't think a best-of-both-worlds solution is possible:

  • If the anchor element changes size then the mouse can move out of the button without a mouseout event and the tooltips keeps showing.
  • If the additional content is outside the tooltip anchor, then hovering over the additional content will not keep the tooltip in view

@HendrikThePendric
Copy link
Copy Markdown
Contributor

HendrikThePendric commented Apr 21, 2026

I opened #1831, a PR against this branch. It does the following:

  1. The bin icon changes into a progress ring that lasts as long as the confirm timeout. This is an illustrated example of what I was trying to say in my review comment. The problem as I see it is that the button exits the confirmation state rather unexpectedly. We need to communicate to the user that they need to click before the time runs out.
  2. The tootlip anchor is now the icon so the bug is resolved.

@cooper-joe let me know if you like it!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants