Skip to content

Commit

Permalink
Add negative labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ndricimrr committed Sep 18, 2024
1 parent ae131b3 commit f11a4ca
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 99 deletions.
13 changes: 3 additions & 10 deletions client/src/lifecycleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns a list of active feature toggles
* @returns {Array} a list of feature toggle names
* @memberof Lifecycle
Expand All @@ -404,7 +403,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets node parameters in Luigi Core. The parameters will be added to the URL.
* @param {Object} params
* @param {boolean} keepBrowserHistory
Expand All @@ -423,7 +421,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the node parameters of the active URL.
* Node parameters are defined like URL query parameters but with a specific prefix allowing Luigi to pass them to the micro frontend view. The default prefix is **~** and you can use it in the following way: `https://my.luigi.app/home/products?~sort=asc&~page=3`.
* <!-- add-attribute:class:warning -->
Expand All @@ -442,7 +439,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the dynamic path parameters of the active URL.
* Path parameters are defined by navigation nodes with a dynamic **pathSegment** value starting with **:**, such as **productId**.
* All path parameters in the current navigation path (as defined by the active URL) are returned.
Expand All @@ -458,7 +454,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Read search query parameters which are sent from Luigi Core
* @memberof Lifecycle
* @returns Core search query parameters
Expand All @@ -470,6 +465,7 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Sends search query parameters to Luigi Core. The search parameters will be added to the URL if they are first allowed on a node level using {@link navigation-parameters-reference.md#clientpermissionsurlparameters clientPermissions.urlParameters}.
* @param {Object} searchParams
Expand All @@ -489,7 +485,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the current client permissions as specified in the navigation node or an empty object. For details, see [Node parameters](navigation-parameters-reference.md).
* @returns {Object} client permissions as specified in the navigation node
* @memberof Lifecycle
Expand All @@ -501,6 +496,7 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* When the micro frontend is not embedded in the Luigi Core application and there is no init handshake you can set the target origin that is used in postMessage function calls by Luigi Client. Typically used only in custom micro-frontend frameworks that are compatible with LuigiClient API.
* @param {string} origin target origin
* @memberof Lifecycle
Expand All @@ -513,6 +509,7 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Sends a custom message to the Luigi Core application.
* @param {Object} message an object containing data to be sent to the Luigi Core to process it further. This object is set as an input parameter of the custom message listener on the Luigi Core side
* @param {string} message.id a string containing the message id
Expand All @@ -529,7 +526,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the current user settings based on the selected node.
* @returns {Object} current user settings
* @since 1.7.1
Expand All @@ -542,7 +538,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Returns the current anchor based on active URL.
* @memberof Lifecycle
* @since 1.21.0
Expand All @@ -555,7 +550,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sends anchor to Luigi Core. The anchor will be added to the URL.
* @param {string} anchor
* @since 1.21.0
Expand All @@ -571,7 +565,6 @@ class LifecycleManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* This function allows you to change node labels within the same {@link navigation-advanced.md#view-groups view group}, e.g. in your node config: `label: 'my Node {viewGroupData.vg1}'`.
* @since 2.2.0
* @param {Object} data a data object containing the view group name and desired label
Expand Down
19 changes: 5 additions & 14 deletions client/src/linkManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Navigates to the given path in the application hosted by Luigi. It contains either a full absolute path or a relative path without a leading slash that uses the active route as a base. This is the standard navigation.
* @memberof linkManager
* @param {string} path path to be navigated to
Expand Down Expand Up @@ -124,7 +123,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Offers an alternative way of navigating with intents. This involves specifying a semanticSlug and an object containing
* parameters.
* This method internally generates a URL of the form `#?intent=<semantic object>-<action>?<param_name>=<param_value>` through the given
Expand Down Expand Up @@ -157,7 +155,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* 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.
* @memberof linkManager
* @param {string} path navigation path
Expand Down Expand Up @@ -195,6 +192,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Updates the current title and size of a modal. If `routing.showModalPathInUrl` is set to `true`, the URL will be updated with the modal settings data.
* In addition, you can specify if a new history entry will be created with the updated URL.
* @memberof linkManager
Expand All @@ -217,7 +215,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Opens a view in a split view. You can specify the split view'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 split view is `40`, which means 40% height of the split view.
* @memberof linkManager
* @param {string} path navigation path
Expand All @@ -237,7 +234,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Opens a view in a drawer. You can specify the size of the drawer, whether the drawer has a header, and whether a backdrop is active in the background. By default, the header is shown. The backdrop is not visible and has to be activated. The size of the drawer is set to `s` by default, which means 25% of the micro frontend size. You can also use `l`(75%), `m`(50%) or `xs`(15.5%). Optionally, use it in combination with any of the navigation functions.
* @memberof linkManager
* @param {string} path navigation path
Expand All @@ -256,7 +252,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets the current navigation context to that of a specific parent node which has the {@link navigation-configuration.md navigationContext} field declared in the navigation configuration. This navigation context is then used by the `navigate` function.
* @memberof linkManager
* @param {string} navigationContext
Expand All @@ -278,7 +273,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets the current navigation context which is then used by the `navigate` function. This has to be a parent navigation context, it is not possible to use the child navigation contexts.
* @memberof linkManager
* @returns {linkManager} link manager instance
Expand All @@ -297,7 +291,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sets the current navigation base to the parent node that is defined as virtualTree. This method works only when the currently active micro frontend is inside a virtualTree.
* @memberof linkManager
* @returns {linkManager} link manager instance
Expand All @@ -313,7 +306,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Enables navigating to sibling nodes without knowing the absolute path.
* @memberof linkManager
* @returns {linkManager} link manager instance
Expand All @@ -327,7 +319,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Sends node parameters to the route. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
* @memberof linkManager
* @param {Object} nodeParams
Expand All @@ -346,6 +337,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Sets options to customise route changing behaviour. The parameters are used by the `navigate` function. Use it optionally in combination with any of the navigation functions and receive it as part of the context object in Luigi Client.
* @memberof linkManager
* @param {Object} options navigation options
Expand Down Expand Up @@ -374,7 +366,6 @@ export class linkManager extends LuigiClientBase {

/** @lends linkManager */
/**
* <!-- label-success: Web Component API -->
* Checks if the path you can navigate to exists in the main application. For example, you can use this helper method conditionally to display a DOM element like a button.
* @memberof linkManager
* @param {string} path path which existence you want to check
Expand Down Expand Up @@ -430,7 +421,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Checks if there is one or more preserved views. You can use it to show a **back** button.
* @memberof linkManager
* @returns {boolean} indicating if there is a preserved view you can return to
Expand All @@ -440,7 +430,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Discards the active view and navigates back to the last visited view. Works with preserved views, and also acts as the substitute of the browser **back** button. **goBackContext** is only available when using preserved views.
* @memberof linkManager
* @param {any} goBackValue data that is passed in the **goBackContext** field to the last visited view when using preserved views
Expand All @@ -456,6 +445,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Disables the navigation handling for a single navigation request.
* It prevents Luigi Core from handling the URL change after `navigate()`.
* Used for auto-navigation.
Expand All @@ -470,6 +460,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Enables navigating to a new tab.
* @since 1.16.0
* @example
Expand All @@ -481,6 +472,7 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Keeps the URL's query parameters for a navigation request.
* @param {boolean} preserve By default, it is set to `false`. If it is set to `true`, the URL's query parameters will be kept after navigation.
* @since 1.19.0
Expand All @@ -494,7 +486,6 @@ export class linkManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Gets the luigi route associated with the current micro frontend.
* @returns {promise} a promise which resolves to a String value specifying the current luigi route
* @since 1.23.0
Expand Down
15 changes: 6 additions & 9 deletions client/src/uxManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Shows a confirmation modal.
* @memberof uxManager
* @param {Object} settings the settings of the confirmation modal. If you don't provide any value for any of the fields, a default value is used
Expand Down Expand Up @@ -130,7 +129,6 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Shows an alert.
* @memberof uxManager
* @param {Object} settings the settings for the alert
Expand Down Expand Up @@ -209,7 +207,6 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Gets the current locale.
* @returns {string} current locale
* @memberof uxManager
Expand All @@ -219,7 +216,7 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Sets current locale to the specified one.
*
* **NOTE:** this must be explicitly allowed on the navigation node level by setting `clientPermissions.changeCurrentLocale` to `true`. (See {@link navigation-parameters-reference.md Node parameters}.)
Expand All @@ -239,7 +236,7 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Checks if the current micro frontend is displayed inside a split view
* @returns {boolean} indicating if it is loaded inside a split view
* @memberof uxManager
Expand All @@ -250,6 +247,7 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web App API only -->
* Checks if the current micro frontend is displayed inside a modal
* @returns {boolean} indicating if it is loaded inside a modal
* @memberof uxManager
Expand All @@ -260,7 +258,7 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Checks if the current micro frontend is displayed inside a drawer
* @returns {boolean} indicating if it is loaded inside a drawer
* @memberof uxManager
Expand All @@ -271,7 +269,6 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* Gets the current theme.
* @returns {*} current themeObj
* @memberof uxManager
Expand All @@ -281,7 +278,7 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Gets the CSS variables from Luigi Core with their key and value.
* @returns {Object} CSS variables with their key and value.
* @memberof uxManager
Expand All @@ -293,7 +290,7 @@ class UxManager extends LuigiClientBase {
}

/**
* <!-- label-success: Web Component API -->
* <!-- label-success: Web App API only -->
* Adds the CSS variables from Luigi Core in a <style> tag to the document <head> section.
* @memberof uxManager
* @since 2.3.0
Expand Down
1 change: 0 additions & 1 deletion core/src/core-api/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class LuigiNavigationManager {
constructor() {}

/**
* <!-- label-success: Web Component API -->
* Refreshes top navigation badge counters by rendering the navigation again.
* @memberof LuigiNavigation
Expand Down
Loading

0 comments on commit f11a4ca

Please sign in to comment.