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: Split SliceHeaderControls into smaller files #31270

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Dec 3, 2024

SUMMARY

Small refactor to make SliceHeaderControls file easier to read and maintain. Move some functions and types to separate files, move a subcomponent to a separate file, use usePermissions hook to get permissions.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

No functional changes, if the tests pass we should be good to go

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the frontend:refactor Related to refactoring the frontend label Dec 3, 2024
@@ -310,13 +309,13 @@ test('Should show "Drill to detail" with `can_explore` & `can_samples` perms', (
(global as any).featureFlags = {
[FeatureFlag.DrillToDetail]: true,
};
const props = {
...createProps(),
supersetCanExplore: true,
Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez Dec 3, 2024

Choose a reason for hiding this comment

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

Removing this (supersetCanExplore: true) because of the hook usage now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, wasn’t necessary in this test

Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

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

lgtm, mostly just extracting out pieces and all test passing.

@kgabryje kgabryje merged commit 1d44662 into apache:master Dec 3, 2024
34 checks passed
@michael-s-molina michael-s-molina added review:checkpoint Last PR reviewed during the daily review standup and removed review:checkpoint Last PR reviewed during the daily review standup labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend:refactor Related to refactoring the frontend size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants