Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(styles): btp horizontal nav update #4997

Merged
merged 5 commits into from
Nov 23, 2023
Merged

Conversation

N1XUS
Copy link
Contributor

@N1XUS N1XUS commented Nov 20, 2023

Related Issue

Relates SAP/fundamental-ngx#10670

Description

  • Added horizontal navigation example with Two-Click Area Variant

Screenshots

After:

image

Please check whether the PR fulfills the following requirements

  1. The output matches the design specs
  • All values are in rem
  • Text elements follow the truncation rules
  • hover state of the element follow design spec
  • focus state of the element follow design spec
  • active state of the element follow design spec
  • selected state of the element follow design spec
  • selected hover state of the element follow design spec
  • pressed state of the element follow design spec
  • Responsiveness rules - the component has modifier classes for all breakpoints
  • Includes Compact/Cosy/Tablet design
  • RTL support
  1. The code follows fundamental-styles code standards and style
  • only one top level fd-* class is used in the file
  • BEM naming convention is used
  • Mixins are used for repeatable code (fd-rtl, fd-ellipsis, fd-flex, fd-selected, fd-focus, ect.)
  • A11y support - keyboard support, screenreader support, proper ARIA attributes, etc.
  • fd-reset() mixin is applied to all elements
  • Variables are used, if some value is used more than twice.
  • Checked if current components can be reused, instead of having new code.
  1. Testing
  • tested Storybook examples with "CSS Resources" normalize option
  • tested Storybook examples with "CSS Resources" unnormalize option
  • Verified all styles in IE11
  • Updated tests
  • last commit message should have [ci visual] so it can trigger chromatic visual regression (e.g. test: run chromatic visual regression [ci visual])
  1. Documentation
  • Storybook documentation has been created/updated
  • Breaking Changes wiki has been updated in case of breaking changes.

@N1XUS N1XUS added the BTP BTP design label Nov 20, 2023
@N1XUS N1XUS added this to the Sprint 126 milestone Nov 20, 2023
@N1XUS N1XUS requested a review from a team November 20, 2023 11:59
@N1XUS N1XUS self-assigned this Nov 20, 2023
Copy link

netlify bot commented Nov 20, 2023

Deploy Preview for fundamental-styles ready!

Name Link
🔨 Latest commit 7bc479e
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-styles/deploys/655f162287aa220008285598
😎 Deploy Preview https://deploy-preview-4997--fundamental-styles.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.

@N1XUS N1XUS force-pushed the feat/btp-horizontal-nav-update branch from acbae73 to 59edf5e Compare November 20, 2023 12:28
@N1XUS N1XUS changed the title feat(styles): btp horizontal nav update [ci visual] feat(styles): btp horizontal nav update Nov 20, 2023
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
@@ -378,7 +400,7 @@ $navListContainerSubmenu: #{$block}__list-container--submenu;
}
}

.#{$navItemWithExpander} {
@include _fd-vertical-nav-with-expander() {
Copy link
Contributor

Choose a reason for hiding this comment

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

how is this a better approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@InnaAtanasova previous line would apply styling for both horizontal and vertical navs. This mixin allows to apply styling only for a vertical nav. Same with _fd-horizontal-nav-with-expander mixin.

packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
packages/styles/src/navigation.scss Outdated Show resolved Hide resolved
@InnaAtanasova
Copy link
Contributor

Screenshot 2023-11-21 at 10 51 51 AM

There's something wrong with the naming.
Per specs, Two-click area variant is the case where you have a link + expander:
Screenshot 2023-11-21 at 10 53 13 AM

The default one is where the whole item serves as an expander.

@InnaAtanasova
Copy link
Contributor

The underline for selected state is not at the correct position. There's 1-2px space under it. It's more noticeable in focus state:
Screenshot 2023-11-21 at 10 56 25 AM

Screenshot 2023-11-21 at 10 55 49 AM

@N1XUS N1XUS requested a review from InnaAtanasova November 22, 2023 11:12
@N1XUS N1XUS force-pushed the feat/btp-horizontal-nav-update branch from 1c5f075 to 04bd9c3 Compare November 22, 2023 14:56
@InnaAtanasova
Copy link
Contributor

InnaAtanasova commented Nov 22, 2023

Screenshot 2023-11-22 at 2 52 52 PM

This is still not fixed. There's 1 px spacing under the selected indicator.

@InnaAtanasova
Copy link
Contributor

Please fix the underline spacing. The code looks great so I will approve the PR to not block you tomorrow.

@N1XUS N1XUS merged commit 5715346 into main Nov 23, 2023
8 checks passed
@N1XUS N1XUS deleted the feat/btp-horizontal-nav-update branch November 23, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BTP BTP design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants