Repository navigation
feat(labels): the ribbon's label groups edit and choose the Labeling pane's class - #863
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Resolve and share class selection crates/ui-egui/src/labelpane.rs |
The pane resolves its selected class and uses a shared chooser. If the saved class name is absent or no longer matches, the selection falls back to Default. |
Apply ribbon controls to selected class crates/ui-egui/src/ribbon.rs, docs/user-guide/cartography.md |
Ribbon label controls use the selected class for settings and size drags. Tests cover synchronized selection, class-specific edits, and drag undo behavior. The guide describes the shared chooser and selection. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
actor Operator
participant ClassChooser
participant LabelingPane
participant RibbonLabelGroups
participant LabelClass
Operator->>ClassChooser: Select a named class or Default
ClassChooser->>LabelingPane: Update shared class selection
RibbonLabelGroups->>LabelClass: Read selected class parameters
RibbonLabelGroups->>LabelClass: Write class-specific parameters
Possibly related issues
- opengeos/RustGIS#858 — The ribbon controls edit the class selected in the Labeling pane, with Default as the fallback.
- opengeos/RustGIS#722 — The ribbon now follows the per-layer class selection and falls back to Default when the selected class is removed.
- opengeos/RustGIS#651 — The changes test size-drag preview, commit, and undo behavior for the selected class.
Possibly related PRs
- opengeos/RustGIS#789 — That PR adds the Labeling pane’s class chooser, which this change exposes for reuse by the ribbon.
Suggested reviewers: giswqs
Merge Risk: 
Minimal · up to cf276
-
The ribbon’s inspected limit-clear action edits the chosen class. No issue requiring a change before merge was established; normal checks still apply.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 79.17% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit picks a class with care,
The ribbon follows everywhere.
A size drag moves, then settles right,
One class stays changed through undo’s flight.
The Default waits, untouched and fair.
Comment @coderabbitai help to get the list of available commands.
Code reviewI found nothing that needs changing. I read the whole diff ( What I checked
Minor, non-blocking (low confidence)
Change sizeCompared: the whole PR against main (merge base 9a88d22 to PR head cf2764b)
|
Code reviewI read the full diff and the surrounding Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared: the whole PR against main (merge base 9a88d22 to PR head cf2764b)
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
Step 1 of #858. The ribbon's label groups (Label Range, Label Placement, Label Class, Text Symbol) edited Default while the Labeling pane edited the class chosen in it, so with a class chosen the two showed and changed different classes. Now there is one chosen class:
labelpane::class_combo), on the same per-layer choice, so a class chosen in either is chosen in both. Managing classes (New, Rename, Move, Remove) stays in the pane.class; on Default they send none, so recorded steps stay as before.No engine change: every
labels.*command already takesclass. The user guide's label classes section says the ribbon edits the chosen class.Testing
cargo xtask cipasses.ribbon.rs: the ribbon and the pane choose one class (the_ribbon_and_the_pane_choose_one_class); the ribbon edits the chosen class, naming it, and Default's steps name none (the_ribbon_edits_the_chosen_class); a size drag on a class is one undo step on it (ribbon_label_size_drag_on_a_class_is_one_step_on_it). Falling back to Default when the chosen class goes islabelpane::chosen's, already tested in the pane.Related issue
Part of #858.
Summary by CodeRabbit
New Features
Documentation