Move page route to /@shortname/<pageEntityUuid>#1650
Conversation
0236249 to
7963159
Compare
47e556e to
55db0e7
Compare
55db0e7 to
ec0a84f
Compare
ec0a84f to
5b262e5
Compare
5b262e5 to
3eb5746
Compare
3eb5746 to
b80f17a
Compare
| /** @todo: re-use the `pageEntityId` provided by `getServerSideProps` */ | ||
| const { routePageEntityId } = | ||
| useRoutePageInfo({ allowUndefined: true }) ?? {}; |
There was a problem hiding this comment.
I wasn't sure what the best way of avoiding this would be, as the sidebar is not rendered as a child of the [page-slug].page.tsx page. Potentially by having some shared context, that the [page-slug].page.tsx page sets on first-render? Curious to get thoughts (cc @nathggns @Alfred-Mountfield @yusufkinatas @luisbettencourt)
There was a problem hiding this comment.
Potentially Next 13 layouts could help with this also, but I'm not too sure...
There was a problem hiding this comment.
Discussed this internally, and came to the realisation that the pageEntityUuid could be used instead. Have addressed in 48aab54
/<accountId>/<pageEntityUuid> to /@shortname/<pageEntityUuid>/@shortname/<pageEntityUuid>
kachkaev
left a comment
There was a problem hiding this comment.
Thanks for addressing my comments @benwerner01! This part of the diff looks great, so happy for someone in the backend team to resolve remaining discussions and approve this PR. We’ll also need to check why the Playwright tests are failing. The logs suggest that it’s something related to routing.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1650 +/- ##
=======================================
Coverage 58.24% 58.24%
=======================================
Files 222 222
Lines 15794 15794
Branches 378 378
=======================================
Hits 9199 9199
Misses 6590 6590
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🌟 What is the purpose of this PR?
This PR moves pages from
/<accountId>/<pageEntityUuid>to/@shortname/<pageEntityUuid>.🔗 Related links
🔍 What does this change?
getServerSidePropsfunction for pages to get thepageEntityIdand thepageWorkspaceon first renderRouteAccountInforeact context toRouteWorkspaceInfo📜 Does this require a change to the docs?
Not that I'm aware of.
pageEntityIdis re-calculated in the sidebar even though it has already been calculated ingetServerSideProps🛡 What tests cover this?
None. This PR was manually tested.
❓ How to test this?
📹 Demo