From 2b63fa070afe0f2ce0b83434c6831b2700e2903b Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Tue, 2 Apr 2019 08:46:58 +0200 Subject: [PATCH 1/7] docu for modal --- docs/luigi-client-api.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index 64dde6997a..81be02040d 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -88,6 +88,9 @@ Navigates to the given path in the application hosted by Luigi. It contains eith - `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to - `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** - `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the [goBack()](#goBack) function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard [navigate()](#navigate) function is used instead of [goBack()](#goBack). +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Opens a view in a modal. Settings to configure the title and size. +- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title (default is node label or empty) +- `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) #### Examples @@ -95,6 +98,7 @@ Navigates to the given path in the application hosted by Luigi. It contains eith LuigiClient.linkManager().navigate('/overview') LuigiClient.linkManager().navigate('users/groups/stakeholders') LuigiClient.linkManager().navigate('/settings', null, true) // preserve view +LuigiClient.linkManager().navigate('/overview', null, true, {title:'Overview', size:'m'}) ``` ### fromContext @@ -187,6 +191,25 @@ LuigiClient.linkManager().goBack({ foo: 'bar' }); LuigiClient.linkManager().goBack(true); ``` +### openAsModal + +Opens a view in a modal. It is possible to specify a title and size. If nothing is specified, the title will be the node label or empty if no node label is set. Default size of the modal is set to large (l), which means 80%. It is also possible to specify m (60%) and s (40%) as modal size. Use it optionally in combination with any of the navigation functions. + +#### Parameters +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Settings to configure the title and size. +- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title (default is node label or empty if no label is defined) +- `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) + +#### Examples + +```javascript +LuigiClient.linkManager().openAsModal('/projects/pr2', {title:'Project 2', size: 'm'}) +LuigiClient.linkManager.withParams({foo: "bar"}).openAsModa("path", {title:'Foo'}) +LuigiClient.linkManager.fromClosestContext().openModal('/users/groups/stakeholders', {size:'s'}) +``` + + ## uxManager ### showLoadingIndicator From 607bbff44596847eb86cf6bfbff3c2a24853cdee Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Tue, 2 Apr 2019 09:08:48 +0200 Subject: [PATCH 2/7] docu --- docs/luigi-client-api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index 81be02040d..8d1a7ca727 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -89,7 +89,7 @@ Navigates to the given path in the application hosted by Luigi. It contains eith - `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** - `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the [goBack()](#goBack) function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard [navigate()](#navigate) function is used instead of [goBack()](#goBack). - `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Opens a view in a modal. Settings to configure the title and size. -- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title (default is node label or empty) +- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title (default is node label or empty if no label is defined) - `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) #### Examples @@ -205,8 +205,8 @@ Opens a view in a modal. It is possible to specify a title and size. If nothing ```javascript LuigiClient.linkManager().openAsModal('/projects/pr2', {title:'Project 2', size: 'm'}) -LuigiClient.linkManager.withParams({foo: "bar"}).openAsModa("path", {title:'Foo'}) -LuigiClient.linkManager.fromClosestContext().openModal('/users/groups/stakeholders', {size:'s'}) +LuigiClient.linkManager.withParams({foo: "bar"}).openAsModal("path", {title:'Foo'}) +LuigiClient.linkManager.fromClosestContext().openAsModal('/users/groups/stakeholders', {size:'s'}) ``` From 522a1e5de7c6aeb947821f4d1922d22d6c51379a Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Tue, 2 Apr 2019 15:28:05 +0200 Subject: [PATCH 3/7] docu improvements --- docs/luigi-client-api.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index 8d1a7ca727..9dff3b3bd6 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -88,8 +88,8 @@ Navigates to the given path in the application hosted by Luigi. It contains eith - `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to - `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** - `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the [goBack()](#goBack) function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard [navigate()](#navigate) function is used instead of [goBack()](#goBack). -- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Opens a view in a modal. Settings to configure the title and size. -- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title (default is node label or empty if no label is defined) +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Opens a view in a modal. Use these settings to configure the modal's title and size. +- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. - `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) #### Examples @@ -193,12 +193,12 @@ LuigiClient.linkManager().goBack(true); ### openAsModal -Opens a view in a modal. It is possible to specify a title and size. If nothing is specified, the title will be the node label or empty if no node label is set. Default size of the modal is set to large (l), which means 80%. It is also possible to specify m (60%) and s (40%) as modal size. Use it optionally in combination with any of the navigation functions. +Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. #### Parameters -- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to -- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Settings to configure the title and size. -- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title (default is node label or empty if no label is defined) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size. +- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. - `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) #### Examples From 1d02bee6713a8c5c77c94af4aef6dc18ebad64c2 Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Tue, 2 Apr 2019 16:33:08 +0200 Subject: [PATCH 4/7] improvements --- client/src/luigi-client.js | 4 ++-- docs/luigi-client-api.md | 43 ++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/client/src/luigi-client.js b/client/src/luigi-client.js index 986be0bd3b..d999edf93d 100644 --- a/client/src/luigi-client.js +++ b/client/src/luigi-client.js @@ -252,7 +252,7 @@ const LuigiClient = { * @param {boolean} preserveView Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the {@link #goBack goBack()} function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard {@link #navigate navigate()} function is used instead of {@link #goBack goBack()}. * @param {Object} modalSettings opens a microfrontend as a modal with possibility to specify a title and size * @param {string} modalSettings.title modal title - * @param {string} modalSettings.size size of the modal (l=large 80% default, m=medium 60%, s=small 40%) + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=large 80%, m=medium 60%, s=small 40%) * @example * LuigiClient.linkManager().navigate('/overview') * LuigiClient.linkManager().navigate('users/groups/stakeholders') @@ -286,7 +286,7 @@ const LuigiClient = { * @param {string} path path to be navigated to * @param {Object} modalSettings settings to customize the modal title and size * @param {string} modalSettings.title modal title - * @param {string} modalSettings.size size of the modal (l=large 80% default, m=medium 60%, s=small 40%) + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=large 80%, m=medium 60%, s=small 40%) * @example * LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'}); */ diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index 9dff3b3bd6..ef0148b8d3 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -88,9 +88,9 @@ Navigates to the given path in the application hosted by Luigi. It contains eith - `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to - `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** - `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the [goBack()](#goBack) function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard [navigate()](#navigate) function is used instead of [goBack()](#goBack). -- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Opens a view in a modal. Use these settings to configure the modal's title and size. -- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. -- `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a microfrontend as a modal with possibility to specify a title and size + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title + - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=large 80%, m=medium 60%, s=small 40%) (optional, default `l`) #### Examples @@ -98,7 +98,23 @@ Navigates to the given path in the application hosted by Luigi. It contains eith LuigiClient.linkManager().navigate('/overview') LuigiClient.linkManager().navigate('users/groups/stakeholders') LuigiClient.linkManager().navigate('/settings', null, true) // preserve view -LuigiClient.linkManager().navigate('/overview', null, true, {title:'Overview', size:'m'}) +``` + +### openAsModal + +Opens a microfrontend as a modal + +#### Parameters + +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** settings to customize the modal title and size + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title + - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=large 80%, m=medium 60%, s=small 40%) (optional, default `l`) + +#### Examples + +```javascript +LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'}); ``` ### fromContext @@ -191,25 +207,6 @@ LuigiClient.linkManager().goBack({ foo: 'bar' }); LuigiClient.linkManager().goBack(true); ``` -### openAsModal - -Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. - -#### Parameters -- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path -- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size. -- `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. -- `modalSettings.size` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal size (l = large 80% default, m = medium 60%, s = small 40%) - -#### Examples - -```javascript -LuigiClient.linkManager().openAsModal('/projects/pr2', {title:'Project 2', size: 'm'}) -LuigiClient.linkManager.withParams({foo: "bar"}).openAsModal("path", {title:'Foo'}) -LuigiClient.linkManager.fromClosestContext().openAsModal('/users/groups/stakeholders', {size:'s'}) -``` - - ## uxManager ### showLoadingIndicator From 728cf77cee6baf941685f2f1c3f3e3075d0e061d Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Tue, 2 Apr 2019 20:01:42 +0200 Subject: [PATCH 5/7] generated docu --- client/src/luigi-client.js | 16 ++++++++-------- docs/luigi-client-api.md | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/client/src/luigi-client.js b/client/src/luigi-client.js index d999edf93d..7dc3cd00a5 100644 --- a/client/src/luigi-client.js +++ b/client/src/luigi-client.js @@ -250,9 +250,9 @@ const LuigiClient = { * @param {string} path path to be navigated to * @param {string} sessionId current Luigi **sessionId** * @param {boolean} preserveView Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the {@link #goBack goBack()} function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard {@link #navigate navigate()} function is used instead of {@link #goBack goBack()}. - * @param {Object} modalSettings opens a microfrontend as a modal with possibility to specify a title and size - * @param {string} modalSettings.title modal title - * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=large 80%, m=medium 60%, s=small 40%) + * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. + * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=80%, m=60%, s=40%) * @example * LuigiClient.linkManager().navigate('/overview') * LuigiClient.linkManager().navigate('users/groups/stakeholders') @@ -282,11 +282,11 @@ const LuigiClient = { window.parent.postMessage(navigationOpenMsg, '*'); }, /** - * Opens a microfrontend as a modal - * @param {string} path path to be navigated to - * @param {Object} modalSettings settings to customize the modal title and size - * @param {string} modalSettings.title modal title - * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=large 80%, m=medium 60%, s=small 40%) + * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. + * @param {string} path navigation path + * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. + * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=80%, m=60%, s=40%) * @example * LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'}); */ diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index ef0148b8d3..dfba9ad31e 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -88,9 +88,9 @@ Navigates to the given path in the application hosted by Luigi. It contains eith - `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to - `sessionId` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** current Luigi **sessionId** - `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the [goBack()](#goBack) function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard [navigate()](#navigate) function is used instead of [goBack()](#goBack). -- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a microfrontend as a modal with possibility to specify a title and size - - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title - - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=large 80%, m=medium 60%, s=small 40%) (optional, default `l`) +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size. + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. + - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=80%, m=60%, s=40%) (optional, default `l`) #### Examples @@ -102,14 +102,14 @@ LuigiClient.linkManager().navigate('/settings', null, true) // preserve view ### openAsModal -Opens a microfrontend as a modal +Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. #### Parameters -- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to -- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** settings to customize the modal title and size - - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title - - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=large 80%, m=medium 60%, s=small 40%) (optional, default `l`) +- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path +- `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size. + - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. + - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=80%, m=60%, s=40%) (optional, default `l`) #### Examples From 38c63eb8c342bc72644dc2e22ffb84d1094c6307 Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Wed, 3 Apr 2019 09:40:10 +0200 Subject: [PATCH 6/7] update docu --- client/luigi-client.d.ts | 16 ++++++++-------- client/src/luigi-client.js | 4 ++-- docs/luigi-client-api.md | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/client/luigi-client.d.ts b/client/luigi-client.d.ts index 3b2c89cb97..0a3e8e04d8 100644 --- a/client/luigi-client.d.ts +++ b/client/luigi-client.d.ts @@ -154,9 +154,9 @@ export declare interface LinkManager { * @param {string} path path to be navigated to * @param {string} sessionId current Luigi **sessionId** * @param {boolean} preserveView Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the {@link #goBack goBack()} function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard {@link #navigate navigate()} function is used instead of {@link #goBack goBack()}. - * @param {Object} modalSettings opens a microfrontend as a modal with possibility to specify a title and size - * @param {string} modalSettings.title modal title - * @param {string} modalSettings.size size of the modal (l=large 80% default, m=medium 60%, s=small 40%) + * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. + * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (optional, default `l`) * @example * LuigiClient.linkManager().navigate('/overview') * LuigiClient.linkManager().navigate('users/groups/stakeholders') @@ -197,11 +197,11 @@ export declare interface LinkManager { withParams: (nodeParams: NodeParams) => this; /** - * Opens a microfrontend as a modal - * @param {string} path path to be navigated to - * @param {Object} modalSettings settings to customize the modal title and size - * @param {string} modalSettings.title modal title - * @param {string} modalSettings.size size of the modal (l=large 80% default, m=medium 60%, s=small 40%) + * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. + * @param {string} path navigation path + * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. + * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (optional, default `l`) * @example * LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'}); */ diff --git a/client/src/luigi-client.js b/client/src/luigi-client.js index 7dc3cd00a5..e9771b63e7 100644 --- a/client/src/luigi-client.js +++ b/client/src/luigi-client.js @@ -252,7 +252,7 @@ const LuigiClient = { * @param {boolean} preserveView Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the {@link #goBack goBack()} function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard {@link #navigate navigate()} function is used instead of {@link #goBack goBack()}. * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. - * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=80%, m=60%, s=40%) + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal * @example * LuigiClient.linkManager().navigate('/overview') * LuigiClient.linkManager().navigate('users/groups/stakeholders') @@ -286,7 +286,7 @@ const LuigiClient = { * @param {string} path navigation path * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. - * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=80%, m=60%, s=40%) + * @param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal * @example * LuigiClient.linkManager().openAsModal('projects/pr1/users', {title:'Users', size:'m'}); */ diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index dfba9ad31e..915147356a 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -90,7 +90,7 @@ Navigates to the given path in the application hosted by Luigi. It contains eith - `preserveView` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Preserve a view by setting it to `true`. It keeps the current view opened in the background and opens the new route in a new frame. Use the [goBack()](#goBack) function to navigate back. You can use this feature across different levels. Preserved views are discarded as soon as the standard [navigate()](#navigate) function is used instead of [goBack()](#goBack). - `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size. - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. - - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=80%, m=60%, s=40%) (optional, default `l`) + - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (optional, default `l`) #### Examples @@ -109,7 +109,7 @@ Opens a view in a modal. You can specify the modal's title and size. If you don' - `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path - `modalSettings` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** opens a view in a modal. Use these settings to configure the modal's title and size. - `modalSettings.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** modal title. By default, it is the node label. If there is no label, it is left empty. - - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (l=80%, m=60%, s=40%) (optional, default `l`) + - `modalSettings.size` **(`"l"` \| `"m"` \| `"s"`)** size of the modal (optional, default `l`) #### Examples From a032f375a27c1b915884056386d3ad4722494716 Mon Sep 17 00:00:00 2001 From: Johannes Doberer Date: Wed, 3 Apr 2019 12:21:48 +0200 Subject: [PATCH 7/7] docu update --- client/luigi-client.d.ts | 2 +- client/src/luigi-client.js | 2 +- docs/luigi-client-api.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/luigi-client.d.ts b/client/luigi-client.d.ts index 0a3e8e04d8..7023b3609b 100644 --- a/client/luigi-client.d.ts +++ b/client/luigi-client.d.ts @@ -197,7 +197,7 @@ export declare interface LinkManager { withParams: (nodeParams: NodeParams) => this; /** - * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. + * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is `l`, which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. * @param {string} path navigation path * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. diff --git a/client/src/luigi-client.js b/client/src/luigi-client.js index e9771b63e7..dc08ec0230 100644 --- a/client/src/luigi-client.js +++ b/client/src/luigi-client.js @@ -282,7 +282,7 @@ const LuigiClient = { window.parent.postMessage(navigationOpenMsg, '*'); }, /** - * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. + * Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is `l`, which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. * @param {string} path navigation path * @param {Object} modalSettings opens a view in a modal. Use these settings to configure the modal's title and size. * @param {string} modalSettings.title modal title. By default, it is the node label. If there is no label, it is left empty. diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index 915147356a..c2ee6743c0 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -102,7 +102,7 @@ LuigiClient.linkManager().navigate('/settings', null, true) // preserve view ### openAsModal -Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is large (`l`), which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. +Opens a view in a modal. You can specify the modal's title and size. If you don't specify the title, it is the node label. If there is no node label, the title remains empty. The default size of the modal is `l`, which means 80%. You can also use `m` (60%) and `s` (40%) to set the modal size. Optionally, use it in combination with any of the navigation functions. #### Parameters