Skip to content

[GUI] Align pop_export checkboxes and edit boxes - #717

Merged
arnodelorme merged 2 commits into
developfrom
agent/issue-706
Nov 27, 2026
Merged

arnodelorme merged 2 commits into
developfrom
agent/issue-706

Conversation

@claude

@claude claude Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

The six checkbox rows of pop_export use [3 0.7 0.8 0.6] and the two edit rows [3 1.5 0.3 0.3], with columns sized by weight, so checkboxes and edit boxes start at the same x. The window is 852 pixels wide and shows the missing Help button. A Qt test checks the left edges and the Help button.

Captures (EEGLAB, before, after) and tests: https://github.com/adelorme-assistant/project_eegprep/blob/main/reports/pr-706/issue-706_before_after.pdf (Word: https://github.com/adelorme-assistant/project_eegprep/blob/main/reports/pr-706/issue-706_before_after.docx)

Fixes #706
Part of #740

Every checkbox row now shares one geometry and both edit rows share a
geometry with the same row total and lead weight, so the second column
starts at the same x. Fixes #706.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@claude

claude Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @claude[bot]'s task in 1m 18s —— View job


Code review

  • Pre-review gate (open, not draft, no earlier review, HEAD d588c19 is the PR head)

  • Read AGENTS.md / CLAUDE.md

  • Reviewed the diff, the Qt renderer layout path, the help resource and the test

  • Posted the review

  • Overall assessment: The change is small and the Help button part is correct. help_text="pophelp('pop_export')" matches other dialogs, and src/eegprep/resources/help/pop_export.md exists. The alignment fix may not address the real cause, and it moves the edit rows away from EEGLAB's geometry.

  • Highest-risk area: The geometry of the edit rows in pop_export_dialog_spec.

  • Merge recommendation: Needs changes.

Blocking

None.

Important

  • src/eegprep/functions/popfunc/pop_export.py:114: the edit rows changed from [3, 2, 0.05, 0.05] to [3, 1.5, 0.3, 0.3]. Both versions add up to 5.1, the same as the checkbox rows. With weights alone, the edit column already started at the same x, so this change narrows the precision and expr boxes compared with pop_export.m without fixing anything.
    • The misalignment more likely comes from the renderer's default path (qt.py:245-254). There, each widget keeps its own size policy, so long labels push the column-2 position by an amount that depends on the font.
    • Suggested fix: keep the original edit-row geometry and set weighted_columns=True on the spec, as pop_importevent, pop_erpimage, pop_importepoch and pop_editoptions do. Column positions then come only from the weights. Details are in the inline comment.

Nits

None.

Test gaps

None. test_pop_export_dialog_aligns_checkboxes_and_edits_and_shows_help checks what users see: the left edges of the controls and the Help button.

EEGLAB parity notes

  • The EEGLAB reference tree (src/eegprep/eeglab/) is not checked out on this runner, so I could not quote pop_export.m lines 77-99 directly. The parity concern above is based on the geometry that the spec cited before this PR.
  • As the PR body says, the before/after captures next to EEGLAB on jamming, which issue pop_export window: checkboxes not aligned vertically in EEGPrep #706 requires, are still missing.

Not done

I couldn't run pytest or gh pr checks because both commands were denied in this run. The new offscreen Qt test has therefore not been run. Since it checks exact pixel equality, check its CI result.

[3, 2, 0.05, 0.05],
[3, 2, 0.05, 0.05],
*[[3, 0.7, 0.8, 0.6]] * 6,
*[[3, 1.5, 0.3, 0.3]] * 2,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Important (EEGLAB parity / root cause): The old edit rows [3, 2, 0.05, 0.05] already added up to 5.1, the same as [3, 0.7, 0.8, 0.6]. With weights alone, column 2 already started at the same x. So shrinking the edit width from 2 to 1.5 doesn't explain the misalignment. It also makes the precision and expr boxes narrower than in the geometry this spec was built from (pop_export.m lines 77-99).

The misalignment most likely comes from the non-weighted renderer path (

continue
stretch = max(1, round(float(weight) * 100))
if control.style.lower() == "spacer":
row_layout.addStretch(stretch)
elif control.style.lower() == "textarea":
row_layout.addWidget(widget, stretch)
added_visible_widget = True
else:
row_layout.addWidget(widget, stretch, qt_core.Qt.AlignVCenter)
added_visible_widget = True
). That path gives QHBoxLayout stretch factors but keeps each widget's own size policy. Long labels such as "Apply an expression to the output (see 'expr' help):" have a minimum width from their size hint, so each row's column-2 x depends on the font, not just the weights.

Suggested fix: keep EEGLAB's original geometry for the edit rows and set weighted_columns=True on this DialogSpec, as pop_importevent, pop_erpimage and others do. That path sets each widget's horizontal policy to Ignored, so column positions come only from the weights (

widgets[control.tag] = widget
if spec.weighted_columns:
widget.setSizePolicy(qt_widgets.QSizePolicy.Ignored, widget.sizePolicy().verticalPolicy())
row_layout.addWidget(widget, _supergui_stretch(weight, sum(weights), most_columns))
added_visible_widget = added_visible_widget or control.style.lower() != "spacer"
index += 1
continue
). Whether the checkbox rows should stay [1.7, 0.25, …] or become [3, 0.7, 0.8, 0.6] should then follow pop_export.m. The new left-edge test will check either choice.

@arnodelorme

Copy link
Copy Markdown
Collaborator

🤖 Captures: EEGLAB, EEGPrep before and EEGPrep after, taken on jamming under a virtual screen.

pop_export window

pop_export window

@arnodelorme

Copy link
Copy Markdown
Collaborator

The bot suggested going back to EEGLAB's edit row geometry [3 2 0.05 0.05] and turning on weighted columns. Weighted columns were already turned on in commit aaaf321, after the bot's review. I tried the geometry it suggested, and the expression box then starts 30 pixels to the left of the checkboxes (x=506 instead of 536), so the alignment test fails. The [3 1.5 0.3 0.3] rows of this pull request are needed for the alignment Arno asked for in issue 706. The bot's sum argument also misses that EEGLAB's checkbox rows [1.7 0.25 0.7 0.6] add up to 3.25, not 5.1.

No code change. The 28 tests of tests/test_stream10_export_bids.py pass offscreen on macOS, the alignment and Help test included, and CI is green.

— orchestrator

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.

pop_export window: checkboxes not aligned vertically in EEGPrep

1 participant