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

Upgrade Orval #1539

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Upgrade Orval #1539

merged 5 commits into from
Nov 19, 2024

Conversation

JacobArrow
Copy link
Contributor

@JacobArrow JacobArrow commented Nov 12, 2024

Link to issue

https://reload.atlassian.net/browse/DDFBRA-210

Description

  • Upgraded Orval to latest version
  • Autogenerate files with Orval
  • Invalidate favourites inside button-favourite.tsx
    At some point manual changes were made to the generated Orval files for material-list, and thus a rewrite of removing favourites was neccessary.

@JacobArrow JacobArrow force-pushed the DDFNEXT-205-upgrade-orval branch 3 times, most recently from 1a4c9a9 to 894e99a Compare November 14, 2024 13:36
@JacobArrow JacobArrow marked this pull request as ready for review November 14, 2024 14:42
@JacobArrow JacobArrow changed the title Generate api files with orval Upgrade Orval Nov 14, 2024
@JacobArrow JacobArrow force-pushed the DDFNEXT-205-upgrade-orval branch from 894e99a to 3c2abff Compare November 15, 2024 11:13
Copy link
Contributor

@kasperg kasperg left a comment

Choose a reason for hiding this comment

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

👍 LGTM. I have a few comments for you to consider before you merge.

src/components/button-favourite/button-favourite.tsx Outdated Show resolved Hide resolved
src/core/material-list-api/mutator/fetcher.ts Show resolved Hide resolved
src/core/guardedRequests.slice.ts Show resolved Hide resolved
@kasperg kasperg assigned JacobArrow and unassigned kasperg Nov 18, 2024
JacobArrow and others added 5 commits November 19, 2024 16:32
Previously we would invalidate react query with a manual override of autogenerated orval code. To avoid this we perform the invalidation inside the favourite component instead.
There is no need to invalidate adding favourites, because we only have the option to remove favourites from the favourite list - elsewhere we update the state per material.
Instead of waiting for the request to complete, we remove the fill state optimistically
@JacobArrow JacobArrow force-pushed the DDFNEXT-205-upgrade-orval branch from 76ea7ae to f03f073 Compare November 19, 2024 15:41
@JacobArrow JacobArrow merged commit b6cd08f into develop Nov 19, 2024
21 checks passed
@JacobArrow JacobArrow deleted the DDFNEXT-205-upgrade-orval branch November 19, 2024 16:12
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.

2 participants