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(sbb-teaser): redesign #2211

Merged
merged 6 commits into from
Jan 18, 2024
Merged

feat(sbb-teaser): redesign #2211

merged 6 commits into from
Jan 18, 2024

Conversation

federicoisepponfincons
Copy link
Contributor

@federicoisepponfincons federicoisepponfincons commented Nov 21, 2023

BREAKING CHANGE: The property isStacked has been removed in favor of alignment. Please see the documentation for further info. The description is not clamped to two lines anymore (responsibility of consumer). The slotted image has now a default width of 300px. The slot, formerly named description, has been replaced by the unnamed slot. Support of nested p elements dropped (invalid html).

Closes #1897

Preflight Checklist

Issue

This PR Closes #1897

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

See Review Guidelines for more information what is checked during review process.

Changes

Changes in this pull request:

  • sbb-chip has been included as optional element in the text part
  • features 3 variants related to the text position: right-top, right-centered, bottom-left
  • the user can set the size of the picture (by width) and the image ratio

Browsers

I tested the build on the following browsers:

  • Firefox Desktop
  • Chrome Desktop
  • Edge Desktop
  • Safari Desktop
  • Chrome Mobile
  • Safari Mobile

Screen readers

I tested the build on the following browsers:

  • JAWS Firefox Desktop
  • JAWS Chrome Desktop
  • NVDA Firefox Desktop
  • NVDA Chrome Desktop
  • VoiceOver Safari Desktop
  • VoiceOver Chrome Desktop
  • VoiceOver Safari Mobile
  • Android Accessibility Suite Chrome Mobile

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Does this introduce a breaking change?

  • Yes
  • No

Other information

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@331bac3). Click here to learn what that means.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2211   +/-   ##
=======================================
  Coverage        ?   93.59%           
=======================================
  Files           ?      222           
  Lines           ?    23278           
  Branches        ?     2081           
=======================================
  Hits            ?    21786           
  Misses          ?     1455           
  Partials        ?       37           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@TomMenga TomMenga left a comment

Choose a reason for hiding this comment

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

Good job 👍
Some fixes and some discussion topic

src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.e2e.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.spec.ts Show resolved Hide resolved
src/components/teaser/teaser.stories.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a deployment to preview-pr2211 November 29, 2023 14:25 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 November 29, 2023 14:36 In progress
Copy link
Contributor

@TomMenga TomMenga left a comment

Choose a reason for hiding this comment

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

Last review and then we can merge it I guess 😸

Also, we need to rebase from master and rename SbbTeaser into SbbTeaserElement

src/components/teaser/teaser.stories.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.stories.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

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

Thanks for the great rework!

Additionally to the comments I have two questions (probably for @mcilurzo )

  • What should be the behavior when there is more text than the image? Should that be defined somehow? e.g. when end-centered should the image anyways be at the top? or should the centering win and grow over the image?
  • I think, the hover state here does not look correctly?
Bildschirmfoto 2023-12-12 um 13 38 26

src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.e2e.ts Show resolved Hide resolved
src/components/teaser/teaser.scss Show resolved Hide resolved
@github-actions github-actions bot requested a deployment to preview-pr2211 December 12, 2023 14:53 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 December 12, 2023 15:17 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 December 12, 2023 16:38 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 December 13, 2023 10:10 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 December 13, 2023 10:37 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 December 14, 2023 08:56 In progress
src/components/teaser/teaser.scss Show resolved Hide resolved
src/components/teaser/teaser.scss Show resolved Hide resolved
src/components/teaser/teaser.stories.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.stories.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.stories.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.stories.ts Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a deployment to preview-pr2211 December 21, 2023 10:39 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 January 10, 2024 10:08 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 January 10, 2024 10:49 In progress
@mcilurzo
Copy link
Contributor

I checked the teaser and it looks almost perfect. I only found 2 small issues:

@jeripeierSBB
Copy link
Contributor

We need to wait with merge a little while as it is a breaking change and we are still waiting until consumers have been migrated to lit.
Please prepare breaking change message.

src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.scss Outdated Show resolved Hide resolved
src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.spec.ts Outdated Show resolved Hide resolved
src/components/teaser/readme.md Outdated Show resolved Hide resolved
src/components/teaser/readme.md Outdated Show resolved Hide resolved
src/components/teaser/readme.md Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a deployment to preview-pr2211 January 11, 2024 09:48 In progress
@TomMenga
Copy link
Contributor

TomMenga commented Jan 11, 2024

BREAKING CHANGE: The property isStacked has been removed in favor of alignment. Please see the documentation for further info. The description is not clamped to two lines anymore (responsibility of consumer). The slotted image has now a default width of 300px. The slot, formerly named description, has been replaced by the unnamed slot. Support of nested p elements dropped (invalid html).

Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

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

LGTM, wait with merge

@kyubisation
Copy link
Contributor

BREAKING CHANGE:

  • sbb-teaser: The property isStacked has been removed in favor of alignment. Please see the documentation for further info.

Quick question; Is it necessary to prefix the component name in the breaking changes? My assumption would be, that since the component name is part of the PR title, release-please would extract it from there.
e.g. BREAKING CHANGE: The property ...

@TomMenga
Copy link
Contributor

TomMenga commented Jan 11, 2024

BREAKING CHANGE:

  • sbb-teaser: The property isStacked has been removed in favor of alignment. Please see the documentation for further info.

Quick question; Is it necessary to prefix the component name in the breaking changes? My assumption would be, that since the component name is part of the PR title, release-please would extract it from there. e.g. BREAKING CHANGE: The property ...

Not 100% sure but we can try

@github-actions github-actions bot requested a deployment to preview-pr2211 January 18, 2024 12:40 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 January 18, 2024 14:08 In progress
Copy link
Contributor

@kyubisation kyubisation left a comment

Choose a reason for hiding this comment

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

Generally LGTM
Some concerns

src/components/teaser/teaser.spec.ts Outdated Show resolved Hide resolved
src/components/teaser/teaser.ts Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a deployment to preview-pr2211 January 18, 2024 16:03 In progress
@github-actions github-actions bot requested a deployment to preview-pr2211 January 18, 2024 16:31 In progress
@kyubisation kyubisation merged commit ba5f86c into main Jan 18, 2024
15 checks passed
@kyubisation kyubisation deleted the sbb-teaser-redesign branch January 18, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

story(sbb-teaser): redesign of the standard teaser + code clean-up
7 participants