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

React query for form layouts #10140

Merged
merged 2 commits into from
Apr 13, 2023
Merged

React query for form layouts #10140

merged 2 commits into from
Apr 13, 2023

Conversation

TomasEng
Copy link
Contributor

@TomasEng TomasEng commented Apr 5, 2023

Description

Added React Query for form layouts, along with some improvements on typing and test coverage. In general, I have moved the logic from formLayoutSagas to React Query mutation hooks. I have also added React Query Devtools, which is a very helpful component that is only visible in development mode.

In addition, I have changed the logic that sets the "base container" ID. The old code set the ID to some random value, which led to bugs because this could happen multiple times and there was no intuitive way to find it in the list of containers. Therefore I have given it a constant value. Although this might be a better solution, it is still a quick fix, so we should consider finding a better way to handle this.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Apr 5, 2023
@TomasEng TomasEng linked an issue Apr 5, 2023 that may be closed by this pull request
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@TomasEng TomasEng force-pushed the react-query-form-layouts branch 3 times, most recently from 6a9665a to d7d824d Compare April 11, 2023 06:25
@github-actions github-actions bot added the area/text-editor Area: Issues that relate to the text editor label Apr 11, 2023
@TomasEng TomasEng force-pushed the react-query-form-layouts branch 2 times, most recently from 06a8d0d to 13ebfbe Compare April 11, 2023 07:08
@TomasEng TomasEng marked this pull request as ready for review April 11, 2023 07:49
Copy link
Collaborator

@framitdavid framitdavid left a comment

Choose a reason for hiding this comment

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

Veldig bra jobba! Dette var et godt stykke arbeid! 👏 🎖️

Copy link
Member

@nkylstad nkylstad left a comment

Choose a reason for hiding this comment

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

Great job! 🥳

@TomasEng TomasEng merged commit fada904 into master Apr 13, 2023
6 checks passed
@TomasEng TomasEng deleted the react-query-form-layouts branch April 13, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/text-editor Area: Issues that relate to the text editor area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement React Query for form layouts
3 participants