Skip to content

ui: migrate admin partitions pages to HDS - #23839

Open
suresh-hashicorp wants to merge 3 commits into
suresh/intentions-hds-migrationfrom
suresh/admin-partition-hds-migration
Open

ui: migrate admin partitions pages to HDS#23839
suresh-hashicorp wants to merge 3 commits into
suresh/intentions-hds-migrationfrom
suresh/admin-partition-hds-migration

Conversation

@suresh-hashicorp

Copy link
Copy Markdown
Contributor

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 HDS

  • 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.

ui: fix nav-selector dropdown overflow for large partition/nspace/dc lists

  • Add @height='300px' to the Hds::Dropdown in NavSelector so the content panel gets a max-height, making items below the viewport fold reachable via scroll.

ui: migrate admin partition edit/create page to HDS

  • 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 with layout overrides to suppress legacy global rules and align with HDS spacing.
  • Change page title from Edit <name> to raw partition name.

Files Changed

  • app/components/consul/data-table/index.scss
  • app/components/consul/partition/form/index.hbs
  • app/components/consul/partition/form/index.js
  • app/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.js
  • app/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.hbs
  • app/styles/components.scss
  • app/templates/dc/partitions/edit.hbs
  • app/templates/dc/partitions/index.hbs

- 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
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