Skip to content

ui(vat-panel): collapse by default + match inspector control styling#651

Merged
fernandotonon merged 2 commits into
masterfrom
feat/vat-panel-polish
May 20, 2026
Merged

ui(vat-panel): collapse by default + match inspector control styling#651
fernandotonon merged 2 commits into
masterfrom
feat/vat-panel-polish

Conversation

@fernandotonon
Copy link
Copy Markdown
Owner

@fernandotonon fernandotonon commented May 20, 2026

Summary

Quick UI polish on the VAT panel that landed via #649. Stacked on top of `feat/vat-include-shaders` (PR #649) — please review/merge #649 first.

Collapsed by default

VAT is a power-user export step, not part of the routine animation-review flow. The CollapsibleSection now starts collapsed so the animation tools panel doesn't auto-occupy real estate; the user expands when they want to bake.

Themed 14×14 checkboxes

"Include shader" master + Godot/Unity/Unreal sub-checkboxes now use the same square-with-checkmark Rectangle-driven control the Animations panel uses for per-clip Enable / Loop toggles. The stock `Controls.CheckBox` renders ~22 px tall and carries Qt's full theming, which felt oversized in the tight inspector rows.

`ThemedComboBox` for Anim picker

Matches the dropdown the Animations panel's simplify-preset selector uses, instead of Qt's default ComboBox.

Themed text-input rows for FPS and Output

  • Plain "FPS:" / "Out:" left labels (matching the Anim row's label style).
  • Custom themed `Rectangle + TextInput` panel — same colours, height, border treatment as the Transform / Primitive fields elsewhere in the inspector.
  • FPS gets a Column of step arrows on the right; Out gets a placeholder hint that hides on focus / non-empty.
  • Browse button shrunk from 24 → 22 px so all three controls share a baseline.

Test plan

  • Local build: clean
  • App launches, VAT group is collapsed by default
  • Expand → Anim/FPS/Out rows use the new styling
  • "Include shader" checkbox toggles the per-engine row
  • Bake button writes the requested shader templates next to the bake

Related

Follow-up to #649. No C++ behaviour change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • VAT section now collapses by default.
    • Animation Mode tools redesigned with improved themed input controls, including numeric validation for FPS and better checkbox styling across engines (Godot, Unity, Unreal).
  • Style

    • Enhanced UI consistency with refined themed controls throughout the Properties Panel.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Warning

Rate limit exceeded

@fernandotonon has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 47 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f5edaccb-f5ab-49b0-8f2d-2d165044f7b7

📥 Commits

Reviewing files that changed from the base of the PR and between 972bbff and bbc7393.

📒 Files selected for processing (1)
  • qml/PropertiesPanel.qml
📝 Walkthrough

Walkthrough

The VAT baker UI section in PropertiesPanel.qml is systematically redesigned with themed components. The VAT section now collapses by default. Animation picker and output directory controls switch to themed ComboBox and TextInput variants. The FPS control undergoes substantial reimplementation with numeric validation, arrow increment/decrement zones, and keyboard handling. Shader toggles are rebuilt as custom Rectangle-based checkboxes with Repeater-driven per-engine generation.

Changes

VAT Baker UI Theming and Control Replacement

Layer / File(s) Summary
VAT Section Collapse Default
qml/PropertiesPanel.qml
The "VAT" collapsible section defaults to expanded: false instead of expanded.
Themed Selection and Directory Controls
qml/PropertiesPanel.qml
Animation picker migrates from Qt ComboBox to ThemedComboBox. VAT output directory migrates to themed TextInput with placeholder text shown only when empty and unfocused, plus adjusted sizing.
FPS Input Control with Validation and Keyboard Handling
qml/PropertiesPanel.qml
FPS input is replaced with a bounded TextInput offering on-finish numeric parsing/clamping, separate up/down arrow regions that increment/decrement within limits, and keyboard up/down press handling. All interactions disable during baking.
Shader Include Toggles Replacement
qml/PropertiesPanel.qml
Master "Include shader" toggle and per-engine checkboxes transition from Qt CheckBox to custom themed checkbox visuals built from Rectangle + MouseArea. Per-engine toggles are generated by Repeater over {Godot, Unity, Unreal} and update shaderGodot, shaderUnity, shaderUnreal booleans via click handlers. Baking-driven opacity and disabled behavior preserved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • fernandotonon/QtMeshEditor#649: Introduces the same "Include shader" master toggle and per-engine Godot/Unity/Unreal checkbox theming with Repeater-driven UI generation.

Poem

🐰 VAT baking now slides shut by default,
With themed inputs dancing, never dealt a fault—
FPS arrows tick up and tick down,
While shader toggles wear their custom crown,
All styled and smooth, a UI profound! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: collapsing VAT by default and applying inspector control styling to match the panel design.
Description check ✅ Passed The PR description follows the template structure with Summary and Technical Details sections. It provides comprehensive details about all changes, includes a test plan, and clearly explains the rationale.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/vat-panel-polish

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

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

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c315ac028b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread qml/PropertiesPanel.qml
Comment on lines +892 to +897
MouseArea {
anchors.fill: parent
enabled: !VATBakerController.isBaking
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ForbiddenCursor
onClicked: animToolsCol.includeShaders = !animToolsCol.includeShaders
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore keyboard semantics for shader toggles

Replacing CheckBox with Rectangle + MouseArea removes built-in focus, keyboard activation, and checkbox accessibility state, so users navigating by keyboard/screen reader can no longer toggle "Include shader" (and the per-engine toggles follow the same pattern). This is a behavioral regression from the previous CheckBox implementation and blocks non-mouse interaction for these export options.

Useful? React with 👍 / 👎.

Comment thread qml/PropertiesPanel.qml Outdated
Comment on lines +743 to +745
onClicked: {
animToolsCol.fps = Math.min(120, animToolsCol.fps + 1)
animFpsInput.text = String(animToolsCol.fps)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply FPS arrow steps to current typed value

The up/down arrow handlers increment animToolsCol.fps, but that model value is only synchronized in onEditingFinished, so clicking an arrow while the user has an uncommitted edit in the text box uses a stale value (e.g. type 60, click ▲, and the value can jump from prior state instead of 61). This makes the custom spinner behave inconsistently compared to the previous SpinBox and can silently apply the wrong FPS.

Useful? React with 👍 / 👎.

Base automatically changed from feat/vat-include-shaders to master May 20, 2026 21:19
VAT panel housekeeping after the include-shaders checkboxes landed:

- Collapsed by default. VAT is a power-user export step, not a
  routine animation-review touchpoint — defaulting the
  CollapsibleSection to collapsed keeps the animation tools panel
  short out of the box.

- Themed 14×14 checkboxes for "Include shader" + Godot/Unity/Unreal.
  The previous stock `Controls.CheckBox` renders ~22 px tall and
  carries Qt's full theming, which felt outsized inside the tight
  inspector rows. The new look mirrors the Enable/Loop toggles on
  the per-clip rows of the Animations panel (same square-with-
  checkmark style, same border colours).

- `ThemedComboBox` for the Anim picker so the dropdown matches the
  one used by the Animations panel's simplify-preset selector
  instead of Qt's default ComboBox.

- Themed text-input row for FPS — coloured-label-box pattern
  dropped in favour of the plain "FPS:" left label (matching the
  Anim / Out rows) with a custom themed Rectangle + TextInput +
  step-arrow Column. Same as the inspector's other numeric
  controls.

- Themed text-input row for the output-folder path (label + box
  + Browse button at 22 px to match).

QML-only change. No C++ behaviour change.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@qml/PropertiesPanel.qml`:
- Around line 720-721: The arrow key/arrow-button handlers (Keys.onUpPressed /
Keys.onDownPressed and the arrow button handlers that modify animToolsCol.fps)
must parse and clamp the current animFpsInput.text first and use that as the
base before applying +1 / -1; replace direct increments of animToolsCol.fps with
logic that reads parseInt(animFpsInput.text) (fallback to animToolsCol.fps if
parse fails), clamp to [1,120], add/subtract 1, then set animToolsCol.fps and
update animFpsInput.text to the new value; apply the same change to the other
handler sites mentioned (around lines 743-746 and 763-766).
- Around line 878-911: The custom checkbox Rectangle (id: includeShaderChk) and
its sibling Text lost keyboard and accessibility support when you replaced
Controls.CheckBox; restore focusability and assistive properties by either
reverting to or wrapping this UI in a reusable themed checkbox component
(preferred) or by adding focus: true/focusPolicy, Keys.onPressed/Keys.onReleased
handlers to toggle animToolsCol.includeShaders on Space/Enter, and set
Accessible.role, Accessible.name and Accessible.checked (bound to
animToolsCol.includeShaders) on the interactive element (includeShaderChk or its
MouseArea); ensure VATBakerController.isBaking still disables focus/interaction
and that the Text label provides the same clickable/focus behavior (or use
proper Accessible.name linking) so keyboard and screen-reader users can toggle
the shader option.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1ed78409-ac51-4588-b3a6-fe22031ca4da

📥 Commits

Reviewing files that changed from the base of the PR and between 263e7fb and 972bbff.

📒 Files selected for processing (1)
  • qml/PropertiesPanel.qml

Comment thread qml/PropertiesPanel.qml Outdated
Comment thread qml/PropertiesPanel.qml
Addresses Codex P2s + CodeRabbit notes on PR #651.

1) FPS arrows + ↑/↓ key handlers now read the LIVE input text
   instead of the committed `animToolsCol.fps`. Previously, typing
   "60" and pressing ↑ before Enter would jump back to the old
   committed value + 1. New `stepFps(delta)` helper parses
   animFpsInput.text first; if it doesn't parse, falls back to the
   committed value. Same helper drives both arrow buttons and both
   keyboard handlers.

2) Themed checkboxes (Include shader + Godot/Unity/Unreal) regained
   keyboard reachability and assistive-tech state:

     - `activeFocusOnTab` so Tab navigation lands on them.
     - `Keys.onSpacePressed` / `onReturnPressed` / `onEnterPressed`
       toggle the bound property.
     - `Accessible.role = CheckBox`, `Accessible.name` (e.g. "Godot
       shader"), `Accessible.checkable = true`, `Accessible.checked`
       bound to the live state. Screen readers now announce the
       checkbox kind, label, and on/off state.
     - Focus-visible border (highlight colour + 2 px) so the
       keyboard-focused checkbox is unambiguous.
     - Clicking the label or the box now also calls
       `forceActiveFocus()` on the checkbox, matching native
       labelled-CheckBox behaviour.

Stock `Controls.CheckBox` carries all of the above for free, but
its ~22 px height looks oversized in the tight inspector rows —
so we built the affordances back into the themed 14×14 Rectangle.
@sonarqubecloud
Copy link
Copy Markdown

@fernandotonon fernandotonon merged commit 15c9d1d into master May 20, 2026
20 checks passed
@fernandotonon fernandotonon deleted the feat/vat-panel-polish branch May 20, 2026 22:48
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