diff --git a/.sass-lint.yml b/.sass-lint.yml index 9650a4c2a5206..e10cd1f5a3e86 100644 --- a/.sass-lint.yml +++ b/.sass-lint.yml @@ -11,6 +11,7 @@ files: - 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss' - 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss' - 'x-pack/plugins/maps/**/*.s+(a|c)ss' + - 'x-pack/plugins/spaces/**/*.s+(a|c)ss' ignore: - 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss' rules: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3b1fe0a9039be..9ab4447ef9deb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -403,6 +403,34 @@ extract them to a `JSON` file or integrate translations back to Kibana. To know We cannot support accepting contributions to the translations from any source other than the translators we have engaged to do the work. We are still to develop a proper process to accept any contributed translations. We certainly appreciate that people care enough about the localization effort to want to help improve the quality. We aim to build out a more comprehensive localization process for the future and will notify you once contributions can be supported, but for the time being, we are not able to incorporate suggestions. +### Syling with SASS + +When writing a new component, create a sibling SASS file of the same name and import directly into the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint). + +Any JavaScript (or TypeScript) file that imports SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`styling_constants.scss` file](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/styles/_styling_constants.scss). However, any Legacy (file path includes `/legacy`) files will not. + +**Example:** + +```tsx +// component.tsx + +import './component.scss'; + +export const Component = () => { + return ( +
+ ); +} +``` + +```scss +// component.scss + +.plgComponent { ... } +``` + +Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file. + ### Testing and Building To ensure that your changes will not break other functionality, please run the test suite and build process before submitting your Pull Request. diff --git a/docs/api/features.asciidoc b/docs/api/features.asciidoc index da8b0edfe2261..57a87ff6342f9 100644 --- a/docs/api/features.asciidoc +++ b/docs/api/features.asciidoc @@ -29,7 +29,7 @@ The API returns the following: "id": "discover", "name": "Discover", "icon": "discoverApp", - "navLinkId": "kibana:discover", + "navLinkId": "discover", "app": [ "kibana" ], @@ -74,7 +74,7 @@ The API returns the following: "id": "visualize", "name": "Visualize", "icon": "visualizeApp", - "navLinkId": "kibana:visualize", + "navLinkId": "visualize", "app": [ "kibana" ], @@ -121,7 +121,7 @@ The API returns the following: "id": "dashboard", "name": "Dashboard", "icon": "dashboardApp", - "navLinkId": "kibana:dashboard", + "navLinkId": "dashboards", "app": [ "kibana" ], @@ -173,7 +173,7 @@ The API returns the following: "id": "dev_tools", "name": "Dev Tools", "icon": "devToolsApp", - "navLinkId": "kibana:dev_tools", + "navLinkId": "dev_tools", "app": [ "kibana" ], diff --git a/docs/developer/plugin/development-plugin-feature-registration.asciidoc b/docs/developer/plugin/development-plugin-feature-registration.asciidoc index 4702204196bf2..d594a6d4255b2 100644 --- a/docs/developer/plugin/development-plugin-feature-registration.asciidoc +++ b/docs/developer/plugin/development-plugin-feature-registration.asciidoc @@ -153,7 +153,7 @@ init(server) { defaultMessage: 'Dev Tools', }), icon: 'devToolsApp', - navLinkId: 'kibana:dev_tools', + navLinkId: 'dev_tools', app: ['kibana'], catalogue: ['console', 'searchprofiler', 'grokdebugger'], privileges: { @@ -216,7 +216,7 @@ init(server) { }), order: 100, icon: 'discoverApp', - navLinkId: 'kibana:discover', + navLinkId: 'discover', app: ['kibana'], catalogue: ['discover'], privileges: { diff --git a/docs/release-notes/highlights-7.7.0.asciidoc b/docs/release-notes/highlights-7.7.0.asciidoc index 23ecc653dce39..540ac0eea0fba 100644 --- a/docs/release-notes/highlights-7.7.0.asciidoc +++ b/docs/release-notes/highlights-7.7.0.asciidoc @@ -6,8 +6,6 @@ Explore the new features in Kibana 7.7. -coming::[7.7.0] - //NOTE: The notable-highlights tagged regions are re-used in the //Installation and Upgrade Guide diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index 69a3f72bc795c..cc662af08b8f1 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -641,3 +641,4 @@ include::{docdir}/settings/reporting-settings.asciidoc[] include::secure-settings.asciidoc[] include::{docdir}/settings/security-settings.asciidoc[] include::{docdir}/settings/spaces-settings.asciidoc[] +include::{docdir}/settings/telemetry-settings.asciidoc[] diff --git a/docs/user/dashboard.asciidoc b/docs/user/dashboard.asciidoc index de714ae40086b..301efb2dfe2c0 100644 --- a/docs/user/dashboard.asciidoc +++ b/docs/user/dashboard.asciidoc @@ -174,7 +174,7 @@ to view an embedded dashboard. * Generate a PNG report TIP: To create a link to a dashboard by title, use: + -`${domain}/${basepath?}/app/kibana#/dashboards?title=${yourdashboardtitle}` +`${domain}/${basepath?}/app/dashboards#/list?title=${yourdashboardtitle}` TIP: When sharing a link to a dashboard snapshot, use the *Short URL*. Snapshot URLs are long and can be problematic for Internet Explorer and other diff --git a/packages/kbn-plugin-helpers/cli.js b/packages/kbn-plugin-helpers/cli.js index c6fc48bc5be9a..48b70535272fe 100644 --- a/packages/kbn-plugin-helpers/cli.js +++ b/packages/kbn-plugin-helpers/cli.js @@ -88,6 +88,4 @@ program })) ); -program.command('postinstall').action(createCommanderAction('postinstall')); - program.parse(process.argv); diff --git a/packages/kbn-plugin-helpers/lib/tasks.js b/packages/kbn-plugin-helpers/lib/tasks.js index 0e33e2086d9c4..afc9c056d51d7 100644 --- a/packages/kbn-plugin-helpers/lib/tasks.js +++ b/packages/kbn-plugin-helpers/lib/tasks.js @@ -22,7 +22,6 @@ const startTask = require('../tasks/start'); const testAllTask = require('../tasks/test/all'); const testKarmaTask = require('../tasks/test/karma'); const testMochaTask = require('../tasks/test/mocha'); -const postinstallTask = require('../tasks/postinstall'); module.exports = { build: buildTask, @@ -30,5 +29,4 @@ module.exports = { testAll: testAllTask, testKarma: testKarmaTask, testMocha: testMochaTask, - postinstall: postinstallTask, }; diff --git a/src/core/README.md b/src/core/README.md index 65449f143a1bb..4441638b69b04 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -4,8 +4,8 @@ Core is a set of systems (frontend, backend etc.) that Kibana and its plugins ar ## Plugin development Core Plugin API Documentation: - - [Core Public API](/docs/development/core/public/kibana-plugin-public.md) - - [Core Server API](/docs/development/core/server/kibana-plugin-server.md) + - [Core Public API](/docs/development/core/public/kibana-plugin-core-public.md) + - [Core Server API](/docs/development/core/server/kibana-plugin-core-server.md) - [Migration guide for porting existing plugins](./MIGRATION.md) ## Integration with the "legacy" Kibana diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index 3fc22caaefb04..bf1a764e85882 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -192,7 +192,7 @@ export class ChromeService { forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()} helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))} helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))} - homeHref={http.basePath.prepend('/app/kibana#/home')} + homeHref={http.basePath.prepend('/app/home')} isVisible$={this.isVisible$} kibanaVersion={injectedMetadata.getKibanaVersion()} legacyMode={injectedMetadata.getLegacyMode()} diff --git a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 14d5b2e8fdcbb..ed97db020035e 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -116,6 +116,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` }, ] } + navigateToApp={[Function]} onIsLockedUpdate={[Function]} onIsOpenUpdate={[Function]} recentNavLinks={ @@ -2993,6 +2994,7 @@ exports[`CollapsibleNav renders the default nav 1`] = ` isLocked={false} isOpen={false} navLinks={Array []} + navigateToApp={[Function]} onIsLockedUpdate={[Function]} onIsOpenUpdate={[Function]} recentNavLinks={Array []} @@ -3023,6 +3025,7 @@ exports[`CollapsibleNav renders the default nav 2`] = ` isLocked={false} isOpen={true} navLinks={Array []} + navigateToApp={[Function]} onIsLockedUpdate={[Function]} onIsOpenUpdate={[Function]} recentNavLinks={Array []} @@ -3589,6 +3592,7 @@ exports[`CollapsibleNav renders the default nav 3`] = ` isLocked={true} isOpen={true} navLinks={Array []} + navigateToApp={[Function]} onIsLockedUpdate={[Function]} onIsOpenUpdate={[Function]} recentNavLinks={Array []} diff --git a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx b/src/core/public/chrome/ui/header/collapsible_nav.test.tsx index 4a9d3071b93be..0917f47ebe9b1 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.test.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.test.tsx @@ -63,6 +63,7 @@ function mockProps() { storage: new StubBrowserStorage(), onIsOpenUpdate: () => {}, onIsLockedUpdate: () => {}, + navigateToApp: () => {}, }; } diff --git a/src/core/public/chrome/ui/header/collapsible_nav.tsx b/src/core/public/chrome/ui/header/collapsible_nav.tsx index 274195f1917a5..9adcc19b0f0e7 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.tsx @@ -78,6 +78,7 @@ interface Props { storage?: Storage; onIsLockedUpdate: OnIsLockedUpdate; onIsOpenUpdate: (isOpen?: boolean) => void; + navigateToApp: (appId: string) => void; } export function CollapsibleNav({ @@ -89,6 +90,7 @@ export function CollapsibleNav({ onIsOpenUpdate, homeHref, id, + navigateToApp, storage = window.localStorage, }: Props) { const lockRef = useRef