feat: sticky toolbar in rich editor for long content#74
Open
mindcraft-research wants to merge 1 commit into
Open
feat: sticky toolbar in rich editor for long content#74mindcraft-research wants to merge 1 commit into
mindcraft-research wants to merge 1 commit into
Conversation
Quand l'éditeur riche contient beaucoup de contenu (consentement, consigne longue, debriefing détaillé...), la toolbar (H1/H2/H3, gras, italique, couleurs, alignement, etc.) sortait du champ de vision dès qu'on scrollait pour éditer le bas du texte. Il fallait remonter en haut pour utiliser les boutons de formatage. Fix : position: sticky; top: 0 sur la toolbar. Elle reste collée en haut de l'écran tant que l'éditeur est visible, et part avec lui quand on a fini de scroller dessus. Le overflow: hidden du wrap parent sert naturellement de limite (la toolbar ne sort jamais de l'éditeur). Maxime suggérait un pattern sentinel + IntersectionObserver dans son ticket, mais position: sticky fait exactement ça nativement depuis 2017 — pas besoin de JS. Suggestion de MaximeVIALA dans le feedback #cmp2d7rz8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Quand l'éditeur riche contient beaucoup de contenu (consentement, consigne longue, debriefing détaillé...), la toolbar (H1/H2/H3, gras, italique, couleurs, alignement, etc.) sortait du champ de vision dès qu'on scrollait pour éditer le bas du texte. Il fallait remonter pour utiliser un bouton de formatage.
Fix
`position: sticky; top: 0` sur la toolbar. Elle reste collée en haut tant que l'éditeur est visible à l'écran, et part avec lui quand on scroll au-delà. Le `overflow: hidden` du `.wrap` parent sert de limite naturelle (la toolbar ne sort jamais hors de son éditeur).
3 lignes de CSS. Maxime suggérait un pattern sentinel + IntersectionObserver dans son ticket, mais `position: sticky` fait ça nativement depuis 2017 — pas besoin de JS.
Test plan
🤖 Generated with Claude Code