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

Mc core style import swap #32154

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft

Mc core style import swap #32154

wants to merge 43 commits into from

Conversation

micahchiang
Copy link
Contributor

@micahchiang micahchiang commented Sep 27, 2024

DO NOT MERGE

This PR attempts to swap the core style import from formation to css-library.

Sibling css-library PR - department-of-veterans-affairs/component-library#1359

Note on Injected Header style changes
The swap from formation to css-library introduces a change to how utility classes are given values. Previously in Formation, utility classes used a base multiple of 8px. In css-library, utility classes rely on rem values. This matters because Teamsites still use 10px as a root font size.. What this means is that utility classes needed to be updated for various element class lists. This can be seen in the changes files where for example some elements went from something like vads-u-padding--2 to vads-u-padding--3. The implication here is that computed values for the injected header will be changing by a minuscule value: in most instances, 0.5px. In some cases, 1px.

Are you removing, renaming or moving a folder in this PR?

  • No, I'm not changing any folders (skip to TeamSites and delete the rest of this section)
  • Yes, I'm removing, renaming or moving a folder

If the folder you changed contains a manifest.json, search for its entryName in the content-build registry.json (the entryName there will match).

If an entry for this folder exists in content-build and you are:

  1. Deleting a folder:

    1. First search vets-website for all instances of the entryName in your manifest.json and remove them in a separate PR. Look particularly for references in src/applications/static-pages/static-pages-entry.js and src/platform/forms/constants.js. If you do not do this, other applications will break!
      • Add the link to your merged vets-website PR here
    2. Then, Delete the application entry in registry.json and merge that PR before this one
      • Add the link to your merged content-build PR here
  2. Renaming or moving a folder: Update the entry in the registry.json, but do not merge it until your vets-website changes here are merged. The content-build PR must be merged immediately after your vets-website change is merged in to avoid CI errors with content-build (and Tugboat).

Did you change site-wide styles, platform utilities or other infrastructure?

Summary

  • (Summarize the changes that have been made to the platform)
  • (If bug, how to reproduce)
  • (What is the solution, why is this the solution)
  • (Which team do you work for, does your team own the maintenance of this component?)
  • (If using a flipper, what is the end date of the flipper being required/success criteria being targeted)

Related issue(s)

Testing done

  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected
  • Describe the tests completed and the results
  • _Exclusively stating 'Specs and automated tests passing' is NOT acceptable as appropriate testing
  • Optionally, provide a link to your test plan and test execution records

Screenshots

Profile

Production:
image

Local:
image

Production:
image

Local:
image

Production:
image

Local:
image

Production:
image

Local:
image

Production:
image

Local:
image

Production:
image

Local:
image

Production:
image

Local:
image

Production:
image

Local:
image

MHV, local on left, staging on right

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

Combined Debt Portal, local on left staging on right

image

image

image

image

Claims Status, local on left, staging on right

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

image

Injected header, local left, production right

Screenshot from 2024-11-08 13-47-57
Screenshot from 2024-11-08 13-47-42
Screenshot from 2024-11-08 13-47-13
image
image
image
image
image
image
image
image
image
image
image
image
image

Mock Form Flow, local left, staging right

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

Before After
Mobile
Desktop
Before After
Mobile
Desktop
Before After
Mobile
Desktop
Before After
Mobile
Desktop

What areas of the site does it impact?

(Describe what parts of the site are impacted if code touched other areas)

Acceptance criteria

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Linting warnings have been addressed
  • Documentation has been updated (link to documentation *if necessary)
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

Error Handling

  • Browser console contains no warnings or errors.
  • Events are being sent to the appropriate logging solution
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)

Authentication

  • Did you login to a local build and verify all authenticated routes work as expected with a test user

Requested Feedback

(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

Signed-off-by: Micah Chiang <[email protected]>
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main September 27, 2024 22:47 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main September 27, 2024 23:14 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main September 30, 2024 17:44 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main September 30, 2024 20:18 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main September 30, 2024 22:29 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main October 8, 2024 17:03 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main October 8, 2024 19:04 Inactive
Signed-off-by: Micah Chiang <[email protected]>
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main October 9, 2024 14:36 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main October 9, 2024 20:51 Inactive
package.json Outdated
@@ -306,6 +306,7 @@
"octokit": "^2.1.0",
"octokit-plugin-create-pull-request": "^3.11.0",
"prop-types": "^15.6.1",
"querystring-es3": "^0.2.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed because we're still relying on uswds v1 grid styles while we get off of Formation the repo.

@@ -636,3 +636,92 @@ div[data-widget-type="events"] {
}
}
/* ^^^ DO NOT REMOVE w/o DS REVIEW: solves !important conflict*/

/* ~~~~~ DO NOT REMOVE w/o DS REVIEW: Temporary fixes to enable core.scss swap ~~~~~~ */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the sake of keeping the mental model relatively simple, I'm just moving our grid classes into shame for the time being. I know I know, we want to get rid of shame.scss eventually. This makes testing easier. These grid classes will 100% be moved to css-library when we have the capacity to update all of grid.

Comment on lines +724 to +726
img {
display: inline-block;
vertical-align: middle;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Foundation sets these on the element selector. Without these styles, the image in .va-banner-container right above the footer won't sit flush to the rest of the footer. Also without these, images in promo blocks will create some minor content shift in elements above them.

@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main October 9, 2024 22:20 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main October 17, 2024 16:26 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 4, 2024 22:35 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 5, 2024 17:06 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 5, 2024 18:02 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 6, 2024 21:31 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 8, 2024 21:22 Inactive
Signed-off-by: Micah Chiang <[email protected]>
// overriding utility class because teamsites has a root font-size of 10px and we don't have a utility class
// in rem that computes exactly to that.
.medium-screen\:vads-u-padding--2 {
padding: 16px !important;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

needed because teamsites still has a root font-size of 10px

@@ -127,7 +127,7 @@ const MobileHeader = ({ isDesktop, megaMenuData }) => {
{/* end Veterans Crisis Line banner */}

<nav className="vads-u-display--flex vads-u-flex-direction--column vads-u-margin--0 vads-u-padding--0">
<div className="header-logo-row vads-u-background-color--primary-darker vads-u-display--flex vads-u-align-items--center vads-u-justify-content--space-between vads-u-padding-y--1p5 vads-u-padding-left--1p5 vads-u-padding-right--1">
<div className="header-logo-row vads-u-background-color--primary-darker vads-u-display--flex vads-u-align-items--center vads-u-justify-content--space-between vads-u-padding-y--2p5 vads-u-padding-left--2p5 vads-u-padding-right--1p5">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and the below adjustment are needed because teamsites still has a root font-size of 10px and updating these classes gets us as close as we can get with css-library utilities.

@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 8, 2024 23:50 Inactive
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems like some of the display logic in the mobile injected header was lost when formation core was removed, which led to the expanded gov banner always being displayed. The changes in this file add back in the toggle functionality and update the aria-hidden attribute as needed.

@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 11, 2024 17:19 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 11, 2024 20:43 Inactive
Signed-off-by: Micah Chiang <[email protected]>
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 11, 2024 20:52 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 11, 2024 23:05 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/mc-core-style-test/main November 13, 2024 18:00 Inactive
Signed-off-by: Micah Chiang <[email protected]>
Signed-off-by: Micah Chiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants