Skip to content

code-quality: LayerStylePanel.jsx at 1644 lines — style editor logic needs splitting #266

@evan-zhang11

Description

@evan-zhang11

Problem

frontend/src/LayerStylePanel.jsx has grown to 1644 lines since the map editor was merged (commit 828e69b).

This single component handles:

  • Fill/stroke/label style configuration
  • Classification logic
  • Color ramp selection
  • Symbol wizard integration

Current size context

File Lines
LayerStylePanel.jsx 1644
App.jsx 2186
MapEditor.jsx 701
styleJsonToOl.js 713

Related: #230 (App.jsx), #227 (handlers.rs), #229 (workspace_handlers.rs)

Suggested split

  • FillStyleEditor.jsx — fill color, opacity, pattern
  • StrokeStyleEditor.jsx — stroke color, width, dash
  • LabelStyleEditor.jsx — font, size, placement
  • ClassificationPanel.jsx — classification method, breaks, color ramp
  • LayerStylePanel.jsx — orchestrator that composes the above

Impact

Low priority — functional but increasingly hard to maintain. Address before adding more style features.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions