Repository navigation
fix(parameter-editor): keep bottom controls visible on short screens - #2190
amilcarlucas wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Multi-monitor sizing, geometry preservation, and existing initialization tests must be corrected.
2 open findings
What changed in this PR
Caps the parameter editor height and dynamically resizes its scrollable table.
Changes:
- Adds screen-height fitting.
- Recalculates table space during resizing and component-editor visibility changes.
| File | Description |
|---|---|
frontend_tkinter_parameter_editor.py |
Adds responsive window and parameter-area sizing. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| self.root.update_idletasks() | ||
| req_height = max(self.root.winfo_reqheight(), round(820 * self.dpi_scaling_factor)) | ||
| self.root.geometry(f"{round(990 * self.dpi_scaling_factor)}x{req_height}") | ||
| self._fit_window_to_screen_height() |
| """Size the editor to available screen height, leaving its table to scroll when needed.""" | ||
| self.root.update_idletasks() | ||
| requested_height = max(self.root.winfo_reqheight(), round(820 * self.dpi_scaling_factor)) | ||
| screen_height = self.root.winfo_screenheight() |
☂️ Code Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Test Results 3 files 3 suites 36m 12s ⏱️ Results for commit 9ca1bac. ♻️ This comment has been updated with latest results. |
Previous review (2026-10-10)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head I ran the real parameter editor window on this commit (4632a41) and on its base under Xvfb (Python 3.14.4, Tk 8.6.17, no window manager), walking through the steps of the diatone_taycan_mxc 4.5.x template. On a 1366x768 screen it does what the title says: the Skip button bottom moves from y=891 (off screen) to y=729. Four things need fixing first, though. Scalar The height cap ignores where the window is. ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1626 limits the height to the screen height minus 80 px, but the top edge stays where Nine existing tests fail. The window size is reset on every step. ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1628 now runs on each parameter-file change and sets the default width and a recomputed height. A window I resized to 1400x700 went back to 1031x854 on the next step, with or without a component editor; the base keeps the size. Applying the default size only at startup, and clamping later only when needed, would avoid that. Smaller points, none blocking. On a 768 px screen the Battery step leaves the parameter table 43 px (29 px once the padding is fixed) next to a 272 px component editor (ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1657); that is the trade-off this change chooses, but it may be worth letting the component editor scroll instead. Copilot's multi-monitor comment (ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1623) I could not confirm, as I could not set up two monitors here; by the code a larger Not tested: any real window manager (title bars, taskbars, maximised windows), Windows, macOS, real multi-monitor setups, HiDPI, and the rest of the test suite beyond this module's file. |
2cec54a to
3da33c4
Compare
Previous review (2026-10-10)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head This covers 3da33c4, which replaces the 4632a41 I reviewed before; nothing newer has been looked at. All four blockers from that review are fixed. I ran the real parameter editor window on this commit and on its base (66cf608) under Xvfb (Python 3.14.4, Tk 8.6.17), walking through the steps of the diatone_taycan_mxc 4.5.x template. With no window manager the Skip button is on screen on every step I measured (bottom at y=707 on 1366x768, 839 on 1600x900, 1019 on 1920x1080; base 891, 957, 1047), the button row keeps its full 45 px, the window no longer grows from step to step, and a window resized to 1400x700 or 1100x500 keeps its size. Running it under a window manager (jwm 2.4.6: 23 px title bar, 5 px borders, 40 px bottom panel) showed two new problems in the repositioning code, and both need fixing first. The reposition mixes frame and client coordinates on X11. ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1636 passes A maximised window is un-maximised on the next step. ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1632 issues Two smaller points, neither blocking. With CI is red on this commit, but pytest on macOS 3.14 and markdown-link-check fail on the base commit too, and the Ubuntu 3.10 pytest job appears to be seven 30 s setup timeouts in Not tested: any window manager other than jwm (the per-step drift is the frame's left border width, so it should be zero where that is zero), Windows, macOS, real multi-monitor setups, HiDPI beyond the 1.04 factor Xvfb reports, interactive drag resizing, translated phase labels, and the rest of the test suite beyond this module's file. |
3da33c4 to
a283143
Compare
Previous review (2026-10-11)Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head This covers a283143, which replaces the 3da33c4 I reviewed before; nothing newer has been looked at. Both blockers from that review are fixed. I ran the real parameter editor window on this commit, on its base (66cf608) and on the previous head under Xvfb (Python 3.14.4, Tk 8.6.17), walking through the steps of the diatone_taycan_mxc 4.5.x template. Under jwm and icewm the window now stays put over eight step changes on 1366x768 and 1600x900 (the previous head, run the same way, still drifts 5 px a step), with the Skip button bottom at y=704 to 707 on a 768 px screen. A maximised window stays maximised and a window moved to the top edge stays there. The two smaller points are dealt with too: in normal mode the table refits when the phase labels wrap, and the Battery step on a 768 px screen has a 125 px table beside a 175 px scrolling component editor. The scrolling component editor brings one new problem, which needs fixing first. A rebuilt component editor is clipped to a 28 px strip when its height has not changed. ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1738 only calls One smaller point, not blocking. ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1733 gives the component editor only what is left once the table has its 120 px, down to 1 px. In a window resized to 1100x500 the Battery step leaves the component container 1 px high beside a 115 px table (the previous head gave it 181 px), and on a 1024x600 screen, where the window is 516 px high, every component step is asked for 7 px. From 1280x720 up it is fine: Battery gets 127 px there and 175 px on 1366x768. This still beats the base, where the buttons are off screen at these sizes, but a small minimum for the component editor, or sharing what is left between the two, would keep both usable in a short window. CI on this commit is red only for pytest on macOS 3.14 and the Publish Tests Results job that depends on it, and both fail on the base commit too: the macOS job dies with exit code 133 at Not tested: Windows and macOS at run time (the |
8328cd6 to
0fc73ac
Compare
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head This covers 0fc73ac, which replaces the a283143 I reviewed before (rebased onto 80134be); nothing newer has been looked at. Both points from that review are fixed. I ran the real parameter editor window on this commit, on its base and on the previous head under Xvfb (Python 3.14.4, Tk 8.6.17), with no window manager and under jwm, walking steps of the diatone_taycan_mxc 4.5.x template. The clipped component editor is gone: There is one problem that needs fixing first, and I missed it last time: it is on the previous head too, because my earlier walk did not register the plugins. On steps with a left-hand plugin pane the parameter table is squeezed to 2 px. Going to One smaller point, not blocking. The plugin shares the height that ardupilot_methodic_configurator/frontend_tkinter_parameter_editor.py:1754 gives the table container, and the AHRS orientation assistant on CI on this commit is red only for pytest on macOS 3.14 and the Publish Tests Results job that depends on it. The macOS job passes all 143 tests of the changed file and then dies with exit code 133 at Not tested: Windows and macOS at run time (the |
0fc73ac to
3d27c8b
Compare
Cap the editor window to the active monitor's usable height and reposition it when needed, accounting for its current offset. Preserve the user's window size across parameter steps, while clamping it if it exceeds the monitor bounds. Calculate the parameter table's remaining space after fixed controls, counting symmetric Tk padding on both sides. Recalculate when the window resizes or an inline component editor appears or disappears, keeping the bottom navigation and upload buttons visible while the table scrolls. Add regression coverage for scalar, tuple, and string padding; short and offset monitors; HiDPI sizing; and preserving manually resized windows. Update Tk test fixtures to provide realistic layout dimensions and monitor bounds. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Flush pending idle geometry before constraining a rebuilt parameter area so the horizontal PanedWindow can allocate width to both panes. Guard against re-entrant resize callbacks during the flush. Add real-widget regression coverage for revisiting left-plugin steps at multiple window sizes, including the disconnected-controller placeholder and bottom-button visibility. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Let the component editor yield height to a left-side plugin based on the plugin's requested height, preserving more space for plugin controls. Wrap the AHRS orientation assistant in a scroll frame so its Continue button remains reachable when the available pane is shorter than the assistant's content. Add regression coverage for plugin height allocation and scrolling the AHRS assistant in a short pane. Signed-off-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
3d27c8b to
9ca1bac
Compare
Coverage Report for CI Build 38180608229Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Warning No base build found for commit Coverage: 91.562%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats💛 - Coveralls |


Description
Cap the parameter editor window height to the available screen height and size the parameter area to the space remaining after fixed controls, including the bottom button row.
Recalculate the parameter area when the window is resized or an embedded component editor is shown or hidden, allowing the parameter table to scroll instead of pushing the buttons off-screen.
Checklist
git commit --signoff)Testing
Describe how you tested these changes: