-
Notifications
You must be signed in to change notification settings - Fork 19
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
#3190: Heading refactor and other CSS fixes - [RJM] #3358
base: main
Are you sure you want to change the base?
Conversation
🥳 Successfully deployed to developer sandbox rjm. |
Hey @rachidatecs I actually had someone change all the icons to the smaller size a while ago (I Can't remember what PR it was). I'd like to keep them small. Is that possible? |
@@ -46,7 +46,7 @@ | |||
{% endwith %} | |||
|
|||
{% if domain_request.alternative_domains.all %} | |||
<h3 class="header--body text-primary-dark margin-bottom-0">Alternative domains</h3> | |||
<h3 class="h4 margin-bottom-0">Alternative domains</h3> |
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 seems really counter-intuitive. If I didn't read through the css, I would want to "correct" this so we are using h4 for the element instead of as a class for an h3 element....
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 is a pattern I learned from Bootstrap. Just remember that the DOM element is driven by semantics while the CSS class is presentational.
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.
So any dev's thought process should be:
1- What should this header be? It's a new section and the parent section starts with a h2, so h3 makes the most sense
2- Now that I have chosen h3, I want it to look like an h4. Instead of messing with custom class names like we used to, font size and font weight and line height styles or utility classes, simply use class h4 - again, CSS classes are presentational
For more, read through the first part of this Bootstrap documentation page
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.
@rachidatecs I know we talked about this but, this could be a good example to use for that new documentation/guidance we'd like to share on how semantic use of headings vs visual.
@@ -132,8 +132,8 @@ <h3 class="header--body text-primary-dark margin-bottom-0">Alternative domains</ | |||
{% with title=form_titles|get_item:step %} | |||
{% if domain_request.has_additional_details %} | |||
{% include "includes/summary_item.html" with title="Additional Details" value=" " heading_level=heading_level editable=is_editable edit_link=domain_request_url %} | |||
<h3 class="header--body text-primary-dark margin-bottom-0">CISA Regional Representative</h3> | |||
<ul class="usa-list usa-list--unstyled margin-top-0"> | |||
<h4 class="margin-bottom-0">CISA Regional Representative</h4> |
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 is the change I REALLY want to do for the <h3 class="h4...> elements...
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 see what is happening and OVERALL, I like it alot.....except for one area that I am sure you have your reasons for, but I left a couple comments anyway.
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
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 huddle today. Great demo presentation. I see the changes. LGTM
@rachidatecs H1 - seeing wrong font-size (2.13rem). We normalized to 2.125rem so that the px number is 34px. Can we update h1 font-size to 2.125 rem? |
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.
Conditionally approve with requested changes. Will you let me know what you end up doing with the summary box heading? I think the heading should look more like the Preamble than the DNSSEC version (bold).
I traced this to browser rounding: "Browsers prioritize rendering performance over extremely precise decimal calculation" |
🥳 Successfully deployed to developer sandbox rjm. |
Fixed. USWDS summary box header styles excluded font-weight, I normalized it to bold. |
🥳 Successfully deployed to developer sandbox rjm. |
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.
Looks great!
🥳 Successfully deployed to developer sandbox rjm. |
Ticket
Resolves #3190
This was a collaboration with @gabydisarli. We primarily set out to fix headers across the app, but ended up fixing some minor issues along the way. Also, the header refactor touched some components a bit more than others, like summary items.
Changes
Context for reviewers
New CSS writing rules
Not sure whether this goes into documentation somewhere, but this is something anyone working on templates and CSS should know:
Setup
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Validated user-facing changes as a developer
Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
References
Screenshots
This is not a comprehensive list of changes:
Icons before:
Icons after:
Manage request before:
Manage request after (matches manage Domain):