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

enhancement: add relation data to history versions response #20035

Merged
merged 4 commits into from Apr 4, 2024

Conversation

remidej
Copy link
Contributor

@remidej remidej commented Apr 4, 2024

ℹ️ This PR replaces #19786, as the git history became too much of a mess on that one

What does it do?

  • Saves only the ID in the data key when history versions are related
  • On retrieval, for each relation and media, populate an object with results and missingCount
  • This PR starts messing around with the frontend too (relation input in history), but it's mostly pseudocode to make sure the approach works. The actual implementation is a separate ticket.

Why is it needed?

We need to display relations in history. And showing that some relations were deleted requires special handling.

How to test it?

🚨 Because of the data structure change, your app may crash with pre-existing history versions 🚨

Create history versions with some relations. View history, you should see the data. Go delete the related content, you should see that too in the history frontend.

@remidej remidej added source: core:content-manager Source is core/content-manager package pr: enhancement This PR adds or updates some part of the codebase or features labels Apr 4, 2024
@remidej remidej self-assigned this Apr 4, 2024
Copy link

vercel bot commented Apr 4, 2024

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

Name Status Preview Comments Updated (UTC)
contributor-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 8:53pm

Copy link
Contributor

@markkaylor markkaylor left a comment

Choose a reason for hiding this comment

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

Couple quick questions before I give it a deeper look and test it out

@derrickmehaffy
Copy link
Member

This looks interesting, could you share a quick screenshot of what this looks like?

@remidej
Copy link
Contributor Author

remidej commented Apr 4, 2024

@derrickmehaffy the frontend isn't ready but it will look like this
CleanShot 2024-04-04 at 12 57 52@2x

Copy link
Contributor

@markkaylor markkaylor left a comment

Choose a reason for hiding this comment

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

Nice, I tested it kinda quickly but it looks like it's working. Left some comments but I think we are good to merge.

@remidej remidej merged commit 163e91a into v5/main Apr 4, 2024
85 of 92 checks passed
@remidej remidej deleted the history/relations-backend branch April 4, 2024 21:31
@derrickmehaffy
Copy link
Member

@derrickmehaffy the frontend isn't ready but it will look like this
CleanShot 2024-04-04 at 12 57 52@2x

Looks awesome thank you 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: enhancement This PR adds or updates some part of the codebase or features source: core:content-manager Source is core/content-manager package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants