spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

Finalize Tree View implementation.

Open Westbrook opened this issue 3 years ago • 5 comments
trafficstars

Description

This has had a prerelease at https://www.npmjs.com/package/@spectrum-web-components/tree-view.

In that this has been pre-released already, I think it makes sense to get it into a more official "beta" situation and add it to the library for tighter scrutiny. If that makes sense as a path forward, I can update the Golden Images here so that CI should pass.

  • add Tree View pattern, previously review at #1478
  • add Tree View multi-select support #1423
  • add docs
    • https://westbrook-treeview--spectrum-web-components.netlify.app/components/tree-view/
    • https://westbrook-treeview--spectrum-web-components.netlify.app/components/tree-view-heading/
    • https://westbrook-treeview--spectrum-web-components.netlify.app/components/tree-view-item/
  • add tests
  • prep for release
  • based on https://www.w3.org/TR/wai-aria-practices-1.2/#TreeView

Related issue(s)

  • fixes #1222

Motivation and context

Spectrum coverage

How has this been tested?

  • [ ] Test case 1
    1. Go here
    2. Experiment with the demos
    3. Compare their functionality to https://www.w3.org/TR/wai-aria-practices-1.2/#TreeView

Types of changes

  • [x] New feature (non-breaking change which adds functionality)

Checklist

  • [x] I have signed the Adobe Open Source CLA.
  • [x] My code follows the code style of this project.
  • [x] If my change required a change to the documentation, I have updated the documentation in this pull request.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

Westbrook avatar May 09 '22 12:05 Westbrook

A details slot (just after the label) will allow to add some details/actions to the item. Some examples include:

File size

tree-details-1

Favorites/Bookmarks

tree-details-2

Adding the content directly into the default slot (which is label) makes it almost impossible to align, so a dedicated slot would be very helpful.

sorinsarca avatar May 27 '22 16:05 sorinsarca

A details slot (just after the label) will allow to add some details/actions to the item. Some examples include:

This seems like a good idea, but it not likely to be part of an initial shipment of this pattern as it is not represented upstream in the Spectrum Design spec. We'll raise this with their team and see whether they are interested in pursuing this.

Westbrook avatar May 27 '22 16:05 Westbrook

I see that there is now an optional Actions area to which I referred as "details" slot. I don't know if it was there from the beginning.

sorinsarca avatar Jul 18 '22 10:07 sorinsarca

@sorinsarca the upstream spec changing a good amount is one of many reasons work here has paused. It’s not likely we will return to this until late August to September when there is updated input from the design and CSS teams.

Westbrook avatar Jul 18 '22 10:07 Westbrook

Will reopen with upcoming CSS changes.

Westbrook avatar Apr 03 '23 13:04 Westbrook

@Westbrook any plans to reopen if the above issues are resolved?

ranjeet-choudhary avatar Nov 09 '23 04:11 ranjeet-choudhary

@ranjeet-choudhary ~Hi! CSS team has migrated this component to Core Tokens, but the previous issues still need to be addressed as of 23 days ago. I just followed up with @pfulton on the status of this.~

UPDATE: The CSS team JUST released a new version of the TreeView CSS which includes several bug fixes and enhancements! :)

najikahalsema avatar Nov 09 '23 21:11 najikahalsema

Thanks @najikahalsema! We released several fixes for our implementation of Tree View today.

You can view the latest docs here and also see the component in action in our Storybook.

pfulton avatar Nov 09 '23 22:11 pfulton