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

Updated to Design System 1.1.0 #504

Merged
merged 9 commits into from May 1, 2024
Merged

Updated to Design System 1.1.0 #504

merged 9 commits into from May 1, 2024

Conversation

flacoman91
Copy link
Contributor

@flacoman91 flacoman91 commented Apr 16, 2024

Additions

  • BEM class linter rule for stylelint.

Changes

  • Migrates BEM syntax from old style to getBem.com style.
  • Removes unneeded mega menu styles and variables.

Testing

  • PR checks should pass.

updated less and markup, site looks okay

update snapshots
Comment on lines 173 to 179
@content_line: var(--gray-40);
// .content__line
@content__line: var(--gray-40);

// .grid_column__top-divider
@grid_column__top-divider: var(--gray-40);
// .grid__column__top-divider
@grid__column__top-divider: var(--gray-40);

// .grid_column__top-divider
@grid_column__left-divider: var(--gray-40);
// .grid__column__top-divider
@grid__column__left-divider: var(--gray-40);
Copy link
Member

Choose a reason for hiding this comment

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

Go ahead and delete any variables that aren't used, if that's any of these.

src/css/App.less Outdated
Comment on lines 25 to 26
.o-mega-menu_group-heading,
.o-mega-menu_content-2-list__featured ul {
.o-mega-menu__group-heading,
.o-mega-menu__content-2-list--featured ul {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to this PR, but we shouldn't be adjusting the mega-menu from within CCDB. This should all be removed and moved to https://github.com/cfpb/consumerfinance.gov/blob/main/cfgov/unprocessed/apps/ccdb-search/css/main.less

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we just delete then?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah maybe so. This and below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All mega menu references have been removed

@@ -12,7 +12,7 @@ exports[`component: StackedAreaChart initial state renders without crashing 1`]
className="m-notification_content"
Copy link
Member

Choose a reason for hiding this comment

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

Do a find and replace for m-notification_content and update it to m-notification__content

I wonder if you ran the find and replace script again whether it would catch these on a second go 🤔

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 tried and it did not find anything

@@ -12,7 +12,7 @@ exports[`component: LineChart initial state renders data lens without crashing 1
className="m-notification_content"
Copy link
Member

Choose a reason for hiding this comment

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

Update to m-notification__content

className="input-contains-label_before
input-contains-label_before__search"
className="input-contains-label__before
input-contains-label__before__search"
Copy link
Member

Choose a reason for hiding this comment

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

This is a modifier and should be updated to input-contains-label__before--search

STEP_1: '.content_hero',
STEP_2: '.m-pagination_btn-next',
STEP_1: '.content__hero',
STEP_2: '.m-pagination__btn-next',
STEP_3: '.saved_search-panel div:nth-child(2)',
Copy link
Member

Choose a reason for hiding this comment

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

Do a search for saved_search-panel and update it to saved__search-panel

package.json Outdated
"eslint-plugin-jsdoc": "^48.2.3",
"eslint-plugin-react-redux": "^4.1.0",
"glob": "^10.3.12",
Copy link
Member

Choose a reason for hiding this comment

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

glob can be removed before this goes in (after the find and replace script is removed)

@flacoman91 flacoman91 marked this pull request as ready for review April 16, 2024 21:36
@@ -29,7 +29,7 @@ describe('initial state', () => {
</Provider>,
);

expect(updateLocationHookSpy).toBeCalledTimes(1);
expect(updateLocationHookSpy).toBeCalled();
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 hook will correctly be called twice when we update index.js to use strict mode. This test will be rewritten in the future to remove redux-mock-store and use a real redux store.

@anselmbradford anselmbradford changed the title Updated to Design System 1.0 Updated to Design System 1.1.0 May 1, 2024
@flacoman91 flacoman91 added this pull request to the merge queue May 1, 2024
Merged via the queue into main with commit e9aac3f May 1, 2024
2 checks passed
@flacoman91 flacoman91 deleted the design-system1.0-update branch May 1, 2024 14:55
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.

None yet

2 participants