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

Unable to have an Ordered and Plain List Using the List Component #512

Open
johglove opened this issue Jan 24, 2025 · 1 comment
Open

Unable to have an Ordered and Plain List Using the List Component #512

johglove opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@johglove
Copy link
Contributor

The List component variant property allows for 3 settings 'ordered', 'unordered' or 'plain' with 'unordered' being the default and only 1 value accepted. However this controls 2 different changes in the component. Unordered and Ordered dictate the element of the container 'ul' vs 'ol' with 'ul' as default. Plain simply adds an additional className value of 'rvt-list-plain'. Possible combinations:

  1. ul with no class added (variant='unordered')
  2. ul with rvt-list-plain added (variant='plain')
  3. ol with no class added (variant='ordered')
  4. ol with rvt-list-plain added (Not Possible)

Current work around would be ordered variant with className manually set but is not user friendly and with description list already split out the value of using the component is already minimal.

@basham
Copy link
Member

basham commented Jan 24, 2025

This issue should also include consideration of the rvt-list-inline class.

What if these are the values (and the result) for the variant prop?

  • description (dl.rvt-list-description)
  • ordered (ol.rvt-list)
  • ordered-inline (ol.rvt-list-inline)
  • ordered-plain (ol.rvt-list-plain)
  • unordered (ul.rvt-list)
  • unordered-inline (ul.rvt-list-inline)
  • unordered-plain (ul.rvt-list-plain)

Also, I see a rvt-list-reset class. I've never used it. It is not documented, so maybe we shouldn't support it. But if we would add it, maybe we'd need these, too?

  • ordered-reset (ol.rvt-list-reset)
  • unordered-reset (ul.rvt-list-reset)

I could see later contributing a new key/value variant for description lists (whatever it would be called). So, that could be added like:

  • description-key (dl.rvt-list-description-key)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants