-
-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
Description
Description
The jupyter-lexical package has inconsistent CSS organization. Some plugins import their own CSS files while others use centralized CSS imports. This creates duplication and maintenance issues.
Reproduce
Check /src/plugins/FloatingLinkEditorPlugin/index.tsx
- imports './index.css' directly
Check /src/plugins/FloatingTextFormatToolbarPlugin.tsx
- no CSS import
Check /style/lexical/index.css
- imports CSS for many plugins centrally
Notice the inconsistency
Expected behavior
All plugins should follow the same pattern: each plugin imports its own CSS file directly. This matches the official Lexical playground architecture.
src/plugins/PluginName/
├── index.tsx (imports './index.css')
└── index.css
Proposed Solution
Move plugin CSS files from /style/lexical/ to their respective plugin directories and add CSS imports to the plugin files.
Plugins that need migration:
- FloatingTextFormatToolbarPlugin
- DraggableBlockPlugin
- CodeActionMenuPlugin
- CommentPlugin
- TableOfContentsPlugin
- EquationsPlugin, ExcalidrawPlugin, ImagesPlugin, YouTubePlugin, HorizontalRulePlugin
Steps per plugin:
- Move CSS file to plugin directory
- Add import statement to plugin file
- Remove centralized import
- Test