Skip to content

💅 Migrate plugin CSS to distributed architecture #472

@goanpeca

Description

@goanpeca

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions