Skip to content

Commit

Permalink
Merge branch 'master' into feature-user-settings
Browse files Browse the repository at this point in the history
* master:
  update luigi in fiddle
  Change Search using Luigi.globalSearch() API (#1690) (#1734)
  Fix `withoutSync()` history behaviour (#1720)
  Update index.scss
  Bump highlight.js in /core/examples/luigi-example-vue (#1723)
  • Loading branch information
JohannesDoberer committed Dec 2, 2020
2 parents f13522f + ef126b8 commit b2f4026
Show file tree
Hide file tree
Showing 17 changed files with 624 additions and 270 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/.

# These are the default owners for the whole content of the `luigi` repository. The default owners are automatically added as reviewers when you open a pull request, unless different owners are specified in the file.
* @alexandra-simeonova @hardl @johannesdoberer @maxmarkus @ndricimrr @stanleychh @ulianamunich @antiheld
* @alexandra-simeonova @hardl @johannesdoberer @maxmarkus @ndricimrr @stanleychh @ulianamunich @antiheld @legteodav
6 changes: 3 additions & 3 deletions core/examples/luigi-example-vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 41 additions & 37 deletions core/src/App.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<svelte:window on:resize="{onResize}" />
<svelte:window on:resize="{onResize}"/>
<div id="app" class="{hideNav? 'no-nav' : ''} {hideSideNav? 'no-side-nav':''}">
{#if alerts && alerts.length}
<Alerts alertQueue="{alerts}" on:alertDismiss="{handleAlertDismissExternal}"></Alerts>
<Alerts alertQueue="{alerts}" on:alertDismiss="{handleAlertDismissExternal}"></Alerts>
{/if}
{#if mfModal.displayed}
<Modal
settings="{mfModal.settings}"
nodepath="{mfModal.nodepath}"
on:close="{closeModal}"
on:iframeCreated="{modalIframeCreated}"
></Modal>
<Modal
settings="{mfModal.settings}"
nodepath="{mfModal.nodepath}"
on:close="{closeModal}"
on:iframeCreated="{modalIframeCreated}"
></Modal>
{/if}
{#if mfDrawer.displayed && mfDrawer.settings.isDrawer}
<Modal
settings="{mfDrawer.settings}"
nodepath="{mfDrawer.nodepath}"
on:close="{closeDrawer}"
on:drawerState="{setDrawerState}"
on:iframeCreated="{drawerIframeCreated}"
>
<Backdrop area="drawer" disable="{disableBackdrop}"></Backdrop>
</Modal>
<Modal
settings="{mfDrawer.settings}"
nodepath="{mfDrawer.nodepath}"
on:close="{closeDrawer}"
on:drawerState="{setDrawerState}"
on:iframeCreated="{drawerIframeCreated}"
>
<Backdrop area="drawer" disable="{disableBackdrop}"></Backdrop>
</Modal>
{/if}
{#if confirmationModal.displayed}
<ConfirmationModal
settings="{confirmationModal.settings}"
on:modalConfirm="{()=> handleModalResult(true)}"
on:modalDismiss="{() => handleModalResult(false)}"
></ConfirmationModal>
<ConfirmationModal
settings="{confirmationModal.settings}"
on:modalConfirm="{()=> handleModalResult(true)}"
on:modalDismiss="{() => handleModalResult(false)}"
></ConfirmationModal>
{/if}
<Backdrop disable="{disableBackdrop}">
<div
Expand Down Expand Up @@ -263,23 +263,28 @@
const addPreserveView = (data, config) => {
if (data.params.preserveView || data.params.viewgroup) {
const nextPath = buildPath(data.params);

$: preservedViews.push({
path: Routing.getNodePath(currentNode, urlParamsRaw),
nextPath: nextPath.startsWith('/') ? nextPath : '/' + nextPath,
context
});
//mark iframe with pv if there is a preserved view situation

// Mark iframe with pv if there is a preserved view situation
config.iframe['pv'] = 'pv';
}
};

const handleNavigation = (data, config) => {
let path = buildPath(data.params);

path = GenericHelpers.addLeadingSlash(path);

addPreserveView(data, config);

Routing.navigateTo(path); //navigate to the raw path. Any errors/alerts are handled later
// Navigate to the raw path. Any errors/alerts are handled later.
// Make sure we use `replaceState` instead of `pushState` method if navigation sync is disabled.
Routing.navigateTo(path, isNavigationSyncEnabled);
};

const removeQueryParams = str => str.split('?')[0];
Expand Down Expand Up @@ -313,7 +318,7 @@
}
resolve();
},
() => { }
() => {}
);
} else {
resolve();
Expand Down Expand Up @@ -515,10 +520,7 @@
} else if (node.drawer) {
const route = RoutingHelpers.buildRoute(node, `/${node.pathSegment}`);
node.drawer.isDrawer = true;
openViewInDrawer(
route,
node.drawer
);
openViewInDrawer(route, node.drawer);
} else {
getComponentWrapper().set({ isNavigationSyncEnabled: true });
Routing.handleRouteClick(node, getComponentWrapper());
Expand Down Expand Up @@ -904,7 +906,7 @@
modalIframeData = event.detail.modalIframeData;
};

const closeModal = (event) => {
const closeModal = event => {
if (modalIframe) {
getUnsavedChangesModalPromise(modalIframe.contentWindow).then(() => {
resetMicrofrontendModalData();
Expand Down Expand Up @@ -944,15 +946,18 @@
drawerIframeData = event.detail.modalIframeData;
};

const setDrawerState = (event) => {
const setDrawerState = event => {
activeDrawer = event.detail.activeDrawer;
}
};

const closeDrawer = (event) => {
const closeDrawer = event => {
if (event && event.detail && event.detail.activeDrawer !== undefined) {
activeDrawer = event.detail.activeDrawer;
}
if (!activeDrawer || (event && event.detail && event.detail.type !== 'modal')) {
if (
!activeDrawer ||
(event && event.detail && event.detail.type !== 'modal')
) {
if (drawerIframe) {
getUnsavedChangesModalPromise(drawerIframe.contentWindow).then(() => {
resetMicrofrontendDrawerData();
Expand Down Expand Up @@ -1056,7 +1061,6 @@
}

if ('luigi.get-context' === e.data.msg) {

config.iframe.luigi.clientVersion = e.data.clientVersion; // undefined for v0.x clients
config.iframe.luigi.initOk = false; // get-context indication. used for handshake verification

Expand Down Expand Up @@ -1373,7 +1377,7 @@
thirdPartyCookieCheckIframe.src =
thirdPartyCookiesCheck.thirdPartyCookieScriptLocation;
document.body.appendChild(thirdPartyCookieCheckIframe);
thirdPartyCookieCheckIframe.onload = function () {
thirdPartyCookieCheckIframe.onload = function() {
setTimeout(() => {
if (thirdPartyCookiesStatus() === 'disabled') {
tpcErrorHandling(thirdPartyCookiesCheck);
Expand All @@ -1385,7 +1389,7 @@
}
});

afterUpdate(() => { });
afterUpdate(() => {});
</script>

<style type="text/scss">
Expand Down
Loading

0 comments on commit b2f4026

Please sign in to comment.