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

Fix card component lints & bug #101

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Fix card component lints & bug #101

merged 1 commit into from
Oct 16, 2023

Conversation

maxatdetroit
Copy link
Member

Note: Part of CityOfDetroit/detroitmi#1099

This PR


  • Fixes lint errors (not using strict equality, lack of lexical scope in switch statements, and using let instead of const)
  • Fixes a bug identified due to linting (yay) - see comment on code for info

Testing


Render storybook looks good for card component (including functionality):

Screenshot 2023-10-03 at 10 55 04 AM

Running storybook tests pass:

$ yarn test-storybook
 PASS   browser: chromium  src/stories/offcanvas.stories.js
 PASS   browser: chromium  src/stories/modal.stories.js
 PASS   browser: chromium  src/stories/accordion.stories.js
 PASS   browser: chromium  src/stories/listgroup.stories.js
 PASS   browser: chromium  src/stories/card.stories.js
 PASS   browser: chromium  src/stories/carousel.stories.js
 PASS   browser: chromium  src/stories/dropdown.stories.js
 PASS   browser: chromium  src/stories/buttongroup.stories.js
 PASS   browser: chromium  src/stories/formcheck.stories.js
 PASS   browser: chromium  src/stories/button.stories.js
 PASS   browser: chromium  src/stories/form.stories.js
 PASS   browser: chromium  src/stories/nav.stories.js
 PASS   browser: chromium  src/stories/navbar.stories.js
 PASS   browser: chromium  src/stories/formcheckgroup.stories.js
 PASS   browser: chromium  src/stories/formselect.stories.js
 PASS   browser: chromium  src/stories/formcontrol.stories.js
 PASS   browser: chromium  src/stories/badge.stories.js
 PASS   browser: chromium  src/stories/progress.stories.js
 PASS   browser: chromium  src/stories/pagination.stories.js
 PASS   browser: chromium  src/stories/image.stories.js
 PASS   browser: chromium  src/stories/breadcrumb.stories.js
 PASS   browser: chromium  src/stories/container.stories.js
 PASS   browser: chromium  src/stories/formlabel.stories.js
 PASS   browser: chromium  src/stories/alert.stories.js
 PASS   browser: chromium  src/stories/spinner.stories.js
 PASS   browser: chromium  src/stories/loader.stories.js
 PASS   browser: chromium  src/stories/icon.stories.js
 PASS   browser: chromium  src/stories/range.stories.js
 PASS   browser: chromium  src/stories/geocoder.stories.js
 PASS   browser: chromium  src/stories/table.stories.js (7.919 s)

Test Suites: 30 passed, 30 total
Tests:       155 passed, 155 total
Snapshots:   0 total
Time:        9.836 s
Ran all test suites.

@maxatdetroit maxatdetroit requested a review from jedgar1mx October 3, 2023 14:59
@maxatdetroit maxatdetroit self-assigned this Oct 3, 2023
const tempBodyClasses = ['card-body'];
node.getAttribute('data-extra-classes') !== null &&
node.getAttribute('data-extra-classes') !== null
? tempBodyClasses.push(node.getAttribute('data-extra-classes'))
Copy link
Member Author

Choose a reason for hiding this comment

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

This was a bug (copy-paste from the previous case statement). Previously used tempHeaderClasses.

@jedgar1mx jedgar1mx merged commit 72ba561 into dev Oct 16, 2023
@jedgar1mx jedgar1mx deleted the cleanup.issue.1099 branch October 16, 2023 20:14
@maxatdetroit maxatdetroit linked an issue Nov 27, 2023 that may be closed by this pull request
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.

Conform UXDS library to Prettier & ESLint standards
2 participants