fix(notes): keep the note stylesheet in the production bundle - #276
Merged
EtienneLescot merged 1 commit intoAug 5, 2026
Merged
Conversation
`NotesWindow.module.css` was imported for its side effect only, with no binding. Rollup tree-shakes a binding-less CSS-module import out of the production bundle, so the shipped app carried zero `.tiptap` rules — dev looked fine because Vite injects module CSS at runtime there. Without `height: 100%` + `overflow-y: auto` the note body stops being a scroll container and grows to the height of its content. Paste a long note and ProseMirror scrolls the caret into view, which now scrolls the `overflow: hidden` shell instead: the toolbar leaves the viewport and the wheel cannot bring it back. Measured on a 400x540 window with ~5.8k characters pasted — editor 6360px tall, `scrollTop` pinned, toolbar at y=-5913, zero buttons hit-testable. Every selector in the file was already `:global`, so the CSS module bought nothing: rename it to plain `.css` and drop the wrappers. A plain CSS import is always emitted. This also restores the mirror transform, list markers, code blocks and heading sizes in production.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Cherry-pick of adaba8e (#270, merged into
main) onto the frozen 1.9.0 branch. Clean pick, no conflict.The Notes window is unusable in
1.9.0-rc.2as shipped: paste a long text and the note fills the window, the wheel does nothing, and every toolbar button leaves the screen for good.NotesWindow.tsximported its stylesheet for the side effect only, with no binding — Rollup tree-shakes a binding-less CSS-module import out of the production bundle, so the shipped app carried zero.tiptaprules. Dev never showed it because Vite injects module CSS at runtime. Withoutheight: 100%+overflow-y: autothe note body stops being a scroll container, and ProseMirror's scroll-into-view then scrolls theoverflow: hiddenshell instead.Renamed to a plain
.css(every selector was already:global) so the rules always ship. Also restores the mirror transform, list markers, code blocks and heading sizes in the packaged app.Related issue
Refs #270
Type of change
Release impact
Desktop impact
Screenshots / video
Measured on a 400x540 window (the Notes window default), ~5.8k characters pasted:
Testing
Verified against the production bundle on
mainbefore the pick:vite buildthenvite previewat?showNotes=true. 0.tiptaprules emitted before the fix, 30 after. Unit suites and typecheck were green on #270; CI covers this branch via therelease/**trigger.Needs
prerelease.ymlrerun withrc_number: 3after merge — otherwise the Discord testers keep validating an RC without the fix.