Skip to content

Conversation

@ChristopherChudzicki
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5415

Description (What does it do?)

Fixes carousel initial render

Screenshots (if appropriate):

With JS disabled:
Screenshot 2024-09-11 at 2 20 22 PM

and enabled:

Screenshot 2024-09-11 at 2 20 56 PM

How can this be tested?

Visit homepage. Carousel should not shift position as homepage loads.

You can also see this affect by disabling javascript:

  1. Visit the homepage. Disable JS via dev console (cmd+shift+p, then search for "disable javascript")
  2. reload page
  3. Page should look good (though incomplete)

@ChristopherChudzicki ChristopherChudzicki changed the base branch from main to nextjs September 11, 2024 18:24
@ChristopherChudzicki ChristopherChudzicki added the Needs Review An open Pull Request that is ready for review label Sep 11, 2024
* on the `.slick-track` element. This, combined with auto margoins,
* causes the carousel to render with strange positioning initially.
*/
width: "unset !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.

This carousel issue is the only instance I've come across so far where something has behaved unexpectedly different on server and client.

@ChristopherChudzicki ChristopherChudzicki marked this pull request as ready for review September 11, 2024 18:26
@ChristopherChudzicki ChristopherChudzicki changed the title Cc/nextjs carousel [NextJS] fix initial carousel position Sep 11, 2024
Copy link
Contributor

@jonkafton jonkafton left a comment

Choose a reason for hiding this comment

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

It works !!

@jonkafton jonkafton removed the Needs Review An open Pull Request that is ready for review label Sep 11, 2024
@ChristopherChudzicki ChristopherChudzicki merged commit d06c0ec into nextjs Sep 11, 2024
jonkafton pushed a commit that referenced this pull request Sep 18, 2024
jonkafton pushed a commit that referenced this pull request Sep 23, 2024
jonkafton pushed a commit that referenced this pull request Sep 23, 2024
jonkafton pushed a commit that referenced this pull request Sep 24, 2024
@odlbot odlbot mentioned this pull request Oct 22, 2024
74 tasks
@rhysyngsun rhysyngsun deleted the cc/nextjs-carousel branch February 7, 2025 20:35
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