Skip to content

Conversation

@nmerget
Copy link
Collaborator

@nmerget nmerget commented Jun 20, 2023

No description provided.

@github-actions
Copy link
Contributor

🔭🐙🐈 Test this branch here: https://db-ui.github.io/mono/review/feat-nav-item-component

@github-actions github-actions bot added 🧱components Changes inside components folder 📺showcases Changes to 1-n showcases labels Jun 20, 2023
@nmerget nmerget marked this pull request as draft June 21, 2023 15:52
nmerget and others added 7 commits June 23, 2023 08:01
…nent

# Conflicts:
#	__snapshots__/button/showcase-button.spec.ts-snapshots/DBButton-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/button/showcase-button.spec.ts-snapshots/DBButton-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/home/showcase-home.spec.ts-snapshots/Home-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/home/showcase-home.spec.ts-snapshots/Home-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/infotext/showcase-infotext.spec.ts-snapshots/DBInfotext-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/infotext/showcase-infotext.spec.ts-snapshots/DBInfotext-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/input/showcase-input.spec.ts-snapshots/DBInput-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/input/showcase-input.spec.ts-snapshots/DBInput-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/link/showcase-link.spec.ts-snapshots/DBLink-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/link/showcase-link.spec.ts-snapshots/DBLink-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/section/showcase-section.spec.ts-snapshots/DBSection-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/section/showcase-section.spec.ts-snapshots/DBSection-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
@nmerget nmerget removed request for annsch and dkolba June 26, 2023 07:50
@nmerget nmerget marked this pull request as ready for review June 26, 2023 07:50
@nmerget nmerget requested a review from mfranzke June 26, 2023 07:50
@nmerget nmerget enabled auto-merge (squash) June 26, 2023 10:10
nmerget and others added 5 commits June 29, 2023 08:32
…nent

# Conflicts:
#	__snapshots__/button/showcase-button.spec.ts-snapshots/DBButton-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/home/showcase-home.spec.ts-snapshots/Home-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/infotext/showcase-infotext.spec.ts-snapshots/DBInfotext-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/infotext/showcase-infotext.spec.ts-snapshots/DBInfotext-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/input/showcase-input.spec.ts-snapshots/DBInput-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/input/showcase-input.spec.ts-snapshots/DBInput-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-webkit-linux.png
#	__snapshots__/link/showcase-link.spec.ts-snapshots/DBLink-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
#	__snapshots__/section/showcase-section.spec.ts-snapshots/DBSection-should-match-screenshot-for-tonality-regular-and-color-neutral-0-1-chromium-linux.png
@nmerget nmerget requested a review from mfranzke July 4, 2023 08:49
nmerget and others added 5 commits July 4, 2023 10:53
…nent

# Conflicts:
#	__snapshots__/button/showcase/chromium/regular/neutral-0/DBButton-should-match-screenshot.png
#	__snapshots__/button/showcase/mobile-chrome/regular/neutral-0/DBButton-should-match-screenshot.png
#	__snapshots__/button/showcase/mobile-safari/regular/neutral-0/DBButton-should-match-screenshot.png
#	__snapshots__/button/showcase/webkit/regular/neutral-0/DBButton-should-match-screenshot.png
#	__snapshots__/infotext/showcase/chromium/regular/neutral-0/DBInfotext-should-match-screenshot.png
#	__snapshots__/infotext/showcase/mobile-chrome/regular/neutral-0/DBInfotext-should-match-screenshot.png
#	__snapshots__/infotext/showcase/mobile-safari/regular/neutral-0/DBInfotext-should-match-screenshot.png
#	__snapshots__/infotext/showcase/webkit/regular/neutral-0/DBInfotext-should-match-screenshot.png
#	__snapshots__/input/showcase/chromium/regular/neutral-0/DBInput-should-match-screenshot.png
#	__snapshots__/input/showcase/mobile-chrome/regular/neutral-0/DBInput-should-match-screenshot.png
#	__snapshots__/input/showcase/mobile-safari/regular/neutral-0/DBInput-should-match-screenshot.png
#	__snapshots__/input/showcase/webkit/regular/neutral-0/DBInput-should-match-screenshot.png
#	__snapshots__/link/showcase/chromium/regular/neutral-0/DBLink-should-match-screenshot.png
#	__snapshots__/link/showcase/mobile-chrome/regular/neutral-0/DBLink-should-match-screenshot.png
#	__snapshots__/link/showcase/mobile-safari/regular/neutral-0/DBLink-should-match-screenshot.png
#	__snapshots__/link/showcase/webkit/regular/neutral-0/DBLink-should-match-screenshot.png
#	__snapshots__/section/showcase/chromium/regular/neutral-0/DBSection-should-match-screenshot.png
#	__snapshots__/section/showcase/mobile-chrome/regular/neutral-0/DBSection-should-match-screenshot.png
#	__snapshots__/section/showcase/mobile-safari/regular/neutral-0/DBSection-should-match-screenshot.png
#	__snapshots__/section/showcase/webkit/regular/neutral-0/DBSection-should-match-screenshot.png
@nmerget nmerget requested a review from annsch July 6, 2023 12:00
@nmerget nmerget merged commit 861e7d3 into main Jul 6, 2023
@nmerget nmerget deleted the feat-nav-item-component branch July 6, 2023 12:10
...
<body>
<a href="mypath">
<li aria-haspopup="false" class="db-navigation-item">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comment on lines +15 to +16
<!-- If you want to use it as main-naivgation with pulse-->
<div class="active-indicator" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should check whether we really need a block level element for this and cannot achieve it either via ::after { content: ""; } or at least changing it to a <span>.

state.iconVisible(props.iconAfter) ? props.iconAfter : undefined
}
aria-current={props.active ? 'page' : undefined}
data-disabled={props.disabled}
Copy link
Collaborator

@mfranzke mfranzke Jul 10, 2023

Choose a reason for hiding this comment

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

We should use aria-disabled instead of data-disabled, as the latter doesn't imply any semantic meaning which we'd like to enable by using aria-disabled instead.

return (
<li
ref={component}
role={state.hasAreaPopup ? 'button' : ''}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This would lead to having several buttons and menus wrapped into each other, which would either be a nightmare or totally abstracted content especially to screenreader users.

if (children?.length > 0) {
state.hasAreaPopup = true;
} else {
state.hideSubNavigation = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This it not necessarily about showing or hiding depending on a (dynamic like e.g. viewport size) condition, but not having any subitems and that for we wouldn't want to render that part. So it might be more clear and even also separated from the visual meaning to name it e.g. like lacksSubNavigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧱components Changes inside components folder 📺showcases Changes to 1-n showcases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants