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

upcoming: [M3-7993] - PlacementGroups Select optimizations & cleanup #10455

Merged
merged 10 commits into from
May 14, 2024

Conversation

abailly-akamai
Copy link
Contributor

@abailly-akamai abailly-akamai commented May 9, 2024

Description 📝

This PR addresses small tech debt left by iterations on the PlacementGroupSelect component and related utils.

Changes 🔄

  • PlacementGroupSelect now filters PGs via query instead of client-side
  • Cleanup PlacementGroupSelect props and remove what's unused
  • Remove duplicate state management in PlacementGroupDetailPanel
  • Use selectedPlacementGroupId rather than the whole PG object for prop drilling
  • Allow useAllPlacementGroupsQuery query to take a filter
  • Small capitalization copy change for the PlacementGroupSelect noOptionsMessage

Preview 📷

There should be no visual change as a result of this PR

How to test 🧪

ℹ️ Test in ALPHA

Verification steps

  • Confirm behavior of PG select in Linode Create Flow (both v1 and v2)
    • Make sure PGs are properly filtered by region
    • Make sure flows work and PG is selected in the final payload
    • Make sure we can create & select a new PG in the the v1 and v2 linode create flows
  • Confirm behavior of PG select in Linode Migration Flow

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@abailly-akamai abailly-akamai changed the title upcoming: [M3-7993] - Placement groups optimizations upcoming: [M3-7993] - PlacementGroups Select optimizations & cleanup May 13, 2024
@abailly-akamai abailly-akamai marked this pull request as ready for review May 13, 2024 14:50
@abailly-akamai abailly-akamai requested a review from a team as a code owner May 13, 2024 14:50
@abailly-akamai abailly-akamai requested review from jdamore-linode and bnussman-akamai and removed request for a team May 13, 2024 14:50
Copy link

github-actions bot commented May 13, 2024

Coverage Report:
Base Coverage: 82%
Current Coverage: 82.01%

Copy link
Contributor

@bnussman-akamai bnussman-akamai 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! Thanks for addressing this stuff

Comment on lines -38 to -41
const [
selectedPlacementGroup,
setSelectedPlacementGroup,
] = React.useState<PlacementGroup | null>(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

++

@carrillo-erik
Copy link
Contributor

Nice clean up! Verified that Placement Groups functionality worked as expected using both versions of the Linode Create Flow.

@abailly-akamai abailly-akamai merged commit a1e1213 into linode:develop May 14, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants