-
Notifications
You must be signed in to change notification settings - Fork 427
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(core): update useReleaseHistory to fetch with the version documents #7463
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Sep 4, 2024 12:26 PM (UTC) ✅ All Tests Passed -- expand for details
|
@@ -21,14 +24,14 @@ export function useReleaseHistory(bundleDocumentsIds: string[]): { | |||
const {dataset, token} = client.config() | |||
const [history, setHistory] = useState<TransactionLogEventWithEffects[]>([]) | |||
const queryParams = `tag=sanity.studio.tasks.history&effectFormat=mendoza&excludeContent=true&includeIdentifiedDocumentsOnly=true` | |||
|
|||
const publishedIds = bundleDocumentsIds.map((id) => getPublishedId(id)).join(',') | |||
const publishedIds = bundleDocumentsIds.map((id) => getVersionId(id, releaseId)).join(',') |
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.
I think we might need to rename the const to documentIds or maybe add a comment to clarify? Just bringing it up since we are technically bringing up a bunch of version ids (which are not publishedIds) 🤔
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.
I agree @RitaDias. Based on my understanding from glancing over the code, at least 🙂.
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.
TRUE missed that rename! will push the update and merge
…ts (#7463) * fix(core): update useReleaseHistory to fetch with the version documents * fix(core): rename publishedIds to versionIds in useReleaseHistory
…ts (#7463) * fix(core): update useReleaseHistory to fetch with the version documents * fix(core): rename publishedIds to versionIds in useReleaseHistory
…ts (#7463) * fix(core): update useReleaseHistory to fetch with the version documents * fix(core): rename publishedIds to versionIds in useReleaseHistory
Description
The
useReleaseHistory
hook was incorrectly constructing the ID of the documents it needs to fetch and construct the history.What to review
Testing
Notes for release