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

Create CRUD endpoints for pages/groups #14582

Open
4 tasks
Jondyr opened this issue Feb 5, 2025 · 0 comments · May be fixed by #14717
Open
4 tasks

Create CRUD endpoints for pages/groups #14582

Jondyr opened this issue Feb 5, 2025 · 0 comments · May be fixed by #14717
Assignees
Labels
added-to-sprint kind/chore status/draft Status: When you create an issue before you have enough info to properly describe the issue. team/studio-domain2

Comments

@Jondyr
Copy link
Member

Jondyr commented Feb 5, 2025

Description

Instead of sending multiple requests and also sending the whole (and potentially outdated) Settings.json file upon doing changes to pages, we should have backend endpoints for just those specific actions.

Additional Information

This lets the backend do the heavy lifting and avoids issues, for example from multiple requests being sent quickly (like this issue https://digdir.slack.com/archives/C077KTTCBSS/p1738755536603919) or one of the requests failing, leaving the app in a broken state.

Testing

Deploy the top branch of the PR stack (currently #14717) and test:

  • Page modifying operations on the frontend
  • Multiple requests to page related endpoints on a slow internet connection does not result in invalid states or exceptions
  • Page re-ordering
  • Layout editing works after modifying pages (order, name or addition/deletion)

Tasks

example of needed endpoint routes:
POST /layout/pages/create
DELETE /layout/{layoutname}/page/{pageid}
PUT /layout/{layoutname}/page/{pageId}
GET not needed? how do we avoid stale caches being mutated without this, optimistic cache updates?

Also implement these as tanstack mutations, and change the frontend logic to use these (and invalidate layout caches?)

Acceptance Criterias

No response

@Jondyr Jondyr added kind/chore status/draft Status: When you create an issue before you have enough info to properly describe the issue. labels Feb 5, 2025
@Jondyr Jondyr moved this to 📈 Todo in Team Studio Feb 5, 2025
@Jondyr Jondyr changed the title Create CRUD endpoints for layout/pages Create CRUD endpoints for layout/pages/groups Feb 10, 2025
@Jondyr Jondyr changed the title Create CRUD endpoints for layout/pages/groups Create CRUD endpoints for pages/groups Feb 10, 2025
@Jondyr Jondyr self-assigned this Feb 13, 2025
@Jondyr Jondyr moved this from 📈 Todo to 👷 In Progress in Team Studio Feb 13, 2025
@Jondyr Jondyr moved this from 👷 In Progress to 🧪 Test in Team Studio Feb 26, 2025
@Jondyr Jondyr linked a pull request Feb 26, 2025 that will close this issue
4 tasks
@Jondyr Jondyr removed their assignment Feb 26, 2025
@mlqn mlqn assigned mlqn and Jondyr and unassigned mlqn Feb 26, 2025
@Jondyr Jondyr assigned mlqn and unassigned Jondyr Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added-to-sprint kind/chore status/draft Status: When you create an issue before you have enough info to properly describe the issue. team/studio-domain2
Projects
Status: 🧪 Test
Development

Successfully merging a pull request may close this issue.

2 participants