Skip to content

Comments

Navigation rework#598

Merged
ArtieReus merged 56 commits intomainfrom
navigation-rework
May 15, 2024
Merged

Navigation rework#598
ArtieReus merged 56 commits intomainfrom
navigation-rework

Conversation

@franzheidl
Copy link
Contributor

@franzheidl franzheidl commented Apr 30, 2024

Introduce neutral Navigation and NavigationItem components with improved functionality over the various current XYZ-Navigation components.

Refactor SideNavigation, SideNavigationItem, TabNavigation, TabNavigationItem, TopNavigation, TopNavigationItem to be thin wrappers around Navigation and NavigationItem, so all of the former rely on the same functionality and internal logic of the latter.

franzheidl added 26 commits May 7, 2024 15:30
`role` -> `navigationRole` to differentiate from aria role
make sure the wrapping component can supply specific active styles, too.
…p name

only supply the most basic common styles with this component, rely on the wrapping role-specific components to prove the rest
Make Navigation agnostic of the various types of navigations, update tests accordingly.
Copy link
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. All tests passsed

@ArtieReus ArtieReus merged commit f265c73 into main May 15, 2024
@ArtieReus ArtieReus deleted the navigation-rework branch May 15, 2024 12:24
ArtieReus pushed a commit that referenced this pull request Jun 3, 2024
* [ui] add internal Navigation, NavigtaionItem components WIP

* [ui] NavigationIem: add stories

* [ui] Navigation: add first test

* [ui] Navigation: remove unnecessary wrapper div

* [ui] NavigationItem: render button or link

* [ui] NavigationItem: add wrapperClassName prop, aria-disabled and aria-selected attrs

* [ui] Navigation: add aria-disabled attribute

* [ui] Navigation: add more tests

* [ui] NavigationItem: properly disable link items, too

* [ui] Navigation: add className, arbitrary props test

* [ui] Navigation: render arbitrary props

* [ui] Navigation, -Item: add link stories

* [ui] Navigation: add WIP stories

* [ui] fix storybook build for now

use proper comment syntax for copyright and license information in .mdx files

* [ui] Navigation: WIP: determine selected item by key or any relevant item value

* [ui] Navigation: stories: add missing keys

* [ui] Navigation: add more tests

* [ui] Navigation: add more tests for setting the activeItem

* [ui] Navigation: add re-rendering tests for activeItem prop

* Automatic application of license header

* [ui] Navigation: add remaining tests for settign the active item initially

uncomment and skip not working event handler test

* [ui] Navigation: add skipped test

* [ui] Navigation: actually skip test as per prev commit message

* [ui] NavigationItem: make sure component renders ok outside of parent context, too

* [ui] Navigation, -Item: add navigationItem tests

properly use setup() and waitFor for navigation tests, still skipping

* Automatic application of license header

* [ui] Navigation: add another (skipped) test

* [ui] Navigation: fix typo in test description

* [ui] Navigation: re-work tests so they work with cross-ontext/-component callbacks

* [ui] NavigationItem: Tests. add comment

* [ui] NavigationItem: render icon

* [ui] NavigationItem: center items (icon etc.)

* [ui] Navigation: rename prop for clarity

`role` -> `navigationRole` to differentiate from aria role

* [ui] NavigationItem: Test: reflect changed prop name in test

* [ui] Navigation: don’t use default navigationRole prop

* [ui] NavigationItem: accept activeItemStyles prop

make sure the wrapping component can supply specific active styles, too.

* [ui] SideNavigation, -Item: rework to thin wrappers around Navigation, -Item

* [ui] SideNavigationItem: remove obsolete imports

* [ui] SideNavigation: pass navigationRole prop to Navigation

* [ui] NavigationItem: render combined `[navigationRole]-item-active` class

* [ui] TopNavigation, -Item: re-work to wrap Navigation, -Item components

* [ui] NavigationItem: allow passing inactive Styles that would otherwise be overwirtten by defaultStyles

* [ui] TabNavigation, -Item: re-work to wrap Navigation, -Item

* [ui] TabNavigation, -Item: render a class to represent tabStyle

* [ui] TabNavigation, -Item: make tests work

* [ui] Navigation: add docs

* [ui] NavigationItem: remove activeStyles, add docs, fix ariaLabel prop name

only supply the most basic common styles with this component, rely on the wrapping role-specific components to prove the rest

* [ui] Side-, Tab-, TopNavigationItem: add bold styles for active state

* [ui] Navigation: remove `navigationRole` prop

Make Navigation agnostic of the various types of navigations, update tests accordingly.

* [ui] bump version to 2.14.0

* [ui] TabNavigation. TopNavigation: Update story descriptions

---------

Co-authored-by: License Bot <license_bot@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants