Skip to content
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

feat(tasks): track activity changes with document history. #5965

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

pedrobonamin
Copy link
Contributor

@pedrobonamin pedrobonamin commented Mar 12, 2024

Description

Adds tasks activity log.
Shows history changes made by users.

image

What to review

Testing

Notes for release

Copy link

vercel bot commented Mar 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Mar 12, 2024 4:47pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 4:47pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 12, 2024 4:47pm

@pedrobonamin pedrobonamin force-pushed the edx-1088 branch 2 times, most recently from 2a03eab to 2880abf Compare March 12, 2024 14:18
Base automatically changed from edx-1088 to next March 12, 2024 14:34
Signed-off-by: Fred Carlsen <fred@sjelfull.no>
Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 12, 2024

Component Testing Report Updated Mar 12, 2024 4:52 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 2s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 4s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 20s 9 0 0

@pedrobonamin pedrobonamin marked this pull request as ready for review March 12, 2024 15:19
@pedrobonamin pedrobonamin requested a review from a team as a code owner March 12, 2024 15:19
@pedrobonamin pedrobonamin requested review from jtpetty and ninaandal and removed request for a team March 12, 2024 15:19
* @param fieldsToTrack - The fields to track for changes.
* @returns An array of changes for the tracked fields.
*/
export function trackFieldChanges(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be nice to have some tests added to this next week @sjelfull


const queryParams = `tag=sanity.studio.tasks.history&effectFormat=mendoza&excludeContent=true&includeIdentifiedDocumentsOnly=true&reverse=true`
const transactionsUrl = client.getUrl(
`/data/history/${dataset}/transactions/${task._id}?${queryParams}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

is task._id always guaranteed to be URL safe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should always return a published id, so it should be safe, but I will modify it to force the use of a published id here, in case we enable the drafts later in the process.
Thanks

Merged via the queue into next with commit 0a76390 Mar 12, 2024
36 checks passed
@pedrobonamin pedrobonamin deleted the feat/edx-1137 branch March 12, 2024 16:53
juice49 pushed a commit that referenced this pull request Mar 13, 2024
* feat(tasks): track task changes with document history

Signed-off-by: Fred Carlsen <fred@sjelfull.no>

* feat(tasks): update tasks activity log to display values

* fix(tasks): always fetch publishedId, add client api version

* fix(tasks): update status selector and workspace provider to disable warnings generated

---------

Signed-off-by: Fred Carlsen <fred@sjelfull.no>
Co-authored-by: Fred Carlsen <fred@sjelfull.no>
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.

None yet

3 participants