Skip to content

PDFileModal, PDFileExplorer: an even, aligned layout, a line under the toolbar, and button size and cancel icon settings - #366

Merged
rolandbanks merged 1 commit into
mainfrom
feature/file-dialog-polish
Nov 13, 2026
Merged

rolandbanks merged 1 commit into
mainfrom
feature/file-dialog-polish

Conversation

@rolandbanks

Copy link
Copy Markdown
Contributor

Why

The file dialog looked "not great" in every app that uses it: no line between the toolbar and the folders, the toolbar's line (once added) squashed against the buttons because the toolbar box was a fixed 50px around 54px of content, uneven spacing from the modal's body padding, panes that stopped short of the footer, and a splitter bar that stayed light grey in dark themes.

What changed

Layout (measured in the demo, Report Picker / Custom Open / restricted dialogs and the explorer page)

  • Title, first toolbar button and top folder line up 1rem in (17px from the dialog's edge); the last toolbar button and the last footer button end 17px in.
  • 8px above and below the toolbar's buttons; the top folder sits 8px below the separator, or below the header line when there is no toolbar.
  • The splitter runs from the separator (or the header line) to the footer line.
  • Outside the dialog, the explorer's top folder lines up with the toolbar's first button (8px).

New, all with defaults that keep today's look where nothing is set

  • PDFileModal.ButtonSize (default Medium): every button in the dialog, the explorer's toolbar included.
  • PDFileModal.CancelButtonIconCssClass (default fas fa-fw fa-times): Cancel, and No on the overwrite confirmation.
  • --pd-file-explorer-toolbar-border: the line under the explorer's toolbar, on by default; none leaves it out.

Defaults that change

  • A line under the explorer's toolbar (opt out with the variable above).
  • The explorer's toolbar sizes to its content; the splitter takes the remaining height (no more calc(100% - 50px)).
  • The tree gets 0.5rem of top padding.
  • In PDFileModal, the body has no padding (p-0).
  • PDSplitter's bar defaults to var(--bs-border-color, #eee) rather than #eee; --pd-splitter-gutter-bg still overrides it.
  • PDToolbar: a hidden first item no longer leaves the next item indented.

main.css and main.min.css were updated by hand to match main.scss, as the Web Compiler extension was not available.

Testing

  • PanoramicData.Blazor.slnx builds with no errors.
  • All 4,803 tests pass, including two new PDFileModalTests (defaults unchanged; ButtonSize reaches the toolbar, footer and confirmation, and the cancel icon reaches Cancel and No).
  • Checked in the demo at /pdfilemodals and /pdfileexplorer by measuring element positions in the browser, in the dark theme.

…e toolbar, and button size and cancel icon settings

- PDFileExplorer: a line under the toolbar, on by default, drawn with --pd-file-explorer-toolbar-border (set it to none to leave it out)
- PDFileExplorer: the toolbar is as tall as its buttons, and the splitter takes the height left, instead of both assuming 50px
- PDFileExplorer: the top folder sits 0.5rem below what is above it and lines up with the toolbar's first button
- PDFileModal: no body padding, so the panes run edge to edge, from the separator or the header line down to the footer line; the toolbar and the top folder line up with the title and the footer's buttons, 1rem in
- PDFileModal: ButtonSize (default Medium) sets every button in the dialog, the explorer's toolbar included, and CancelButtonIconCssClass (default fas fa-fw fa-times) the icon on Cancel and on the overwrite confirmation's No
- PDSplitter: the bar defaults to the theme's border colour (--bs-border-color), still overridable with --pd-splitter-gutter-bg
- PDToolbar: a hidden first item, such as an Up button turned off, no longer leaves the next item indented
- Demo and documentation for the new settings and the styling variable; bUnit tests for the defaults and the new settings
@rolandbanks
rolandbanks merged commit 7ef09f3 into main Nov 13, 2026
3 of 4 checks passed
@rolandbanks
rolandbanks deleted the feature/file-dialog-polish branch November 13, 2026 02:40
@codacy-production

codacy-production Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 4 minor

Alerts:
⚠ 4 issues (≤ 0 issues of at least minor severity)

Results:
4 new issues

Category Results
CodeStyle 4 minor

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.00% coverage variation

Metric Results
Coverage variation ✅ +0.00% coverage variation
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (96ff528) 19400 19269 99.32%
Head commit (fc53d9a) 19406 (+6) 19275 (+6) 99.32% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#366) 6 6 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

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