Skip to content

feat(ui): give menu rows, project cards and shortcuts their own icons - #3520

Merged
Mavrick-F merged 2 commits into
opengeos:mainfrom
Mavrick-F:fix/menu-icons
Dec 1, 2026
Merged

Mavrick-F merged 2 commits into
opengeos:mainfrom
Mavrick-F:fix/menu-icons

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Most rows of the Add Data menu had no icon, so they didn't line up with the two that did. Several different controls also shared one picture. This gives them icons that tell them apart, all drawn in icons.rs.

  • Add Data: every command row has an icon, including New Connection, its connection kinds and the sample layers. The checkbox row is unchanged.
  • Layer Templates: rows show their geometry instead of one stack icon seven times; Observations gets binoculars.
  • Project cards: the two import cards no longer repeat Open's folder.
  • Shortcuts: Keyboard Shortcuts and Help › Shortcuts share a keyboard, Quick Access gets a toolbar, and Command Search uses the magnifier of its search box.
  • Data Sources: databases, S3, URLs, Zarr and the samples use the same icons as Add Data.

Only icons change: no command, parameter, label, placement or saved data. The new names join the set plugins can use; none is removed.

Reach: the code is shared by the desktop and browser, and the Add Sample and Layer Template dialogs use the same rows. The command line, Python, the Assistant and MCP don't draw icons. The Data Sources pane's own New Connection menu stays plain text.

Testing

  • The fork's Linux gate passed on this commit: run.
  • ui_shot renders in light and dark, inspected.

No new tests: the change is which picture is drawn, and an assertion on icon names would repeat the source.

UI evidence

Add Data and Layer Templates, before (top) and after:

Add Data and Layer Templates

Project cards, before (top) and after:

Project cards

Settings and Help at a 1366 px window (cropped), before (top) and after:

Settings and Help

Data Sources, before (left) and after:

Data Sources

Dark theme, before (top) and after:

Dark theme

Related issue

None.

Summary by CodeRabbit

  • Style
    • Updated project cards with distinct GeoLibre and QGIS icons.
    • Added clearer icons for data sources, connections, sample layers, and layer templates.
    • Updated icons in the Settings and Help tabs, including shortcuts and command search.
    • Expanded the available icon set to support these visual updates.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The UI adds 12 icon drawings and assigns specific icons to project cards, data-source actions, connection entries, sample sources, layer templates, settings, and help actions.

Changes: UI Icon Updates

Layer / File(s) Summary
Add icon drawings
crates/ui-egui/src/icons.rs
The icon renderer and gallery add 12 icon names, including database, keyboard, and project icons.
Assign icons to UI actions
crates/ui-egui/src/backstage.rs, crates/ui-egui/src/connectionui.rs, crates/ui-egui/src/ribbon.rs
Project cards, connection kinds, ribbon menus, sample layers, templates, settings, and help actions receive specific icons.
Update source row icons
crates/ui-egui/src/sourcespane.rs
Source rows use updated icons, sample icons, and the shared connection icon mapping.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Feature

Suggested reviewers: deniial00, giswqs

Merge Risk: Minimal · up to 044c9

This change only swaps and adds icons across menus, project cards, shortcuts and data sources. Commands and saved data are unchanged, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: menu rows, project cards and shortcuts get their own icons. The raw summary and objectives confirm icon changes in backstage, connectionui, icons, ribbon and sourcespa…
Description check Passed The description follows the template's sections: Summary, Testing, UI evidence and Related issue. The Summary explains what changes and why. Testing lists the CI run and the ui_shot check. UI evidence…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: menu rows, project cards and shortcuts get their own icons. The raw summary and objectives confirm icon changes in backstage, connectionui, icons, ribbon and sourcespane, matching the title's scope. The title uses the conventional feat(ui) prefix and is specific.

Full details: Description check

Explanation

The description follows the template's sections: Summary, Testing, UI evidence and Related issue. The Summary explains what changes and why. Testing lists the CI run and the ui_shot check. UI evidence has before/after screenshots, which the template requires for visible UI changes. Related issue states 'None.' The template's 'No visible UI change' line was correctly replaced because this PR changes visible icons.

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.

Share

A rabbit taps a keyboard key,
New icons bloom for all to see.
A globe, a cube, a bucket, too,
Help and settings wear icons new.
The rabbit hops back through the UI.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: eb56c2d1-3aa5-429a-bae6-85c07fb5cc67
Commits

Reviewing files that changed from the base of the PR and between bda8663 and 044c9a8.

Files selected for processing: 5

  • crates/ui-egui/src/backstage.rs
  • crates/ui-egui/src/connectionui.rs
  • crates/ui-egui/src/icons.rs
  • crates/ui-egui/src/ribbon.rs
  • crates/ui-egui/src/sourcespane.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

("s3", "S3"),
];

/// The icon of a connection kind, as the Data Sources pane shows its sources.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this doc says the icon is the one "the Data Sources pane shows", but ribbon.rs now also calls it for the Add Data menu's New Connection rows. Suggest: /// The icon of a connection kind, as the Data Sources pane and the New Connection menu show it.

Category: quality

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid; left for the release quality pass.

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Code review

I read the full diff, the base-branch AGENTS.md, and the surrounding code in icons.rs, ribbon.rs, sourcespane.rs, connectionui.rs, widgets.rs and engine/src/sources.rs. I found no bugs, crash paths, silent data loss, or AGENTS.md violations.

Checked and fine:

  • Icon helpers: every helper the new arms call (rect, circle, arc, table, globe, layers, plus_badge, tint, paper) exists with a matching signature. amber and red are defined in paint. The recursive paint(…, "open", …) in the project_globe/project_layers arm terminates.
  • ALL list: the 11 new names are unique and each has a match arm. No bundled plugin declares one of them, so no existing plugin icon changes appearance.
  • Sample icons: sample_icon gets the sample's name from s.address. That matches sources.rs, which stores the name there, and layer.addSample reads it the same way.
  • Wasm: connectionui::icon and ribbon::sample_icon are not cfg-gated, and both desktop and browser builds use them. DATABASE_KINDS is still used in sourcespane.rs, so no import becomes unused.
  • No commands or parameters changed: the command surface snapshot is unaffected, and no new interface strings need translation.

Twins: the diff does not change a read route, an overlay tool, a data-adding command, or a wasm-only branch, so the twin checklist does not apply.

Confidence: high that there are no defects. The visual result is not verified here, since I could only read the code. The PR's screenshots were not inspected.

Nits (quality, not posted as inline comments):

  • sourcespane.rs:209: the sample case moved out of icon_of, which now falls back to add_data for a sample kind. There is one caller and it special-cases samples, so nothing is wrong today. Moving the sample branch into icon_of, passing the address, would keep the mapping in one place.

Prior reviews: the thread list is empty, so no earlier concerns were raised or left alone.

Inline comments: 1 (quality, in connectionui.rs:232). It is buffered until the session ends.

Change size

Compared with the base branch: the whole PR against main (merge base 21e9aa5 to PR head 044c9a8).

Measure Value
Files changed 5 (0 added, 5 modified, 0 removed, 0 renamed)
Size before 576.1 KB
Size after 581.9 KB
Total size change +5.9 KB
Path Before After Change
crates/ui-egui/src/icons.rs 64.6 KB 69.4 KB +4.8 KB
crates/ui-egui/src/ribbon.rs 323.8 KB 324.6 KB +0.8 KB
crates/ui-egui/src/connectionui.rs 152.1 KB 152.4 KB +0.3 KB
crates/ui-egui/src/backstage.rs 9.6 KB 9.6 KB +19 B
crates/ui-egui/src/sourcespane.rs 26.0 KB 26.0 KB −8 B

@Mavrick-F
Mavrick-F added this pull request to the merge queue Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-3520/
Web app https://preview.rustgis.app/pr-3520/app/
Commit 044c9a8

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 preview label (once per commit).

Merged via the queue into opengeos:main with commit 90b0bc6 Dec 1, 2026
28 checks passed
@Mavrick-F
Mavrick-F deleted the fix/menu-icons branch December 1, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant