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

[Dashboard] Remove modal for inter app from dashboard #198619

Merged
merged 19 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,14 @@ export class ApplicationService {

private async shouldNavigate(overlays: OverlayStart, nextAppId: string): Promise<boolean> {
const currentAppId = this.currentAppId$.value;
if (currentAppId === undefined) {
if (
currentAppId === undefined ||
(currentAppId === 'dashboards' &&
(nextAppId === 'discover' || nextAppId === 'visualize' || nextAppId === 'lens'))
) {
Copy link
Contributor

@Heenawter Heenawter Nov 4, 2024

Choose a reason for hiding this comment

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

I'm not sure this is the best solution - having all of these hard-coded values seems... risky 🙈 Is there a reason you didn't implement this change via the app leave handler in src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx?

The attached issue was specifically meant to remove this behaviour from dashboard entirely, regardless of the destination app - so I think we should be able to keep the code changes local to the Dashboard plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah ok - refactored in 841b2a8

return true;
}

const action = getLeaveAction(
this.appInternalStates.get(currentAppId)?.leaveHandler,
nextAppId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export default function ({ getService, getPageObjects }) {

await header.waitUntilLoadingHasFinished();
await appsMenu.clickLink('Visualize Library');
await common.clickConfirmOnModal();
expect(await testSubjects.exists('visualizationLandingPage')).to.be(true);
});

Expand Down