Decathlon / vitamin-web

Decathlon Design System UI components for web applications
https://decathlon.github.io/vitamin-web
Apache License 2.0
279 stars 77 forks source link

feat(`@vtmn/css`, `@vtmn/svelte`, `@vtmn/react`, `@vtmn/vue`): rework `VtmnNavbarLink` for SSR #1425

Closed Tlahey closed 1 year ago

Tlahey commented 1 year ago

BREAKING CHANGE: 'VtmnNavbarLink' remove properties label and showLabel, replaced by a span slot

Changes description

Move the Label property into slot in order to apply a sr-only with breakpoints.

Context

With SSR, it is not possible to detect the width of the device. So, in order to avoid flikering effects, we have to set the label on a slot in order to apply style show/hidden on it.

How it looks

image image image image

On the navbar image image

Checklist

Does this introduce a breaking change?

Other information

Rework the css part and enhancer the CSS in order to match the figma with the VtmnBadge.

Current : image

Target : image image

lauthieb commented 1 year ago

OK for me! Thanks @Tlahey :)

We need to wait for #1431.

Please, be careful by adding correctly "BREAKING CHANGE:" in the body of the merge commit in order to ensure that we will bump to a major release thanks to Lerna automation.

Example with this merge commit: https://github.com/Decathlon/vitamin-web/commit/25a7c16abf352170e4936aacb6b674aec54e3067

C0ZEN commented 1 year ago

Since it's a breaking change, how come it was released as 2.3.0 instead of 3.0.0?

Tlahey commented 1 year ago

Totally agree, with the BREAKING CHANGE label, should have updated as a major version 🤔 Ping @thibault-mahe

thibault-mahe commented 1 year ago

I agree with you, something went wrong. I'm reverting the commits until I find some times to check on this: https://github.com/Decathlon/vitamin-web/pull/1435

Thanks @C0ZEN :)