-
Notifications
You must be signed in to change notification settings - Fork 174
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
docu for modal microfrontends #454
docu for modal microfrontends #454
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple of comments.
docs/luigi-client-api.md
Outdated
@@ -88,13 +88,17 @@ 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `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` **[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. |
docs/luigi-client-api.md
Outdated
@@ -88,13 +88,17 @@ 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `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.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. |
docs/luigi-client-api.md
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
docs/luigi-client-api.md
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to be navigated to | |
- `path` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** navigation path |
is the navigation path different from the path to be navigated to
?
docs/luigi-client-api.md
Outdated
|
||
#### 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `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` **[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. |
docs/luigi-client-api.md
Outdated
#### 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `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.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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of points from my side:
- please merge from master and run again
lerna run docu
from Luigi´s root folder. I am getting a different output as the current output of this pr. - In Luigi Client file I would replace both occurrences of
@param {string} modalSettings.size size of the modal (l=large 80% default, m=medium 60%, s=small 40%)
with
@param {('l'|'m'|'s')} [modalSettings.size=l] size of the modal (l=large 80%, m=medium 60%, s=small 40%)
and generate the docu again. I will create an extra ticket to properly document optional parameters (with or without default value) - I would say we don't need to specify in the docu that l, m and s mean large, medium and small respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor text change suggestion. Apart from that, looks good and it´s approved
client/src/luigi-client.js
Outdated
* @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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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. |
No description provided.