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

Add autogenerated luigi client api docs #137

Merged

Conversation

jesusreal
Copy link
Contributor

Description

Changes proposed in this pull request:

  • Replace current Luigi Client API docu with an inline, autogenerated documentation

Related issue(s)

*/
showLoadingIndicator: function showLoadingIndicator() {
window.parent.postMessage({ msg: 'luigi.show-loading-indicator' }, '*');
},
/**
* Hides the spinner
* Removes the loading indicator. Use it after calling {@link #showLoadingIndicator showLoadingIndicator()} or to hide the indicator when you use the `loadingIndicator.hideAutomatically: false` Node configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can loadingIndicator.hideAutomatically be linked to the configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linked to navigation-configuration.md#nodes

/**
* Shows a spinner with backdrop to block the micro front-end frame
* Adds a backdrop with a loading indicator for the micro front-end frame. This overrides the `loadingIndicator.enabled` setting.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can loadingIndicator.enabled be linked to the configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linked to navigation-configuration.md#nodes

* Usage: linkManager.fromContext("currentTeam").navigate("path")
* @param {object} navigationContext
* */
* Sets the current navigation context to that of a specific parent Node that has the `navigationContext` field declared in its navigation configuration. This navigation context is then used by navigate function.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we link navigationContext to the configuration documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linked to navigation-configuration.md#nodes

client/luigi-client.js Show resolved Hide resolved
Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

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

This is the initial review for the files.

client/README.md Show resolved Hide resolved
docs/README.md Show resolved Hide resolved
docs/luigi-client-api.md Outdated Show resolved Hide resolved
docs/luigi-client-api.md Outdated Show resolved Hide resolved
docs/luigi-client-api.md Outdated Show resolved Hide resolved

Returns the configuration object of the active navigation Node.

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** node parameters
Copy link
Contributor

Choose a reason for hiding this comment

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

Dot missing at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


- `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. You must use the function [goBack()](#goBack) to navigate back afterwards. You can use this feature at unlimited levels.The preserved views are discarded as soon as the standard [navigate()](#navigate) function is in use in place of [goBack()](#goBack) .
Copy link
Contributor

Choose a reason for hiding this comment

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

Preserve a view by setting it to true > Preserve a view by setting it to true (only if code formatting is possible).
You must use the function goBack() > Use the goBack() function
levels.The > levels. The (missing space)
function is in use > function is used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

LuigiClient.linkManager().fromContext('project').navigate('/settings')
```

Returns **[linkManager](#linkmanager)** link manager instance
Copy link
Contributor

Choose a reason for hiding this comment

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

Dot missing at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

docs/luigi-client-api.md Outdated Show resolved Hide resolved
docs/luigi-client-api.md Outdated Show resolved Hide resolved
Copy link
Contributor

@maxmarkus maxmarkus left a comment

Choose a reason for hiding this comment

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

Please see my comments.


Checks if there are one or more preserved views. Can be used to show a back button.

Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** a boolean with the information if there is a preserved view available to which a user can return..
Copy link
Contributor

Choose a reason for hiding this comment

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

Two dots at the end :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

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

Approved.

Copy link
Contributor

@maxmarkus maxmarkus left a comment

Choose a reason for hiding this comment

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

LGTM

@jesusreal jesusreal merged commit 9fce8d4 into SAP:master Oct 17, 2018
@jesusreal jesusreal deleted the add-autogenerated-luigi-client-api-docs branch March 13, 2019 10:30
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* Move luigi client docu from readmes to inline code

* Add npm scripts for documentation

* generate first version of documentation

* update auto generated docu to latest status

* Point index readme links to new autogenerated docu sections

* Clean up docu

* Add links for other sections references and consistency for fields mentioned in docu

* Refactor private variables and wrap initialization logic in a function

* refactor link manager

* Move setContext and hasHash methods to inner scopes

* set initial value fromClosestContext option in link manager to false

* Remove old documentation files

* Add instructions for docu generation in Luigi readme file

* Add dependency for documentation generation on luigi client

* Update links in documentation based on pr review

* Update documentation based on technical writer review

* Small grammatical fix in documentation

* update husky dependency and add pre-push hook for luigi client docu validation
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.

3 participants