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

Remove backdrop on node change #2807

Merged
merged 9 commits into from
Jul 12, 2022
5 changes: 4 additions & 1 deletion core/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
LuigiConfig,
LuigiElements,
LuigiGlobalSearch,
LuigiFeatureToggles,
LuigiTheming,
LuigiRouting,
LuigiUX,
} from './core-api';
import { Navigation } from './navigation/services/navigation';
import { Routing } from './services/routing';
Expand Down Expand Up @@ -401,6 +401,9 @@
}
closeModal();

// remove backdrop
LuigiUX.removeBackdrop();

closeSplitView();

Routing.handleRouteChange(
Expand Down
10 changes: 10 additions & 0 deletions core/src/core-api/ux.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { APP_LOADING_INDICATOR } from './../utilities/constants';
import { GenericHelpers } from '../utilities/helpers';
import { get, writable } from 'svelte/store';
import { linkManager } from './_internalLinkManager';
import { SemiCollapsibleNavigation } from './../navigation/services/semi-collapsed-navigation';
/**
* Functions to use Luigi Core UX features.
Expand Down Expand Up @@ -156,6 +157,15 @@ class LuigiUX {
closeUserSettings() /* istanbul ignore next */ {
Luigi.closeUserSettings();
}

/**
* Removes backdrop. Function only used internally
* @memberof UX
* @private
*/
removeBackdrop() {
new linkManager().sendPostMessageToLuigiCore({ msg: 'luigi.remove-backdrop' });
}
}

export const ux = new LuigiUX();
1 change: 1 addition & 0 deletions docs/luigi-core-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,7 @@ Add a feature toggle to an active feature toggles list
##### Parameters

- `featureToggleName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the name of the feature toggle
- `fromUrlQuery` (optional, default `false`)
ndricimrr marked this conversation as resolved.
Show resolved Hide resolved

##### Examples

Expand Down