ui: migrate admin partitions pages to HDS - #23839
Open
suresh-hashicorp wants to merge 3 commits into
Open
Conversation
- Add Consul::Partition::List::Table component wrapping Consul::DataTable with Name (sortable), Description, and Actions columns. Delete confirmation uses Hds::Modal matching the intentions table pattern. - Add Consul::Partition::Toolbar component wrapping Consul::ListToolbar with a sort dropdown (A→Z / Z→A) in the quickFilters slot. - Update dc/partitions/index.hbs: replace SearchBar + ListCollection-based list with the new table and toolbar; update empty-state docs link to Hds::Link::Standalone. - Update partition/list/test-support.js selectors to reference HDS table rows (data-test-tabular-row) and the new component class name. - Import new SCSS files in app/styles/components.scss. - Fix cursor: pointer leaking onto all HDS table rows from the legacy %table rule; reset to cursor: default on .hds-table__tr so the pointer only appears over the clickable link cell.
…lists Add @height='300px' to the Hds::Dropdown in NavSelector so the content panel gets a max-height. The hds-dropdown__list <ul> already has overflow-y:auto in the HDS base styles; without a bounded container height the list grew to its full content height, making items below the viewport fold unreachable. The fix applies consistently to the partition, namespace, and datacenter selectors since they all share NavSelector.
- Replace legacy TextInput with Hds::Form::TextInput::Field for Name
and Description fields; remove StateChart/validate wiring
- Fix button layout: Save+Cancel (Hds::ButtonSet) on left, Delete
(critical) on right via space-between flex
- Replace legacy ConfirmationDialog+DeleteConfirmation with Hds::Modal
(matches Figma and list/table pattern); add form component JS to hold
isConfirmingDelete tracked state
- Add partition/form/index.scss:
- Suppress %app-view-title border-bottom under heading via :has()
- Zero out form margin-top (layout.scss global edit/create rule)
- Zero out fieldset border, padding-bottom, margin-bottom
(app-view/skin and app-view/layout legacy rules)
- 16px gap between stacked HDS form fields
- space-between actions row and muted (Optional) label style
- Register consul/partition/form in components.scss
- Change page title from 'Edit <name>' to raw partition name
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.
Summary
Migrates the Admin Partitions list and edit/create pages to HashiCorp Design System (HDS) components, continuing the HDS migration started in the intentions branch.
Changes
ui: migrate admin partitions list page to HDSConsul::Partition::List::Tablecomponent wrappingConsul::DataTablewith Name (sortable), Description, and Actions columns. Delete confirmation usesHds::Modalmatching the intentions table pattern.Consul::Partition::Toolbarcomponent wrappingConsul::ListToolbarwith a sort dropdown (A→Z / Z→A) in thequickFiltersslot.dc/partitions/index.hbs: replaceSearchBar+ListCollection-based list with the new table and toolbar; update empty-state docs link toHds::Link::Standalone.partition/list/test-support.jsselectors to reference HDS table rows (data-test-tabular-row) and the new component class name.app/styles/components.scss.cursor: pointerleaking onto all HDS table rows from the legacy%tablerule; reset tocursor: defaulton.hds-table__trso the pointer only appears over the clickable link cell.ui: fix nav-selector dropdown overflow for large partition/nspace/dc lists@height='300px'to theHds::DropdowninNavSelectorso the content panel gets a max-height, making items below the viewport fold reachable via scroll.ui: migrate admin partition edit/create page to HDSTextInputwithHds::Form::TextInput::Fieldfor Name and Description fields; removeStateChart/validate wiring.Hds::ButtonSet) on left, Delete (critical) on right via space-between flex.ConfirmationDialog+DeleteConfirmationwithHds::Modal(matches Figma and list/table pattern); add form component JS to holdisConfirmingDeletetracked state.partition/form/index.scsswith layout overrides to suppress legacy global rules and align with HDS spacing.Edit <name>to raw partition name.Files Changed
app/components/consul/data-table/index.scssapp/components/consul/partition/form/index.hbsapp/components/consul/partition/form/index.jsapp/components/consul/partition/form/index.scss(new)app/components/consul/partition/list/table/index.hbs(new)app/components/consul/partition/list/table/index.js(new)app/components/consul/partition/list/table/index.scss(new)app/components/consul/partition/list/test-support.jsapp/components/consul/partition/toolbar/index.hbs(new)app/components/consul/partition/toolbar/index.js(new)app/components/consul/partition/toolbar/index.scss(new)app/components/nav-selector/index.hbsapp/styles/components.scssapp/templates/dc/partitions/edit.hbsapp/templates/dc/partitions/index.hbs