carbon icon indicating copy to clipboard operation
carbon copied to clipboard

feat(treeview): add experimental controllable API

Open janhassel opened this issue 1 year ago • 3 comments

Ref #14451 / Point 1

This PR introduces an experimental controllable API for the TreeView to address point 1 mentioned in above linked discussion.

A user must opt-in via the feature flag enable-treeview-controllable.

Changelog

New

  • feature flag enable-treeview-controllable
  • TreeView props.onActivate to pass-through node's onToggle events
  • TreeNode props.defaultIsExpanded for uncontrolled mode

Changed

  • With above mentioned feature flag, the states selected and active can be controlled or uncontrolled based on the user's choice

Testing / Reviewing

  • Storybook
  • Test suites

@tay1orjones I wanted to implement the feature flag approach you shared a while back for this change. Is there any naming guidance for these yet? I avoided v12 directly and essentially followed this structure:

enable-[component]-[feature]

Let me know what you think!

janhassel avatar Dec 15 '23 15:12 janhassel

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
Latest commit 74c9709167e47018b80a42130dbb556b3e1fdad7
Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65d309c8c1b4d00008ad2336
Deploy Preview https://deploy-preview-15397--v11-carbon-react.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Dec 15 '23 15:12 netlify[bot]

@tay1orjones @emyarod Let me know if you have any questions around this!

janhassel avatar Jan 23 '24 12:01 janhassel

This LGTM! @emyarod do you have a chance to give this a review before we merge?

alisonjoseph avatar Feb 13 '24 20:02 alisonjoseph