Skip to content

refactor(ui): use craft-ui's ComboBox for every dropdown - #1457

Merged
aiongg merged 6 commits into
storytold:mainfrom
aiongg:dropdown-regrow
Oct 27, 2026
Merged

aiongg merged 6 commits into
storytold:mainfrom
aiongg:dropdown-regrow

Conversation

@aiongg

@aiongg aiongg commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

egui's ComboBox caps its menu at the previous frame's height, so a menu that shrinks while open never grows back (emilk/egui#5225). craft-libs#387 adds craft_ui::ComboBox and combo::Menu, which do not have this cap.

Changes:

  • 30 ComboBox uses swapped to craft_ui::ComboBox. None is searchable, so this is a plain swap. The Add Animation menu (deckcraft#1370) is not touched.
  • craft-ui added as a dependency.
  • The three craft-libs pins (f0ad6c1e, 9f75d3dc, 495e5971) are unified to storytold/craft-libs 92d392cf; no API fixes were needed.
  • A clippy disallowed-types rule rejects egui::ComboBox.

No new tests. Clippy is clean on ui-egui, pdf, media, engine and app.

Tested on macOS: Backstage > Print paper size and orientation; Insert Date/Time language list; Format Shape combos; Transitions sound.

Summary by CodeRabbit

  • Style
    • Updated dropdown controls across save, print, dialog, and editing screens to use a consistent presentation. The available choices and selection behavior remain unchanged, so existing workflows continue to work as before. No new options or user-facing functionality are included in this update.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 11afe6c and 0d9ffaa.

Files selected for processing: 1
  • xtask/src/pdf_deps.rs

Limit details: You’ve used all 10 included reviews currently available.

Walkthrough

The pull request updates craft-libs dependency pins and adds craft-ui to the UI crate. It replaces existing egui::ComboBox selectors with craft_ui::ComboBox across backstage, dialog, panel, and ribbon interfaces. A Clippy rule disallows egui::ComboBox.

Changes: Shared ComboBox adoption

Layer / File(s) Summary
Dependency and lint setup
Cargo.toml, clippy.toml, crates/ui-egui/Cargo.toml, xtask/src/pdf_deps.rs
The craft dependencies, the krilla patch, and the PDF dependency revision use craft-libs revision 92d392c. The UI crate adds craft-ui, and Clippy disallows egui::ComboBox.
Backstage and dialog selectors
crates/ui-egui/src/backstage/*, crates/ui-egui/src/dialogs*
Existing selectors use craft_ui::ComboBox instead of egui::ComboBox. Their existing options and selection logic remain unchanged.
Panel and ribbon selectors
crates/ui-egui/src/panels/*, crates/ui-egui/src/ribbon/transitions.rs
Existing selectors use craft_ui::ComboBox instead of egui::ComboBox. Their options and selection handling remain unchanged.

Priority: Low

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

Change: Bug fix

Suggested reviewers: skylartaylor, dylanmtaylor, echelon

Merge Risk: Minimal · up to 0d9ff

No actionable merge risk was found; the change is ready to merge.

Security architecture risk: Low · up to 0d9ff

The inspected changes preserve caller-owned selections and existing PDF dependency checks. No new externally reachable interface or weakened control was identified. The dependency update also affects media, PDF, and update functionality; changes within those upstream components were not fully assessed.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The dependency revision change reaches media, PDF generation, and update packages as well as the newly adopted UI package. Its dependency scope is therefore broader than dropdown rendering alone.

Trust Boundaries and Controls

  • inferred — The SHARED_REV change does not introduce an attacker-controlled command parameter or a new runtime entrypoint: it supplies a fixed expected source string to the existing developer-tool validation path. This conclusion is limited to the inspected checker and its callers, not upstream dependency behavior.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: replacing dropdowns with craft-ui's ComboBox.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
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: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 19 functions across 16 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 1
  • Waived: $0.25 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Comment @coderabbitai help to get the list of available commands.

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