Repository navigation
feat(ui): a fixed Labeling tab for every label control on the ribbon - #935
Conversation
After Style, the Labeling tab has the selected feature layer's label groups in the Labeling pane's tab order (Labels, Label Class, Text Symbol, Label Placement, Label Range), or a hint without one, then Map Labeling (Lock, Pause, View Unplaced, Convert), which needs no layer. Style and View lose their label groups, the label commands' locations move to Labeling, and current_tab opens the new tab for the old name. Closes opengeos#897.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add the Labeling tab and relocate controls crates/ui-egui/src/ribbon.rs, crates/ui-egui/src/lib.rs, crates/ui-egui/tests/*, crates/ui-egui/src/tests.rs, docs/comparison/*, docs/contributing.md, docs/user-guide/index.md |
The ribbon adds and dispatches the Labeling tab. Feature-layer label controls appear there when applicable, alongside map-wide controls. Style and View no longer show the relocated label controls. Tests and ribbon documentation reflect the tab and its behavior. |
Command locations
| Layer / File(s) | Summary |
|---|---|
Update command locations crates/engine/src/cmd/labels.rs, crates/engine/src/cmd/layer.rs, crates/engine/src/tests.rs, crates/map/src/symbology.rs, crates/ui-egui/src/scriptcomplete.rs, docs/user-guide/cartography.md |
Label command categories and documented paths now point to Labeling. The fonts command is categorized under View › Windows › Labeling. Command handlers and parameters remain unchanged. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Possibly related issues
- opengeos/RustGIS#858 — This change moves label controls to the Labeling tab, but does not include the pane restructuring or other requested changes described in that issue.
- [Bug]: Dragging the label size or colour in the ribbon makes one undo step per frame #651 — The label-size drag test now targets the Labeling tab; the diff does not change the per-change behavior reported in this issue.
Suggested reviewers: giswqs, deniial00
Merge Risk: 
Minimal · up to 63dc3
-
The Labeling tab’s documented Convert route remains available. No issue identified here requires resolution before merging.
Pre-merge checks: 
3 · 
1 · 
1
-
Failed checks: 1 warning · 1 inconclusive Passed checks: 3 passed-
Full details: Out of Scope Changes check
-
Explanation
Every changed file serves the
#897objectives:ribbon.rs: adds the tab, moves the label groups, addslabeling_tab,layer_hint,map_labeling_group, the test helpertab_harness, and the new test. The label-size drag test now targets the Labeling tab.labels.rs,layer.rs: change command menu paths only. Handlers and parameters are unchanged.symbology.rs,tests.rs,scriptcomplete.rs,measurement_units.rs,smoke.rs: update location text or tab names that the move changes.ui-egui/src/lib.rs,docs/comparison/*.md,docs/contributing.md,docs/user-guide/*.md: update the tab lists and docs the issue names. Thedocs/contributing.mdchange removes the "planned" marker for Labeling.
The move of
labels.fontsto View › Windows › Labeling matches#897. The font stays in the pane only, and that route opens the pane. No change was found that lacks a connection to the issue.
-
Full details: Linked Issues check
-
Explanation
Issue
#897requirements checked against the whole-PR diff (merge base to head):- Fixed Labeling tab after Style, always shown: PASS.
TABSadds "Labeling" at index 3, directly after "Style". The tab is not contextual.labeling_tabis dispatched inshow. - Feature-layer groups, hint otherwise: PASS.
labeling_tabcallslabel_groupsfor a feature layer. For a raster or no layer it callslayer_hint. - Map-wide settings with no layer: PASS.
map_labeling_groupruns on every path, so Lock, Pause, View Unplaced and Convert show without a layer. - Style loses its five label groups: PASS.
style_tabno longer callslabel_groups. - View loses its Labeling group and duplicate Label button: PASS.
labeling_groupis removed fromview_tab. current_tabmaps "Labeling" to the new tab: PASS. The mapping to "Style" is removed.- Command ids unchanged, locations moved to Labeling: PASS by the summaries of
labels.rsandlayer.rs. Only menu paths changed. The script help location inscriptcomplete.rsis updated. - Documentation of the ribbon and labelling pages: PASS.
docs/user-guide/index.mdanddocs/user-guide/cartography.mdare updated. - Automated test: PASS.
the_labeling_tab_holds_the_label_groupscovers a feature layer, no layer, and the absence of label groups from Style and View. - Group order: FAIL.
#897requires the groups in the order of the Labeling pane's topic tabs (Class, Symbol, Position, Range). The objectives state "in the specified order". In the diff, the Label Range and Label Placement blocks move after Label Class, so Label Class now precedes Label Placement and Label Range. Text Symbol is in the unchanged part oflabel_groupsbefore the moved blocks, and no Text Symbol code follows Label Class in either revision. The head order is therefore Labels, Text Symbol, Label Class, Label Placement, Label Range. The PR description states the order Labels, Label Class, Text Symbol, Label Placement, Label Range. I did not read the unchanged body oflabel_groupsin full, so this order result rests on the diff hunks and the base structure.
Label on/off and Properties in the Labels group are not changed by the diff. I did not confirm their content directly.
Resolution
In
label_groups(crates/ui-egui/src/ribbon.rs), place the Label Class group before the Text Symbol group. The Labeling tab must read: Labels, Label Class, Text Symbol, Label Placement, Label Range, Map Labeling, as#897specifies. Confirm the order in the rendered tab, and update the PR description if the final order differs. - Fixed Labeling tab after Style, always shown: PASS.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 65.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 8 files. (6 skipped: 5 unsupported, 1 too large.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 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 taps the Labeling tab,
Where map-wide settings sit.
Layer controls have found their place,
And paths now point to it.
The rabbit hops, the labels stay.
Comment @coderabbitai help to get the list of available commands.
Code reviewI read the full diff and the surrounding source in BugsNothing found (high confidence). What I checked:
SecurityNothing found. The change is UI layout, location strings and docs. There is no new input handling, no PerformanceNothing found. Quality
AGENTS.md
Change sizeCompared: the whole PR against main (merge base c0826b1 to PR head 63dc37c).
|
|
I'm finishing the review. My one inline comment failed because the line isn't in the diff, so I'm putting the findings in the summary. Code reviewI read the whole diff and some surrounding source. The change adds a fixed Labeling ribbon tab. It moves the label groups out of Style and View, adds the "Map Labeling" group, and updates command locations, docs and tests. The logic looks correct and I found no blocking problems. Bugs
Security
Performance
Quality
AGENTS.md
Change sizeCompared: the whole PR against main (merge base c0826b1 to PR head 63dc37c)
|
📖 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 |
|
@jgregoriorincon Looks great! Thank you. |
Summary
Closes #897, as agreed in #862. Label controls were split across Style and View, and Style scrolled on a laptop-sized window. A fixed Labeling tab now sits right after Style, always shown like Style and Data.
Purpose: how the map is labelled: what gets a label, with which text, where, and at which scales, plus the label settings for the whole map.
Groups, in the Labeling pane's tab order:
Groups 1–5 are for the feature layer selected in Layers. With a raster or no layer, the tab shows a hint in their place. Map Labeling shows whatever is selected, as its settings apply to the whole map.
What moved, and where it remains reachable
Style › Label …/View › LabelingtoLabeling › …(Labels, Label Class, Text Symbol, Label Placement, Label Range, Map Labeling). Command Search, the Script help and Show me read these.labels.fontsmoves toView › Windows › Labeling, since the font is picked in the pane only.current_tabnow opens the new tab for the old name "Labeling" (it mapped to Style), so saved pane sets and scripts naming it land there.Workflows checked (laptop width, a feature layer selected)
Docs: the ribbon table in the user guide, the labelling page, the tab-purpose table in
docs/contributing.md(Labeling is no longer "planned"), and the tab lists in the comparison pages.Testing
cargo xtask ci: passed.the_labeling_tab_holds_the_label_groups:labels.placementstep;Related issue
Closes #897.
Summary by CodeRabbit
New Features
Documentation