Skip to content

Commit

Permalink
Updates Github link references from master to main (#116789) (#116791)
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <[email protected]>
# Conflicts:
#	.github/ISSUE_TEMPLATE/v8_breaking_change.md
#	.github/PULL_REQUEST_TEMPLATE.md
  • Loading branch information
Tyler Smalley authored Oct 29, 2021
1 parent 1cf36dc commit 69cb2d3
Show file tree
Hide file tree
Showing 125 changed files with 833 additions and 833 deletions.
4 changes: 2 additions & 2 deletions STYLEGUIDE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ less likely to introduce bugs in the future due to insufficient types.
If you’re not having `any` in your plugin or are starting a new plugin, you should enable the
[`@typescript-eslint/no-explicit-any`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md)
linting rule for your plugin via the [`.eslintrc.js`](https://github.com/elastic/kibana/blob/master/.eslintrc.js) config.
linting rule for your plugin via the [`.eslintrc.js`](https://github.com/elastic/kibana/blob/main/.eslintrc.js) config.
### Avoid non-null assertions
Expand All @@ -229,7 +229,7 @@ assertion would now wrongly disable proper type checking for us.
If you’re not using non-null assertions in your plugin or are starting a new plugin, consider enabling the
[`@typescript-eslint/no-non-null-assertion`](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-non-null-assertion.md)
linting rule for you plugin in the [`.eslintrc.js`](https://github.com/elastic/kibana/blob/master/.eslintrc.js) config.
linting rule for you plugin in the [`.eslintrc.js`](https://github.com/elastic/kibana/blob/main/.eslintrc.js) config.
### Return/throw early from functions
Expand Down
1,196 changes: 598 additions & 598 deletions api_docs/deprecations_by_plugin.mdx

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions api_docs/kibana_utils.json
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,7 @@
"tags": [],
"label": "createSessionStorageStateStorage",
"description": [
"\nCreates {@link ISessionStorageStateStorage}\n{@link https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/session_storage.md | guide}"
"\nCreates {@link ISessionStorageStateStorage}\n{@link https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/docs/state_sync/storages/session_storage.md | guide}"
],
"signature": [
"(storage?: Storage) => ",
Expand Down Expand Up @@ -2579,7 +2579,7 @@
"tags": [],
"label": "createStateContainerReactHelpers",
"description": [
"\nCreates helpers for using {@link StateContainer | State Containers} with react\nRefer to {@link https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_containers/react.md | guide} for details"
"\nCreates helpers for using {@link StateContainer | State Containers} with react\nRefer to {@link https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/docs/state_containers/react.md | guide} for details"
],
"signature": [
"<Container extends ",
Expand Down Expand Up @@ -3932,7 +3932,7 @@
"tags": [],
"label": "syncState",
"description": [
"\nUtility for syncing application state wrapped in state container\nwith some kind of storage (e.g. URL)\n\nGo {@link https://github.com/elastic/kibana/tree/master/src/plugins/kibana_utils/docs/state_sync | here} for a complete guide and examples.\n"
"\nUtility for syncing application state wrapped in state container\nwith some kind of storage (e.g. URL)\n\nGo {@link https://github.com/elastic/kibana/tree/main/src/plugins/kibana_utils/docs/state_sync | here} for a complete guide and examples.\n"
],
"signature": [
"({\n storageKey,\n stateStorage,\n stateContainer,\n}: ",
Expand Down Expand Up @@ -4704,7 +4704,7 @@
"tags": [],
"label": "IKbnUrlStateStorage",
"description": [
"\nKbnUrlStateStorage is a state storage for {@link syncState} utility which:\n\n1. Keeps state in sync with the URL.\n2. Serializes data and stores it in the URL in one of the supported formats:\n * Rison encoded.\n * Hashed URL: In URL we store only the hash from the serialized state, but the state itself is stored in sessionStorage. See Kibana's `state:storeInSessionStorage` advanced option for more context.\n3. Takes care of listening to the URL updates and notifies state about the updates.\n4. Takes care of batching URL updates to prevent redundant browser history records.\n\n{@link https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/kbn_url_storage.md | Refer to this guide for more info}"
"\nKbnUrlStateStorage is a state storage for {@link syncState} utility which:\n\n1. Keeps state in sync with the URL.\n2. Serializes data and stores it in the URL in one of the supported formats:\n * Rison encoded.\n * Hashed URL: In URL we store only the hash from the serialized state, but the state itself is stored in sessionStorage. See Kibana's `state:storeInSessionStorage` advanced option for more context.\n3. Takes care of listening to the URL updates and notifies state about the updates.\n4. Takes care of batching URL updates to prevent redundant browser history records.\n\n{@link https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/docs/state_sync/storages/kbn_url_storage.md | Refer to this guide for more info}"
],
"signature": [
{
Expand Down Expand Up @@ -4953,7 +4953,7 @@
"tags": [],
"label": "ISessionStorageStateStorage",
"description": [
"\n{@link IStateStorage} for storing state in browser {@link Storage}\n{@link https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_sync/storages/session_storage.md | guide}"
"\n{@link IStateStorage} for storing state in browser {@link Storage}\n{@link https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/docs/state_sync/storages/session_storage.md | guide}"
],
"signature": [
{
Expand Down Expand Up @@ -8982,7 +8982,7 @@
"tags": [],
"label": "createStateContainerReactHelpers",
"description": [
"\nCreates helpers for using {@link StateContainer | State Containers} with react\nRefer to {@link https://github.com/elastic/kibana/blob/master/src/plugins/kibana_utils/docs/state_containers/react.md | guide} for details"
"\nCreates helpers for using {@link StateContainer | State Containers} with react\nRefer to {@link https://github.com/elastic/kibana/blob/main/src/plugins/kibana_utils/docs/state_containers/react.md | guide} for details"
],
"signature": [
"<Container extends ",
Expand Down
6 changes: 3 additions & 3 deletions dev_docs/api_welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ documentation for every plugin that exposes a <DocLink id="kibPlatformIntro" sec

<DocCallOut color="warning" title="Experimental">
This documentation is being automatically generated using an
[_experimental_ system](https://github.com/elastic/kibana/blob/master/rfcs/text/0014_api_documentation.md). That means
[_experimental_ system](https://github.com/elastic/kibana/blob/main/rfcs/text/0014_api_documentation.md). That means
it may be removed or modified at any time. If you have any questions, feedback or concerns, please create an issue using
the label `APIDocs`, or reach out to the Kibana Tech Leads
who are temporarily owning and maintaining this system.
Expand Down Expand Up @@ -46,7 +46,7 @@ the instructions <DocLink id="docsSetup" section="configure-the-nav-for-your-con
configure the navigation menu. The nav file you need to
edit is: [https://github.com/elastic/elastic-docs/blob/master/config/nav-kibana-dev.ts](https://github.com/elastic/elastic-docs/blob/master/config/nav-kibana-dev.ts)

Your API docs will exist in the top level [`api_docs` folder](https://github.com/elastic/kibana/tree/master/api_docs) and will use a doc id of the pattern `kib${PluginName}PluginApi`.
Your API docs will exist in the top level [`api_docs` folder](https://github.com/elastic/kibana/tree/main/api_docs) and will use a doc id of the pattern `kib${PluginName}PluginApi`.

### Why is a referenced API item not showing up as clickable?

Expand All @@ -70,7 +70,7 @@ In the short term, the best thing you can do is avoid deeply nested API items. U
adding `serviceFolders` in your kibana.json. This will automatically split your docs up based on which APIs are defined within the service folders.
They will get built into a doc with an id of
`kib${PluginName}${ServiceName}PluginApi`. The data plugin does this, so you
can [check that out as an example](https://github.com/elastic/kibana/blob/master/src/plugins/data/kibana.json#L13).
can [check that out as an example](https://github.com/elastic/kibana/blob/main/src/plugins/data/kibana.json#L13).

If that isn't the case and you are still experiencing performance issues, please file an issue!

Expand Down
12 changes: 6 additions & 6 deletions dev_docs/contributing/best_practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Refer to [divio documentation](https://documentation.divio.com/) for guidance on

#### Location

If the information spans multiple plugins, consider adding it to the [dev_docs](https://github.com/elastic/kibana/tree/master/dev_docs) folder. If it is plugin specific, consider adding it inside the plugin folder. Write it in an mdx file if you would like it to show up in our new (beta) documentation system.
If the information spans multiple plugins, consider adding it to the [dev_docs](https://github.com/elastic/kibana/tree/main/dev_docs) folder. If it is plugin specific, consider adding it inside the plugin folder. Write it in an mdx file if you would like it to show up in our new (beta) documentation system.

<DocCallOut title="internal only">

Expand Down Expand Up @@ -139,7 +139,7 @@ export type foo: string | AnInterface;

### Example plugins

Running Kibana with `yarn start --run-examples` will include all [example plugins](https://github.com/elastic/kibana/tree/master/examples). These are tested examples of platform services in use. We strongly encourage anyone providing a platform level service or <DocLink id="kibBuildingBlocks" text="building block"/> to include a tutorial that links to a tested example plugin. This is better than relying on copied code snippets, which can quickly get out of date.
Running Kibana with `yarn start --run-examples` will include all [example plugins](https://github.com/elastic/kibana/tree/main/examples). These are tested examples of platform services in use. We strongly encourage anyone providing a platform level service or <DocLink id="kibBuildingBlocks" text="building block"/> to include a tutorial that links to a tested example plugin. This is better than relying on copied code snippets, which can quickly get out of date.

## Performance

Expand All @@ -165,15 +165,15 @@ all of our apps are accessible.

## Localization

Kibana is translated into other languages. Use our i18n utilities to ensure your public facing strings will be translated to ensure all Kibana apps are localized. Read and adhere to our [i18n guidelines](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/GUIDELINE.md)
Kibana is translated into other languages. Use our i18n utilities to ensure your public facing strings will be translated to ensure all Kibana apps are localized. Read and adhere to our [i18n guidelines](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/GUIDELINE.md)

<DocCallOut title="Internal only">
Elasticians, check out the #kibana-localization channel to ask questions and receive guidance.
</DocCallOut>

## Styleguide

We use es-lint rules when possible, but please review our [styleguide](https://github.com/elastic/kibana/blob/master/STYLEGUIDE.mdx), which includes recommendations that can't be linted on.
We use es-lint rules when possible, but please review our [styleguide](https://github.com/elastic/kibana/blob/main/STYLEGUIDE.mdx), which includes recommendations that can't be linted on.

Es-lint overrides on a per-plugin level are discouraged.

Expand Down Expand Up @@ -231,7 +231,7 @@ Consider how you want to handle the PR review. Reviewing each PR going into the

**3. Use an example plugin**

If you are building a service for developers, create an [example plugin](https://github.com/elastic/kibana/tree/master/examples) to showcase and test intended usage. This is a great way for reviewers and PMs to play around with a feature through the UI, before the production UI is ready. This can also help developers consuming your services get hands on.
If you are building a service for developers, create an [example plugin](https://github.com/elastic/kibana/tree/main/examples) to showcase and test intended usage. This is a great way for reviewers and PMs to play around with a feature through the UI, before the production UI is ready. This can also help developers consuming your services get hands on.

## Embrace the monorepo

Expand All @@ -241,7 +241,7 @@ When experimenting with code, it's completely fine to create a separate GitHub r

There are some exceptions where a separate repo makes sense. However, they are exceptions to the rule. A separate repo has proven beneficial when there's a dedicated team collaborating on a package which has multiple consumers, for example [EUI](https://github.com/elastic/eui).

It may be tempting to get caught up in the dream of writing the next package which is published to npm and downloaded millions of times a week. Knowing the quality of developers that are working on Kibana, this is a real possibility. However, knowing which packages will see mass adoption is impossible to predict. Instead of jumping directly to writing code in a separate repo and accepting all of the complications that come along with it, prefer keeping code inside the Kibana repo. A [Kibana package](https://github.com/elastic/kibana/tree/master/packages) can be used to publish a package to npm, while still keeping the code inside the Kibana repo. Move code to an external repo only when there is a good reason, for example to enable external contributions.
It may be tempting to get caught up in the dream of writing the next package which is published to npm and downloaded millions of times a week. Knowing the quality of developers that are working on Kibana, this is a real possibility. However, knowing which packages will see mass adoption is impossible to predict. Instead of jumping directly to writing code in a separate repo and accepting all of the complications that come along with it, prefer keeping code inside the Kibana repo. A [Kibana package](https://github.com/elastic/kibana/tree/main/packages) can be used to publish a package to npm, while still keeping the code inside the Kibana repo. Move code to an external repo only when there is a good reason, for example to enable external contributions.

## Security best practices

Expand Down
Loading

0 comments on commit 69cb2d3

Please sign in to comment.