-
Notifications
You must be signed in to change notification settings - Fork 10.4k
fix: hydration error in [org-slug]/[team-slug], [org-slug]/[team-slug]/[type] pages #17576
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: hydration error in [org-slug]/[team-slug], [org-slug]/[team-slug]/[type] pages #17576
Conversation
@vijayraghav-io is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (11/11/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (11/11/24)1 label was added to this PR based on Keith Williams's automation. |
Ready! |
Hey @vijayraghav-io can you please attach a loom video of the fix. |
…rationerror_orgteampage
Attached before and after fix videos in description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!, tagging @anikdhabal for a final review before approving.
This PR is being marked as stale due to inactivity. |
…rationerror_orgteampage
Gentle Reminder! |
Hey @vijayraghav-io, can you pls resolve merge conflicts? A test seems to be failing. Can you pls address that as well? |
test.describe("Organization Team page", () => { | ||
test("Team page with org domain url", async ({ page, users }) => { | ||
const orgMember = await users.create(undefined, { | ||
hasTeam: true, | ||
isOrg: true, | ||
hasSubteam: true, | ||
isOrgVerified: true, | ||
isDnsSetup: true, | ||
orgRequestedSlug: "example", | ||
schedulingType: SchedulingType.ROUND_ROBIN, | ||
}); | ||
const { team: org } = await orgMember.getOrgMembership(); | ||
const { team } = await orgMember.getFirstTeamMembership(); | ||
const teamEvent = await orgMember.getFirstTeamEvent(team.id); | ||
await orgMember.apiLogin(); | ||
|
||
await test.step("Team page is loaded with profile and can select eventtype", async () => { | ||
await doOnOrgDomain( | ||
{ | ||
orgSlug: org.slug, | ||
page, | ||
}, | ||
async ({ page, goToUrlWithErrorHandling }) => { | ||
await goToUrlWithErrorHandling(`/team/${team.slug}`); | ||
await expect(page.getByTestId("team-name")).toBeVisible(); | ||
await expect(page.getByTestId("event-type-link")).toBeVisible(); | ||
await goToUrlWithErrorHandling(`/team/${team.slug}/${teamEvent.slug}`); | ||
await expect(page.getByTestId("event-title")).toBeVisible(); | ||
await bookEventOnThisPage(page); | ||
} | ||
); | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test seems to be flaky. Can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the hardcoded orgRequestedSlug
, may be the requested slug example
was trying to override an existing org slug and was causing flakiness.
So made the org slug dynamic (which is by default).
Sure will check and update |
…rationerror_orgteampage
WalkthroughThe changes refactor navigation within the Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes were found. All changes align with the requirements of the linked issue. Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
@kart1ka All tests are passing now. The flaky failing test was a unrelated one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@vijayraghav-io Hey, I apologize for a late response and thanks for opening this PR. I agree that we have a hydration error due to nested anchor elements in the team page. The following is my analysis:
So, this issue must be addressed from the component |
What does this PR do?
fixes hydration error due to nested anchor elements.
Before Fix / Issue :
https://www.loom.com/share/20d314a3952c47a4a53b252a5eb79edc?sid=a145ef5f-d97a-4d34-8cc7-882e8a91b05c
After Fix :
https://www.loom.com/share/c72b274adc8441c498d2a8165dc478db?sid=bcc7d554-328b-4bb0-adcd-76e2ff626dd9
Mandatory Tasks (DO NOT REMOVE)