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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add suru component #4849

Merged
merged 6 commits into from
Jul 27, 2023
Merged

Add suru component #4849

merged 6 commits into from
Jul 27, 2023

Conversation

bartaz
Copy link
Contributor

@bartaz bartaz commented Jul 26, 2023

Done

Adds new suru component, for the new style of suru.
Deprecates the use of old suru strip.

Fixes WD-5196

QA

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.

Screenshots

[if relevant, include a screenshot or screen capture]

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4849.demos.haus

@bartaz bartaz marked this pull request as ready for review July 26, 2023 14:51
Copy link
Contributor

@ClementChaumel ClementChaumel left a comment

Choose a reason for hiding this comment

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

LGTM, just some comments

scss/_patterns_suru.scss Outdated Show resolved Hide resolved
Comment on lines 4 to 14
.p-suru {
aspect-ratio: 5.1775700934579; // exact aspect ration of the image
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg');
background-size: contain;
display: none; // only show suru on large screens
margin: 0 auto;
max-width: $grid-max-width;

@media (min-width: $breakpoint-large) {
display: block;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.p-suru {
aspect-ratio: 5.1775700934579; // exact aspect ration of the image
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg');
background-size: contain;
display: none; // only show suru on large screens
margin: 0 auto;
max-width: $grid-max-width;
@media (min-width: $breakpoint-large) {
display: block;
}
.p-suru {
display: none;
@media (min-width: $breakpoint-large) {
display: block;
aspect-ratio: 5.1775700934579; // exact aspect ration of the image
background-image: url('#{$assets-path}7f34ade9-website_suru_25.jpg');
background-size: contain;
margin: 0 auto;
max-width: $grid-max-width;
}

I would personally move all the display rules in the media query like so
But idk if it's a pattern we use elsewhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I find it a bit cleaner this way, and in the end I don't think it really matters too much.

templates/docs/patterns/suru.md Outdated Show resolved Hide resolved
@ClementChaumel
Copy link
Contributor

It can indeed be put anywhere!
image
(not that it's necessarily a good idea to do so)

@bartaz
Copy link
Contributor Author

bartaz commented Jul 26, 2023

It can indeed be put anywhere!

Good that Lyubo is on holidays or you would give him a heart attack!

bartaz and others added 2 commits July 26, 2023 18:17
Co-authored-by: ClementChaumel <clement.chaumel@gmail.com>
@bartaz bartaz merged commit 32418d7 into canonical:main Jul 27, 2023
5 checks passed
@bartaz bartaz deleted the new-suru branch July 27, 2023 08:09
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.

None yet

4 participants