Repository navigation
refactor(web): use pavo fields, tables and switch instead of raw elements - #40
Open
TheMeinerLP wants to merge 2 commits into
Open
TheMeinerLP wants to merge 2 commits into
TheMeinerLP wants to merge 2 commits into
Conversation
…ents Material 3 is mandatory for OLF UIs. The raw select, input and table elements looked and behaved differently from the rest of the app, so the instance and event pages, the pool pages and the scaling form now use M3Select, M3TextField, M3DataTable and M3Switch. The instance list keeps its default order and sorts by name; the URL sort parameters and the age sort are no longer applied to the table. Add web/app/m3-only.test.ts, which fails when a page or component template contains a raw input, select, textarea or table tag. Allow dotted v-slot names in the lint config, because Pavo's DataTable names its cell slots item.<column>.
…avo 0.3 Pavo 0.3.0 adds controlled sorting, server-side ordering, paging switches and row attributes to the data table. Use them to bring back the behaviour the pavo 0.2.0 tables lost: - instances: name and age sort through the sort and dir query parameters again; the page keeps its own ordering (server-sort) - instance, pool instance, event and pool tables render all rows without a footer, as they did before - row data-test hooks (instance-row, pool-row, pool-instance-row, event-row) are set again through row-attrs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Material 3 is mandatory for every OLF UI. Several Grus screens still used raw
select,inputandtableelements, which look and behave differently from the rest of the app: different focus rings, different labels, no shared sorting or empty states. Moving between the overview and the pool or instance pages therefore feels like switching between two apps.What changed
M3Select; the table isM3DataTable. Links to the instance detail page sit in the cell slots. The table is shown only when there are rows, so the empty state is unchanged.M3TextField(monospace viainput-class). The send button and itsdata-testattributes are untouched.M3TextField; the live log is anM3DataTablewith the same four columns. The raw<details>view stays in the summary cell.M3DataTable. The scaling form usesM3TextFieldper field, keeping the numeric input types,inputmode,step,minandmax, and the existing error and hint texts.M3Switchlabelled with the maintenance text and bound topool.maintenance. Toggling it only opens the existing confirm dialog; the switch follows the server state after a confirmed change, and a cancel leaves it where it was.Tests
web/app/m3-only.test.tsreads every.vuefile underapp/pagesandapp/componentsand fails when a template contains a rawinput,select,textareaortabletag. It was checked once against a deliberately raw file.eslint.config.mjsallows dottedv-slotnames, because Pavo's DataTable names its cell slotsitem.<column>.Remaining differences from the Pavo table
Pavo 0.3.0 brought back URL sorting, row attributes, placeholders and unpaged tables. What still differs:
data-testhooks on the header buttons (sort-name,sort-age) are not passed through by the component; the row hooks are.Stacking
This PR is stacked on #39 (
refactor/web-pavo) and targets that branch. Merge it after #39.