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

[MTV-1967] Create plan wizard state is not set correctly when re-selecting a source provider #1447

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jpuzz0
Copy link
Contributor

@jpuzz0 jpuzz0 commented Jan 30, 2025

📝 Links

References: https://issues.redhat.com/browse/MTV-1967

📝 Description

When using the create migration plan wizard, selecting a provider, then de-selecting and selecting another (could be the same), source storage and network mappings were being set to empty arrays and therefore disallowing users from selecting mappings on step 2 of the wizard.

This change addresses this, limits the initialization of state to the initial call of the useFetchEffects hook (which prevents the resetting of plan name validation), and also addresses other unnecessary re-rending within the useFetchEffects hook, which could use some refactoring still, as the amount of useEffects there leads to that hook being unreadable and one can easily get lost as to which effect they're looking at or even what this generically called hook's purpose is.

🎥 Demo

Screen.Recording.2025-01-30.at.11.08.43.AM.mov

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 36.33%. Comparing base (13484d0) to head (5e4afde).
Report is 212 commits behind head on main.

Files with missing lines Patch % Lines
...rc/modules/Providers/hooks/useProviderInventory.ts 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
- Coverage   36.81%   36.33%   -0.48%     
==========================================
  Files         158      156       -2     
  Lines        2548     2521      -27     
  Branches      599      592       -7     
==========================================
- Hits          938      916      -22     
+ Misses       1428     1423       -5     
  Partials      182      182              

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

@jpuzz0 jpuzz0 requested a review from sgratch January 30, 2025 16:19
@jpuzz0 jpuzz0 added the bug Categorizes issue or PR as related to a bug. label Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants