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

Fix Interactive embedding dashboard with multiple tabs and parameter header=false will not load #39005

Conversation

WiNloSt
Copy link
Member

@WiNloSt WiNloSt commented Feb 21, 2024

Note

This fix is required in order to work on #38429

Closes #39002

Description

The problem came from the way we use header=false.

{isHeaderVisible && (
<DashboardHeaderContainer
isFullscreen={isFullscreen}
isNightMode={shouldRenderAsNightMode}
>
<DashboardHeader

Here we see that we don't render DashboardHeader when !isHeaderVisible and this property is read from the header parameter.

export const getIsHeaderVisible = createSelector(
[getIsEmbedded, getEmbedOptions],
(isEmbedded, embedOptions) => !isEmbedded || !!embedOptions.header,
);

Inside DashboardHeader it calls useDashboardTabs

} = useDashboardTabs({ location, dashboardId });

which will initiate the Redux state dashboard.selectedTabId, without this value, the dashboard card will never load.

if (previousTabId !== selectedTabId) {
fetchDashboardCardData();
fetchDashboardCardMetadata();
return;
}

How to verify

Demo

Before

The dashboard card will never start loading

After

image

Checklist

  • Tests have been added/updated to cover changes in this PR

isFullscreen={isFullscreen}
isNightMode={shouldRenderAsNightMode}
>
{/**
Copy link
Member Author

Choose a reason for hiding this comment

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

Please read the PR description for full details.

@WiNloSt WiNloSt requested review from a team February 21, 2024 13:59
@WiNloSt WiNloSt added the backport Automatically create PR on current release branch on merge label Feb 21, 2024
Copy link

replay-io bot commented Feb 21, 2024

Status In Progress ↗︎ 51 / 52
Commit 02be470
Results
4 Failed
⚠️ 7 Flaky
2264 Passed

@WiNloSt
Copy link
Member Author

WiNloSt commented Feb 21, 2024

Superseded by #39007

@WiNloSt WiNloSt closed this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/Embedding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive embedding dashboard with multiple tabs and parameter header=false will not load
2 participants