Skip to content

fix: render hours using useIsomorphicLayoutEffect#147

Merged
mkilpatrick merged 2 commits intomainfrom
hours-isomorphic
Apr 16, 2026
Merged

fix: render hours using useIsomorphicLayoutEffect#147
mkilpatrick merged 2 commits intomainfrom
hours-isomorphic

Conversation

@mkilpatrick
Copy link
Copy Markdown
Collaborator

This is to fix the client-computed hours renderings before the paint. useEffect results in a blank painted frame. This led to issues with tests in visual-editor thinking the hours were properly rendered before they really were.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 16, 2026

⚠️ No Changeset found

Latest commit: e6305ef

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

Warning

Rate limit exceeded

@yext-bot has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 12 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 12 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45770ba0-4a4a-493e-a6d8-5f7295ef0382

📥 Commits

Reviewing files that changed from the base of the PR and between 66b0657 and e6305ef.

📒 Files selected for processing (6)
  • packages/pages-components/src/components/hours/hoursStatus.hydration.test.tsx
  • packages/pages-components/src/components/hours/hoursStatus.ssr.test.tsx
  • packages/pages-components/src/components/hours/hoursStatus.tsx
  • packages/pages-components/src/components/hours/hoursTable.hydration.test.tsx
  • packages/pages-components/src/components/hours/hoursTable.ssr.test.tsx
  • packages/pages-components/src/components/hours/hoursTable.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hours-isomorphic

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@benlife5 benlife5 left a comment

Choose a reason for hiding this comment

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

Whether to use useLayoutEffect for an hours component is the sort of debate that ChatGPT will either support or argue against depending on which way you lean on it. Seems like there might be a slight performance hit but I think it's worth not painting blank (status) or static content (table) and then re-painting with the correct data

Copy link
Copy Markdown
Contributor

@jwartofsky-yext jwartofsky-yext left a comment

Choose a reason for hiding this comment

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

lgtm!

@mkilpatrick mkilpatrick merged commit bdf6dcf into main Apr 16, 2026
22 checks passed
@mkilpatrick mkilpatrick deleted the hours-isomorphic branch April 16, 2026 19:59
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.

4 participants