-
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
Add details about navigation nodes and reading node parameters #138
Conversation
e017918
to
43bfcf5
Compare
f263527
to
0db0b8c
Compare
docs/navigation-configuration.md
Outdated
|
||
The main application URL with the parameters is as follows: `https://luigiexample.com/home/projects/pr23?~sorting=asc&~page=2` | ||
|
||
The navigation structure with the project list view using these the parametrs is as follows: |
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.
there seems to be something wrong with that sentence
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 reworked the structure a bit to make it clearer
docs/navigation-configuration.md
Outdated
```` | ||
## Node navigation | ||
|
||
When you navigate between Nodes that are located on the same domain, Luigi triggers a hash or path change. Then it sends an updated context in order not to fully reload the view for a single-page application based micro front-end. Navigation between domains triggers a full page load in order to comply with cross-domain security concepts. |
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.
Nodes should be lower case
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.
Done - all mentions of "node" are now lowercase.
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 changed all node occurrences to lowercase and updated one section.
docs/navigation-configuration.md
Outdated
|
||
All parameters without the prefix are not passed to the micro front-end and are consumed by the main application. | ||
|
||
A sample **viewUrl** `https://luigiexample.com/home/projects/pr23?~sorting=asc&~page=2` supports sorting and paging (with the page number as a numerical value) by introducing the **sort** and **page** node parameters. |
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.
The reworked part.
docs/navigation-configuration.md
Outdated
|
||
Navigation parameters allow you to specify routing configuration, set the appearance of navigation, and define navigation structure. | ||
|
||
## A basic example | ||
# Navigation elements |
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.
# Navigation elements | |
## Navigation elements |
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.
Only titles are introduced with H1. Main headings are H2 and sub-sections are H3.
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.
Done.
docs/navigation-configuration.md
Outdated
|
||
These are the elements of the Luigi navigation: | ||
- Top navigation, where the main navigation path is displayed. | ||
- Side navigation, where the application are 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.
- Side navigation, where the application are defined. | |
- Side navigation, where the applications are 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.
Done.
- A main content window | ||
|
||
The image shows where you can use various methods and parameters to fill the navigation or display a micro front-end. | ||
The image shows where in the navigation you can use various methods and parameters to create the navigation structure or display a micro front-end. | ||
|
||
![Navigation layout](assets/navigation-structure.png) |
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.
Please adjust the screenshot to the guidelines:
https://github.com/kyma-project/community/blob/master/guidelines/content-guidelines/screenshots.md
- Add a border to the screenshot
- Use red for indicators such as arrows or boxes
docs/navigation-configuration.md
Outdated
|
||
![Navigation layout](assets/navigation-structure.png) | ||
|
||
This code sample demonstrates your options when configuring navigation for Luigi. | ||
|
||
# Navigation structure |
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.
# Navigation structure | |
## Navigation structure |
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.
Done.
docs/navigation-configuration.md
Outdated
} | ||
} | ||
```` | ||
## Node navigation |
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.
## Node navigation | |
### Node navigation |
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 assume this is the sub-section of the ## Navigation structure ?
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.
Yes it is :)
docs/navigation-configuration.md
Outdated
## Node navigation parameters | ||
|
||
- **nodeAccessibilityResolver** allows you to define a permission checker function that gets executed on every node. If it returns `false`, Luigi removes the node and its children from the navigation structure. | ||
- **nodeAccessibilityResolver** receives all values defined in the node configuration. See [angular sampleconfig.js](../core/examples/luigi-sample-angular/src/assets/sampleconfig.js) for the **constraints** example. |
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.
Broken link - please fix.
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.
?
- **nodeAccessibilityResolver** receives all values defined in the node configuration. See [angular sampleconfig.js](../core/examples/luigi-sample-angular/src/assets/sampleconfig.js) for the **constraints** example. | ||
|
||
## Node parameters | ||
|
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.
The node parameters are as follows:
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.
?
docs/navigation-configuration.md
Outdated
## Node parameters | ||
|
||
- **pathSegment** specifies the partial URL of the current segment. **pathSegment** must not contain slashes. | ||
- A static settings example reflects `luigidomain.test/settings`, |
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 static settings example reflects `luigidomain.test/settings`, | |
- A static settings example reflects `luigidomain.test/settings`. |
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.
Done.
docs/navigation-configuration.md
Outdated
- A dynamic settings example, prefixed with a colon, loads on any other value. | ||
- **label** contains the display name of the navigation node. | ||
- **hideFromNav** shows or hides a navigation node. You can still navigate to the node but it does not show up in the top or left pane. | ||
- **viewUrl** contains the URL or path to a view rendered when clicking the navigation node. Use either a full URL or a relative path. This value may consist of variables if you have specified a **navigationContext** with a dynamic **pathSegment**. If **viewUrl** is undefined, Luigi activates the child node specified in **defaultChildNode**. When both **viewUrl** and **defaultChildNode** are undefined, Luigi opens the first child of the current node. |
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.
- **viewUrl** contains the URL or path to a view rendered when clicking the navigation node. Use either a full URL or a relative path. This value may consist of variables if you have specified a **navigationContext** with a dynamic **pathSegment**. If **viewUrl** is undefined, Luigi activates the child node specified in **defaultChildNode**. When both **viewUrl** and **defaultChildNode** are undefined, Luigi opens the first child of the current node. | |
- **viewUrl** contains the URL or path to a view which renders when you click the navigation node. Use either a full URL or a relative path. This value may consist of variables if you specified a **navigationContext** with a dynamic **pathSegment**. If **viewUrl** is undefined, Luigi activates the child node specified in **defaultChildNode**. When both **viewUrl** and **defaultChildNode** are undefined, Luigi opens the first child of the current node. |
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.
Done.
docs/navigation-configuration.md
Outdated
- **hideFromNav** shows or hides a navigation node. You can still navigate to the node but it does not show up in the top or left pane. | ||
- **viewUrl** contains the URL or path to a view rendered when clicking the navigation node. Use either a full URL or a relative path. This value may consist of variables if you have specified a **navigationContext** with a dynamic **pathSegment**. If **viewUrl** is undefined, Luigi activates the child node specified in **defaultChildNode**. When both **viewUrl** and **defaultChildNode** are undefined, Luigi opens the first child of the current node. | ||
- **navigationContext** contains a named node that is mainly for use in combination with a dynamic **pathSegment** to start navigation from a dynamic node using ` LuigiClient.navigationManager().fromContext('contextname')`. | ||
- **context** sends the specified object as context to the view. Use this parameter in combination with the dynamic **pathSegment** to receive the context through the context listeners of **Luigi client**. This is an alternative to using the dynamic value in the **viewUrl**. |
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.
- **context** sends the specified object as context to the view. Use this parameter in combination with the dynamic **pathSegment** to receive the context through the context listeners of **Luigi client**. This is an alternative to using the dynamic value in the **viewUrl**. | |
- **context** sends the specified object as context to the view. Use this parameter in combination with the dynamic **pathSegment** to receive the context through the context listeners of **Luigi Client**. This is an alternative to using the dynamic value in the **viewUrl**. |
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.
Done.
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.
Corrected the document.
docs/navigation-configuration.md
Outdated
|
||
A sample **viewUrl** `https://luigiexample.com/home/projects/pr23?~sorting=asc&~page=2` supports sorting and paging (with the page number as a numerical value) by introducing the **sort** and **page** node parameters. | ||
|
||
The navigation structure with the project list view using such sample node parameters parameters |
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.
Should be The navigation structure with the project list view using such sample node parameters looks as follows:
docs/navigation-configuration.md
Outdated
|
||
Navigation parameters allow you to specify routing configuration, set the appearance of navigation, and define navigation structure. | ||
|
||
## A basic example | ||
# Navigation elements |
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.
Done.
docs/navigation-configuration.md
Outdated
|
||
These are the elements of the Luigi navigation: | ||
- Top navigation, where the main navigation path is displayed. | ||
- Side navigation, where the application are 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.
Done.
docs/navigation-configuration.md
Outdated
|
||
![Navigation layout](assets/navigation-structure.png) | ||
|
||
This code sample demonstrates your options when configuring navigation for Luigi. | ||
|
||
# Navigation structure |
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.
Done.
docs/navigation-configuration.md
Outdated
} | ||
} | ||
```` | ||
## Node navigation |
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.
Yes it is :)
docs/navigation-configuration.md
Outdated
- **useHashRouting** defines either hash-based (`url.com/#/yourpath`) or path-based (`url.com/yourpath`) routing. | ||
- **nodeParamPrefix** sets the prefix character when using the `LuigiClient.linkManager().withParam()` function, which provides a way to simply attach query parameters to the view URL for activities such as sorting and filtering. The URL contains the parameters to allow deep linking. If you want to use a different character prefix, define yours here. The default character is `~`. | ||
|
||
## Node navigation parameters |
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.
Done.
- **nodeParamPrefix** sets the prefix character when using the `LuigiClient.linkManager().withParam()` function, which provides a way to simply attach query parameters to the view URL for activities such as sorting and filtering. The URL contains the parameters to allow deep linking. If you want to use a different character prefix, define yours here. The default character is `~`. | ||
|
||
## Node navigation parameters | ||
|
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.
Done.
docs/navigation-configuration.md
Outdated
## Node parameters | ||
|
||
- **pathSegment** specifies the partial URL of the current segment. **pathSegment** must not contain slashes. | ||
- A static settings example reflects `luigidomain.test/settings`, |
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.
Done.
docs/navigation-configuration.md
Outdated
- A dynamic settings example, prefixed with a colon, loads on any other value. | ||
- **label** contains the display name of the navigation node. | ||
- **hideFromNav** shows or hides a navigation node. You can still navigate to the node but it does not show up in the top or left pane. | ||
- **viewUrl** contains the URL or path to a view rendered when clicking the navigation node. Use either a full URL or a relative path. This value may consist of variables if you have specified a **navigationContext** with a dynamic **pathSegment**. If **viewUrl** is undefined, Luigi activates the child node specified in **defaultChildNode**. When both **viewUrl** and **defaultChildNode** are undefined, Luigi opens the first child of the current node. |
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.
Done.
docs/navigation-configuration.md
Outdated
- **hideFromNav** shows or hides a navigation node. You can still navigate to the node but it does not show up in the top or left pane. | ||
- **viewUrl** contains the URL or path to a view rendered when clicking the navigation node. Use either a full URL or a relative path. This value may consist of variables if you have specified a **navigationContext** with a dynamic **pathSegment**. If **viewUrl** is undefined, Luigi activates the child node specified in **defaultChildNode**. When both **viewUrl** and **defaultChildNode** are undefined, Luigi opens the first child of the current node. | ||
- **navigationContext** contains a named node that is mainly for use in combination with a dynamic **pathSegment** to start navigation from a dynamic node using ` LuigiClient.navigationManager().fromContext('contextname')`. | ||
- **context** sends the specified object as context to the view. Use this parameter in combination with the dynamic **pathSegment** to receive the context through the context listeners of **Luigi client**. This is an alternative to using the dynamic value in the **viewUrl**. |
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.
Done.
|
||
### Path parameters | ||
|
||
Use the path parameter values to define the **pathSegment** in your configuration. You can either use a static value for your **pathSegment**, or add a colon to this value as in `:projectId`, to and make it act as a parameter. This tells Luigi to accept any value for this **pathSegment** of the main application URL. The value replaces the parameter when it is further processed by the application. |
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.
Use the path parameter values to define the **pathSegment** in your configuration. You can either use a static value for your **pathSegment**, or add a colon to this value as in `:projectId`, to and make it act as a parameter. This tells Luigi to accept any value for this **pathSegment** of the main application URL. The value replaces the parameter when it is further processed by the application. | |
Use the path parameter values to define the **pathSegment** in your configuration. You can either use a static value for your **pathSegment** or add a colon to this value, as in `:projectId`, to make it act as a parameter. This tells Luigi to accept any value for this **pathSegment** of the main application URL. The value replaces the parameter when it is further processed by the application. |
docs/navigation-configuration.md
Outdated
|
||
# Navigation configuration parameters reference | ||
|
||
You can use the listed parameters and functions to configure your navigation structure. The examples show you how you can use selected options. |
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.
?
docs/navigation-configuration.md
Outdated
## Node navigation parameters | ||
|
||
- **nodeAccessibilityResolver** allows you to define a permission checker function that gets executed on every node. If it returns `false`, Luigi removes the node and its children from the navigation structure. | ||
- **nodeAccessibilityResolver** receives all values defined in the node configuration. See [angular sampleconfig.js](../core/examples/luigi-sample-angular/src/assets/sampleconfig.js) for the **constraints** example. |
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.
?
- **nodeAccessibilityResolver** receives all values defined in the node configuration. See [angular sampleconfig.js](../core/examples/luigi-sample-angular/src/assets/sampleconfig.js) for the **constraints** example. | ||
|
||
## Node parameters | ||
|
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.
?
52813c4
to
45eaa33
Compare
45eaa33
to
34491f5
Compare
Description
Changes proposed in this pull request:
Related issue(s)
For details, see #101