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

refactor(ui): move Segments to use Redux storage #2441

Merged
merged 12 commits into from
Nov 27, 2023

Conversation

erka
Copy link
Collaborator

@erka erka commented Nov 24, 2023

Try to use Redux RTK for Segments.

  • move Segments crud to Redux
  • use new api instead of listSegments
  • move Constraints
  • move copy to new api
  • clean everything up

Refs: #2433

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a189086) 70.76% compared to head (3966d5e) 70.76%.
Report is 2 commits behind head on main.

❗ Current head 3966d5e differs from pull request most recent head 9da087e. Consider uploading reports for the commit 9da087e to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2441   +/-   ##
=======================================
  Coverage   70.76%   70.76%           
=======================================
  Files          81       81           
  Lines        8110     8110           
=======================================
  Hits         5739     5739           
  Misses       2025     2025           
  Partials      346      346           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erka erka marked this pull request as ready for review November 25, 2023 20:43
@erka erka requested a review from a team as a code owner November 25, 2023 20:43
@@ -61,12 +61,10 @@ export default function Rules() {
const namespace = useSelector(selectCurrentNamespace);
const readOnly = useSelector(selectReadonly);

const segments = useListSegmentsQuery(namespace.key)?.data?.segments || [];

Copy link
Collaborator

Choose a reason for hiding this comment

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

@erka is this something to worry about? ☝🏻

Copy link
Collaborator

Choose a reason for hiding this comment

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

CleanShot 2023-11-26 at 12 53 59

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I modified the code to address it.

Copy link
Collaborator

@markphelps markphelps left a comment

Choose a reason for hiding this comment

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

one outstanding question, otherwise lgtm! I tested with setting up GitHub auth too to ensure the headers were passed correctly as well.

Copy link
Collaborator

@markphelps markphelps left a comment

Choose a reason for hiding this comment

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

Looks great. Thank you @erka 😊

@markphelps markphelps enabled auto-merge (squash) November 26, 2023 23:48
@markphelps
Copy link
Collaborator

Theres currently something broken with our fs/git integration tests on main, looking into it now

@markphelps markphelps merged commit 38569b5 into flipt-io:main Nov 27, 2023
27 checks passed
@erka erka deleted the use-redux-for-segments branch November 30, 2023 16:44
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