Skip to content

Conversation

@jkachel
Copy link
Contributor

@jkachel jkachel commented Jun 18, 2024

What are the relevant tickets?

Closes mitodl/hq#4635

Description (What does it do?)

The generateMarketingImageSrc uses a do..while to re-select a random marketing image if the image that we just displayed to the user is the one that gets selected again. This also needed to drop out of the loop if there wasn't a last marketing image, so now it does.

How can this be tested?

Automated tests should pass. No real front-end change should be seen - the homepage should load and your testimonials images should be randomized and shouldn't repeat back-to-back (they will still repeat in the list as a whole).

@jkachel jkachel added Needs Review An open Pull Request that is ready for review product:mit-open Issues related to the MIT Open product labels Jun 18, 2024
@ChristopherChudzicki ChristopherChudzicki self-assigned this Jun 18, 2024
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

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

Approving this because it fixes the infinite loop in our tests.

It does have an issue which james is going to fix in a followup PR.

Screen.Recording.2024-06-18.at.9.15.04.AM.mov

@jkachel jkachel merged commit 0ee1742 into main Jun 18, 2024
@jkachel jkachel deleted the jkachel/4635-fix-hang-on-single-testimonial branch June 18, 2024 13:20
@odlbot odlbot mentioned this pull request Jun 18, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review An open Pull Request that is ready for review product:mit-open Issues related to the MIT Open product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants