Repository navigation
fix(fields): stack the entity tabs above the fields and floor the name column on phones - #290
Merged
Merged
Conversation
…e column on phones
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.
On a phone, the custom fields screen now puts the entity tabs in a scrollable row above the fields, and the field name column stays at least 10rem wide. Before, the vertical tabs sat beside the table and left it about 140px. Inside that, the name column was the
1frtrack beside three capped tracks, so the 600px scroll width gave it about 90px and names truncated to a few letters.What changed
resources/views/filament/pages/custom-fields-management.blade.php(flat layout, sections disabled): the wrapper isflex-colbelowmdandflex-rowfrommd. The entity tabs render twice: a horizontalx-filament::tabsshown belowmd, and the existing vertical one shown frommd. Both bind the samesetCurrentEntityTypeclick.resources/views/livewire/manage-fields-table.blade.php: the name track isminmax(10rem,1fr)instead of1frin the header, active and archived rows.resources/dist/custom-fields.cssis rebuilt. It only gains the new utilities (239 bytes).Why this way
Filament's tabs component takes
verticalas a render-time prop, so one list cannot switch orientation by breakpoint without overriding Filament's.fi-tabs.fi-verticalCSS. Two lists withmd:hidden/hidden md:blockkeep the change inside this package's own markup. The hidden list isdisplay: none, so assistive technology meets only one.The name floor keeps the existing 600px scroll width: the capped tracks fill their headroom first, and the name never drops below 160px. Relaticle currently patches both problems from its own theme with selectors on this package's markup. That workaround can go once this ships.
Behavior to know about
Tests
None added. This is a layout-only change and the package has no browser suite. Relaticle's
tests/Browser/Workspaces/CustomFieldsBrowserTest.phpcovers the phone layout end to end.Checked
On
e4368fd8: Pint passes and the suite runs 1123 tests green (3 todos). I loaded these views into Relaticle with its theme workaround removed and measured the page in Chromium and WebKit:Not checked
Rector and PHPStan run in CI. Switching entities by tapping a tab in the phone row was not clicked through; it uses the same
wire:clickas the desktop list.