Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New component]: Reorder List #5445

Open
JanOstrowka opened this issue Jan 17, 2025 · 3 comments
Open

[New component]: Reorder List #5445

JanOstrowka opened this issue Jan 17, 2025 · 3 comments
Labels
Priority: High Should be addressed within current iteration Tier: Apps WG: Validated Validate working group proposals

Comments

@JanOstrowka
Copy link

Visual

Interactive demo

Drag and drop
Drag and drop


Priority adjustment interface
priority adjustment interface

Text reorder
text reorder

Context

The Reorder List component is designed for scenarios requiring manual prioritization or ordering of items through drag-and-drop interaction or numerical priority adjustment. It's particularly useful when:

  • Users need to manage priority-based lists
  • Sequential ordering of items is required
  • Bulk reordering of items is necessary
  • Precise numerical priority assignment is needed

Example use case: Organizing employee groups by priority to resolve conflicts when assigning Autoinstall files, with items sorted from highest priority (lowest number) to lowest.

State

Default state

  • Displays ordered list with drag handles and priority numbers
  • Shows plus/minus controls for numerical adjustment

Hover states

  • Drag handle hover: cursor changes to grabbing pointer
  • Row hover: background highlight
  • Plus/minus button hover: visual feedback

Drag state

  • Active background color
  • Smooth animation during position changes
  • Visual feedback for new position

Focus state

  • Input field focus for direct number entry
  • Maintained focus after reordering

Progressive enhancement

Small screen considerations

  • Maintains full functionality on mobile devices
  • Touch-friendly drag handles
  • Appropriately sized touch targets for plus/minus controls
  • Responsive safe area for automatic scrolling

Browser compatibility

  • Uses native HTML5 Drag-and-Drop API for reliable performance
  • Fallback to manual priority input on unsupported browsers

Accessibility features

  • Keyboard navigation support
  • ARIA labels for interactive elements
  • Focus management for form controls

Technical specifications

Safe Area

Safe Area

  • Implements automatic scrolling when dragged items approach viewport boundaries
  • Maintains visibility of manipulated items

Priority Management

  • Automatic reordering based on priority values
  • Handles out-of-range values by adjusting to valid range
  • Maintains list integrity during priority updates

Interactions

  • Smooth transitions (0.2s) for position changes
  • Focus retention during and after operations
  • Automatic scrolling for off-screen updates
  • Invalid input prevention and correction
@JanOstrowka JanOstrowka added the WG: Proposal Working group proposals label Jan 17, 2025
Copy link

Thank you for reporting your feedback to us!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-18295.

This message was autogenerated

@danielmutis danielmutis added Priority: High Should be addressed within current iteration WG: Validated Validate working group proposals Tier: Apps and removed WG: Proposal Working group proposals labels Jan 22, 2025
@danielmutis
Copy link

From triage:

  • This will also be needed in MAAS site manager. That means the request meets the requirement to be used in more than one place.
  • Relevant tier: Apps
  • Priority: high. The component is needed to complete work this cycle.

@jmuzina
Copy link
Member

jmuzina commented Jan 22, 2025

Per @JanOstrowka :

This is currently being worked on by the Landscape UI team, chiefly @rubinaga .

Landscape UI team is contributing this component directly to their tier for the short term, after which it can be upstreamed to the DS tier (Vanilla for any CSS changes, React Components for business logic) so that it can be shared across projects. More confirmation on this to come after Landscape UI team meeting tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Should be addressed within current iteration Tier: Apps WG: Validated Validate working group proposals
Projects
None yet
Development

No branches or pull requests

3 participants