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

Redirect from root node to first child #31

Merged
merged 12 commits into from
Sep 7, 2018

Conversation

y-kkamil
Copy link

@y-kkamil y-kkamil commented Sep 4, 2018

adds support for redirection from root node ('') to first child.

  • luigi will now redirect you from the root node to it's first children.
  • if there are nested nodes w/out viewUrls, it will move you to deepmost node with viewUrl defined
  • you can test with console running on luigi (Daria's poc branch) --> console will redirect from "console-dev.kyma.local:4200" to "console-dev.kyma.local:4200/home/environments/workspace"

Issue link
Fixes #47

Copy link
Contributor

@kwiatekus kwiatekus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include this in documentation

@y-kkamil y-kkamil requested a review from a user September 7, 2018 09:47
@kwiatekus kwiatekus added the bug Something isn't working label Sep 7, 2018
@@ -60,9 +60,10 @@ window.Luigi.setConfig({
- **pathSegment** specifies the partial URL of the current segment. A static settings example reflects `luigidomain.test/settings`, while a dynamic one 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 will not show up in the top or left pane.
- **viewUrl** contains the URL or path to a view that renders when entering 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**.
- **viewUrl** contains the URL or path to a view that renders when entering 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 first child of the current node.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first child -> the first child

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

- **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**.
- **defaultChildNode** sets the child node that will be automatically activated if the current node has no **viewUrl** defined. Provide the **pathSegment** of the child node you want to activate as a string.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • that will be automatically activated -> that the system activates automatically or whatever activates it (active voice in general)
  • Provide the pathSegment -> IMHO it should be either **pathSegment** or the **pathSegment** parameter (that refers to the whole text in general).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@kwiatekus kwiatekus merged commit bb9cecb into SAP:master Sep 7, 2018
@kwiatekus kwiatekus deleted the default-nodes-improvements branch September 7, 2018 13:38
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* Redirect from root node to first child

* rename defaultPathSegment to defaultChildNode

* docu added

* changes in the readme after code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants