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

refactor: carousel to grid refactor #9

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

MaxFrank13
Copy link
Member

@MaxFrank13 MaxFrank13 commented Jul 14, 2023

This PR will refactor the Product recommendations carousel to be a CardGrid that has an option to expand. The component formerly known as CarouselStack has been removed completely and replaced with the RecommendationStack. In addition, there have been two new components added: ProductTypeBanner and ProductCardGrid, which live inside RecommendationStack and help to break things up/make them easier to grok.

JIRA

APER-2483

Screenshots

Large screens

Screenshot 2023-07-17 at 9 31 05 AM

Medium screens

Screenshot 2023-07-17 at 9 31 27 AM

Small/X-small screens

Screenshot 2023-07-17 at 9 31 49 AM

src/index.jsx Outdated Show resolved Hide resolved
},
}));

expect('"Prospector" degrees').toBeTruthy();
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I missing something about how this works? Aren't strings always going to be truthy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question! So the strings for degrees, programs, executive education, and boot camps will not appear by default. They will only appear if those values appear in the query string. So this is testing that the UI is reading properly from the query string. We have separate tests for the hook that extracts these values from the query string. This is just to make sure something renders to the page that matches that product type.

Copy link
Contributor

Choose a reason for hiding this comment

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

So does expect() automatically search through the context for a string? If you put any random string as the argument to expect, wouldn't it be truthy? I think you need to look for the string in the screen object.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yes! I didn't check the screen. I see what you mean now 👍 I'll fix this

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (main@5ad3ea2). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage        ?   91.61%           
=======================================
  Files           ?       30           
  Lines           ?      322           
  Branches        ?       45           
=======================================
  Hits            ?      295           
  Misses          ?       27           
  Partials        ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@MaxFrank13 MaxFrank13 force-pushed the mfrank/carousel-to-grid-refactor branch 2 times, most recently from 1f19e61 to e11fd21 Compare July 18, 2023 16:54
@MaxFrank13 MaxFrank13 force-pushed the mfrank/carousel-to-grid-refactor branch from e11fd21 to b070d8a Compare July 18, 2023 17:00
Copy link
Contributor

@cdeery cdeery left a comment

Choose a reason for hiding this comment

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

This looks good. Thanks for all the fixes!

@MaxFrank13 MaxFrank13 merged commit a2ef557 into main Jul 19, 2023
@MaxFrank13 MaxFrank13 deleted the mfrank/carousel-to-grid-refactor branch July 19, 2023 12:18
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