Skip to content

fix(layout): anchored EmptyState inside a Column broke PreviewPanel layout permanently - #19

Open
nocstah wants to merge 2 commits into
Percius04:masterfrom
nocstah:fix/empty-state-outside-column
Open

fix(layout): anchored EmptyState inside a Column broke PreviewPanel layout permanently#19
nocstah wants to merge 2 commits into
Percius04:masterfrom
nocstah:fix/empty-state-outside-column

Conversation

@nocstah

@nocstah nocstah commented Aug 21, 2026

Copy link
Copy Markdown

Fixes #17.

EmptyState positions itself with anchors.centerIn, and an anchored child inside a positioner doesn't just misplace itself — Qt logs "QML Column: Cannot specify … centerIn anchors for items inside Column. Column will not function." and the Column permanently stops laying out its children.

Two call sites had the construction:

  • PreviewPanel: once "No file selected" had been shown even once, every later text preview rendered its Flickable at y:0, painting the file's first line on top of the filename header (reproducible headless with a plain qml runner).
  • CommandPalettePanel: same construction — it's the source of the warning printed on every single launch.

Both EmptyStates are now siblings of their Column, visually unchanged (still centered on the column / on the list).

Verified: --selfcheck 146/146 on this branch, and the launch warning is gone from the journal.

🤖 Generated with Claude Code

nocstah and others added 2 commits August 21, 2026 12:13
…ewPanel, CommandPalettePanel)

EmptyState positions itself with anchors.centerIn, and an anchored child
inside a positioner doesn't just misplace itself -- Qt logs "QML Column:
Cannot specify ... centerIn anchors for items inside Column. Column will
not function." and the Column PERMANENTLY stops laying out its children.

In PreviewPanel that meant: once "No file selected" had been shown even
once, every later text preview rendered its Flickable at y:0, painting the
file's first line on top of the filename header (reproducible headless).
CommandPalettePanel had the same construction -- it printed that warning on
every single launch.

Both EmptyStates are now siblings of their Column, centered on it / on the
list as before. Selfcheck: 146/146, and the launch warning is gone.

Fixes Percius04#17

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…non-sibling list

anchors.centerIn only accepts a parent or sibling; centerOn: paletteList
survived the move out of the Column and logged "Cannot anchor to an item
that isn't a parent or sibling" at startup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
nocstah added a commit to nocstah/omafiles that referenced this pull request Aug 21, 2026
…alog

The moment you most need a new folder is mid-save, realizing the
destination doesn't exist yet -- macOS save dialogs have had the button
forever. Ours:

- a compact "+ <folder-glyph>" button in the picker bar (save-file and
  open-dir modes only; an open-file picker has no business creating dirs),
  Accessible.name keeps the words
- Ctrl+Shift+N also works while the NAME FIELD holds focus (mirrors the
  default new_folder binding, the way Cmd+Shift+N works in a macOS dialog)
- both routes open the same inline creation row the rest of the app uses,
  which already renders above the picker bar
- the created folder is ENTERED automatically in picker mode (it's the
  destination), via the existing native-mkdir completion hook
- focus then returns to the name field (Qt.callLater, after the input
  row's own hand-off-to-list) so Enter saves right there

Also fixes a follow-up to the EmptyState-out-of-Column change: the moved
palette EmptyState still anchored centerIn on the non-sibling list and
logged "Cannot anchor to an item that isn't a parent or sibling" -- it
centers on the Column now (upstream PR Percius04#19 updated with the same fix).

Verified end-to-end against the real portal flow: picker payload over the
single-instance socket, Ctrl+Shift+N from the name field, typed name,
Enter -> folder created on disk and entered.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

PreviewPanel: anchored EmptyState inside the layout Column permanently breaks the preview once "No file selected" is shown

1 participant