-
Notifications
You must be signed in to change notification settings - Fork 3
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
UHF-9132: Add max-width limitation to all content types without sidebar except landing page #811
Conversation
…ar except landing page, fix padding issues for event-list, map, service-list and unit-search paragraphs
…ent cards with gray bg
…use component--full-width class
…search and event-list paragraphs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality works. I tested these in Kasko, Sote, Kymp, Strategia and Etusivu. Found some bugs, but all should be fixed now as we checked all issues together with @teroelonen.
@Arkkimaagi Can you check these changes and approve this PR once you think all is good.
…component:not(.component--full-width)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Just WOW!
What a great job you have done! So much removed lines, cleared code and nice work!
I found some minor nitpicks (as usual), but I could not find anything major. What an exellent job!
@@ -3,7 +3,7 @@ | |||
{% block paragraph %} | |||
{% embed "@hdbt/misc/component.twig" with | |||
{ | |||
component_classes: [ 'component--service-list-search' ], | |||
component_classes: [ 'component--full-width', 'component--service-list-search' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend putting these on separate rows for readability and better git workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this 👍
@@ -4,7 +4,7 @@ | |||
{% block paragraph %} | |||
{% embed "@hdbt/misc/component.twig" with | |||
{ | |||
component_classes: [ 'component--unit-search' ], | |||
component_classes: [ 'component--full-width', 'component--unit-search' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend putting these on separate rows for readability and better git workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this 👍
templates/component/map.twig
Outdated
@@ -1,6 +1,6 @@ | |||
{% embed "@hdbt/misc/component.twig" with | |||
{ | |||
component_classes: [ 'component--map' ], | |||
component_classes: [ 'component--map', 'component--full-width' ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend putting these on separate rows for readability and better git workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed this 👍
} | ||
} | ||
|
||
// Unit needs also these following fixed elements max-width. This should/could be fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a real TODO here with ticket id to fix it at some time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a TODO here and a ticket to Jira :)
max-width: $content-width-max | ||
} | ||
|
||
// Service needs also these following fixed elements max-width. This should/could be fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have a real TODO here with ticket id to fix it at some time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a TODO here and a ticket to Jira :)
@@ -1,4 +1,4 @@ | |||
$-sidebar-width: 340px; | |||
$-sidebar-width: calc(340px + $spacing-double + $spacing-double); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe explain from where these $spacing-double
values come from so that the math can be adjusted if needed at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment above to clarify this calc.
padding-top: 0; | ||
|
||
@include breakpoint($breakpoint-m) { | ||
grid-template-columns: [full-width-start] $spacing-double [content-start] 1fr [content-end] $spacing-double [full-width-end] ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd consider using a custom property (css variable) for the gap, so that only it changes and we do not need to define the full grid-template-columns
twice. Maybe set it without the mediaquery as
grid-template-columns: [full-width-start] var(--component-gap, #{$spacing}) [content-start] 1fr [content-end] var(--component-gap, #{$spacing}) [full-width-end];
and then in the mediaquery just set --component-gap: #{$spacing-double};
. This way it's easier to see what we're doing at the breakpoint and to adjust the template-columns if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was awesome! When writing this I didn't like the fact that I had to define the template columns twice but didn't think of a better solution. Thank you :) You made me a better developer again 🙇
… are not needed, adjusting the content cards gray styles to make it more maintainable, adding two TODOs
…n content cards gray
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! Approved 🌹
UHF-9132
What was done
How to install
git pull origin dev
make fresh
composer require drupal/hdbt:dev-UHF-9132
make drush-cr
How to test
Designers review
Other PRs