0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/apps
Sanne de Vries f06de99410
Added highlight animation when scrolling to replied-to comment (#21781)
REF https://linear.app/ghost/issue/PLG-284

When clicking on a replied-to reference, you scroll up to the parent comment. To guide the eye, the parent comment is highlighted with a yellow background.

- added `dispatchAction` to the `ActionHandler` function call arguments, allowing actions to call other actions
- added `commentIdToHighlight` app context state and associated `highlightComment` action to set it
- updated `Comment` (and related sub-components) to match `commentIdToHighlight` when rendering to determine whether to apply highlighting of comment contents
- for the highlight, `<mark>` is used to wrap any paragraphs inside the comment contents and appropriate tailwind highlight animation classes applied
  - uses the inline `<mark>` element so that background highlight only applies to the text bounding boxes rather than the entire wrapping element

---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2024-12-05 17:46:16 +00:00
..
admin-x-activitypub Added support for WordPress formatting in notes 2024-12-03 12:41:37 +00:00
admin-x-demo 🌐 Updated packages for improved i18n support (#21218) 2024-10-03 22:27:16 +00:00
admin-x-design-system Updated drawer so you can interact with page behind it (#21778) 2024-12-02 13:12:05 +00:00
admin-x-framework Added custom fonts feature check (#21738) 2024-12-04 13:42:44 +08:00
admin-x-settings Added custom font support for themes (#21817) 2024-12-05 16:39:41 +00:00
announcement-bar Added Dev Container setup (#21279) 2024-10-24 11:15:08 -07:00
comments-ui Added highlight animation when scrolling to replied-to comment (#21781) 2024-12-05 17:46:16 +00:00
portal Added loading state when ordering comments (#21788) 2024-12-04 10:16:58 +08:00
signup-form Bumped signup form package (#21631) 2024-11-15 19:11:29 +00:00
sodo-search Bumped portal and search packages (#21630) 2024-11-15 19:10:29 +00:00