Fix dev doc pages (#114297) (#114386)

* fix doc page

* fix doc page bis

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
This commit is contained in:
Kibana Machine 2021-10-08 07:22:16 -04:00 committed by GitHub
parent c2ec5ead34
commit a87c2f1480
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ console.log(discoverUrl); // http://localhost:5601/bpr/s/space/app/discover
const discoverUrlWithSomeState = core.http.basePath.prepend(`/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'2020-09-10T11:39:50.203Z',to:'2020-09-10T11:40:20.249Z'))&_a=(columns:!(_source),filters:!(),index:'90943e30-9a47-11e8-b64d-95841ca0b247',interval:auto,query:(language:kuery,query:''),sort:!())`);
```
Instead, each app should expose {kib-repo}tree/{branch}/src/plugins/share/common/url_service/locators/README.md[a locator].
Instead, each app should expose [a locator](https://github.com/elastic/kibana/blob/master/src/plugins/share/common/url_service/locators/README.md).
Other apps should use those locators for navigation or URL creation.
```tsx
@ -114,8 +114,7 @@ const MySPALink = () =>
As it would be too much boilerplate to do this for each link in your app, there is a handy wrapper that helps with it:
[RedirectAppLinks](https://github.com/elastic/kibana/blob/master/src/plugins/kibana_react/public/app_links/redirect_app_link.tsx#L49).
[source,typescript jsx]
----
```jsx
const MyApp = () =>
<RedirectAppLinks application={core.application}>
{/*...*/}
@ -123,7 +122,7 @@ const MyApp = () =>
<a href={urlToADashboard}>Go to Dashboard</a>
{/*...*/}
</RedirectAppLinks>
----
```
## Setting up internal app routing
@ -167,7 +166,7 @@ Common use-case for using `core`'s `ScopedHistory` directly:
## Syncing state with URL
Historically Kibana apps store _a lot_ of application state in the URL.
The most common pattern that {kib} apps follow today is storing state in `_a` and `_g` query params in [rison](https://github.com/w33ble/rison-node#readme) format.
The most common pattern that Kibana apps follow today is storing state in `_a` and `_g` query params in [rison](https://github.com/w33ble/rison-node#readme) format.
Those query params follow the convention: