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: Initialize grant correctly after when page transition #8633
Conversation
@@ -129,6 +132,8 @@ export const useUpdateStateAfterSave = (pageId: string|undefined|null, opts?: Up | |||
mutateEditingMarkdown(updatedPage.revision.body); | |||
} | |||
|
|||
await mutateGrant(); |
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.
ページ保存時にgrantデータがmutateされておらず、ページ移動しても初期化時に入れたgrantデータが保持されたままだったことが不具合の原因だったので、ページ保存時にgrantデータをmutateするようにしました
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.
useSWRxApplicableGrant も同様の理屈で mutate する必要があるんじゃないかな
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.
その必要がありそうだったので追加しました。
@@ -129,6 +132,8 @@ export const useUpdateStateAfterSave = (pageId: string|undefined|null, opts?: Up | |||
mutateEditingMarkdown(updatedPage.revision.body); | |||
} | |||
|
|||
await mutateGrant(); |
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.
useSWRxApplicableGrant も同様の理屈で mutate する必要があるんじゃないかな
reg-suit detected visual differences. Check this report, and review them. 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴 What do the circles mean?The number of circles represent the number of changed images.🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items How can I change the check status?If reviewers approve this PR, the reg context status will be green automatically. |
ストーリー: https://redmine.weseek.co.jp/issues/140819
タスク: https://redmine.weseek.co.jp/issues/143352
やったこと
ページ編集の保存時に、
useSWRxIsGrantNormalized
のmutateを行うようにした