Commit f531f10
feat(tree-links): Adds support for link nodes in the TreeView component (#18409)
* feat(tree-links): Adds support for link nodes in the TreeView component
* feat: Sets treenodes with a href active when the href is the current page, utilises the Link component for nodes with links
* chore: Corrects formatting and styling order
* fix: Responds to feedback - ensures href does not override active or selected
* chore: Adds TreeView links e2e tests and updates snapshots
* chore: Adds TreeNode test to test specifying the href for parent nodes
* chore: Adds reach/router dependency
* feat: Utilises reach router in TreeNodes with links to navigate
* feat: Updates TreeView storybook, adds a main content section which updates when a TreeNode with link is clicked
* chore: Updates for lint and format
* chore: Simplifies scss structure
* chore: Updates lint styling
* chore: Removes reach/router dependency
* chore: Removes reach/router navigation from TreeNodes with links
* fix: Updates storybook for TreeNodes with links to simulate a link
* fix: Improves storybook for TreeNodes to preventDefault on links
* chore: Moves current page main body to a variable
* Revert "chore: Moves current page main body to a variable"
This reverts commit fc2b973.
* fix: Resolves onSelect calling twice when using the TreeNode with links component
* chore: Stops TreeView with links storybook from re-rendering when clicking on a node
* style: Improves TreeView with links storybook styling
* chore: Corrects formatting
* chore: Moves node const inside TreeViewWithLinks component
---------
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: Daniel Smith <DanielP.Smith@ibm.com>
Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>1 parent 23a11c1 commit f531f10
File tree
11 files changed
+470
-47
lines changed- e2e/components/TreeView
- packages
- react
- __tests__/__snapshots__
- src/components/TreeView
- __tests__
- styles/scss/components/treeview
11 files changed
+470
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1764 | 1764 | | |
1765 | 1765 | | |
1766 | 1766 | | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
1767 | 1778 | | |
1768 | 1779 | | |
1769 | 1780 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
36 | 47 | | |
37 | 48 | | |
38 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9641 | 9641 | | |
9642 | 9642 | | |
9643 | 9643 | | |
| 9644 | + | |
| 9645 | + | |
| 9646 | + | |
9644 | 9647 | | |
9645 | 9648 | | |
9646 | 9649 | | |
| |||
9731 | 9734 | | |
9732 | 9735 | | |
9733 | 9736 | | |
| 9737 | + | |
| 9738 | + | |
| 9739 | + | |
9734 | 9740 | | |
9735 | 9741 | | |
9736 | 9742 | | |
| |||
0 commit comments