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

Dynamic pathSegments in navigation Nodes #104

Merged
merged 28 commits into from
Sep 26, 2018

Conversation

maxmarkus
Copy link
Contributor

Description
Added possibility to add dynamic nodes. pathSegments prefixed with colon (:) will be substituted in pathSegment, viewUrl and context and are available as LuigiClient.getPathParams().

Related issue(s)
Resolves #94

maxmarkus and others added 23 commits July 31, 2018 13:51
… viewUrl, added some documentation and example implementation, overview link
@maxmarkus maxmarkus added enhancement New feature or request area/luigi labels Sep 25, 2018
@maxmarkus maxmarkus requested a review from a user September 25, 2018 08:26
@maxmarkus maxmarkus changed the title Feature/dynamic nodes dynamic pathSegments in navigation Nodes Sep 25, 2018
@kwiatekus kwiatekus self-assigned this Sep 25, 2018
Copy link

@kazydek kazydek left a comment

Choose a reason for hiding this comment

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

Added just two small tiny bits of comments.

- **getEventData()** returns the context object. Usually it is not required as the **addContextUpdateListener** receives the same values.
- **getPathParams()** returns the dynamic path parameters of the active url.
Copy link

Choose a reason for hiding this comment

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

URL

@@ -64,7 +65,7 @@ window.Luigi.setConfig({

## Nodes

- **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.
- **pathSegment** specifies the partial URL of the current segment. A static settings example reflects `luigidomain.test/settings`, while a dynamic, prefixed with colon, loads on any other value. **pathSegments** must not contain slashes.
Copy link

Choose a reason for hiding this comment

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

a dynamic one, prefixed with a colon,

@maxmarkus maxmarkus changed the title dynamic pathSegments in navigation Nodes Dynamic pathSegments in navigation Nodes Sep 25, 2018
@kwiatekus kwiatekus assigned kwiatekus and unassigned kwiatekus Sep 25, 2018
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.

LGTM

@kwiatekus kwiatekus merged commit 6f8efaf into SAP:master Sep 26, 2018
@maxmarkus maxmarkus deleted the feature/dynamic-nodes branch November 16, 2018 13:27
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* initial dynamic node implementation. substitution for pathSegment and viewUrl, added some documentation and example implementation, overview link

* removed obsolete routes and component, added child node to dynamic node example

* added context substitution and enhanced config and example

* added test for findMatchingNode

* small fix for undefined param

* removed # from tets, added navigation tets for findMatchingNode

* documentation updates

* refactored handling of falsy dynamic nodes, updated tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Dynamic nodes" feature
3 participants