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

chore(Home): Avoid firing API requests when a custom Home is used #29493

Merged
merged 4 commits into from
Jul 5, 2024

Conversation

Vitor-Avila
Copy link
Contributor

SUMMARY

It's possible to override the content for the Homepage through the extensionRegistry (available options include welcome.banner, welcome.main.replacement and welcome.message).

Currently, regardless if a custom Homepage is set the React hook responsible for fetching the data is always called, resulting in additional/un-necessary API calls for Organizations with a custom home component implemented.

This PR avoids the data fetching process in case a custom Home is defined (through welcome.main.replacement).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

No UI changes.

TESTING INSTRUCTIONS

Added test.

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 home Namespace | Related to the Homepage label Jul 4, 2024
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jul 4, 2024
@Vitor-Avila Vitor-Avila merged commit 0f60701 into apache:master Jul 5, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
home Namespace | Related to the Homepage size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants