Skip to content

Commit

Permalink
Merge branch 'master' into chore/test-ua-mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Jul 20, 2020
2 parents 81640fe + b9413cf commit 32416ac
Show file tree
Hide file tree
Showing 347 changed files with 5,214 additions and 2,895 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"@elastic/apm-rum": "^5.2.0",
"@elastic/charts": "19.8.1",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "7.9.0-rc.1",
"@elastic/elasticsearch": "7.9.0-rc.2",
"@elastic/ems-client": "7.9.3",
"@elastic/eui": "26.3.1",
"@elastic/filesaver": "1.1.2",
Expand Down Expand Up @@ -322,7 +322,7 @@
"@types/browserslist-useragent": "^3.0.0",
"@types/chance": "^1.0.0",
"@types/cheerio": "^0.22.10",
"@types/chromedriver": "^2.38.0",
"@types/chromedriver": "^81.0.0",
"@types/classnames": "^2.2.9",
"@types/color": "^3.0.0",
"@types/d3": "^3.5.43",
Expand Down Expand Up @@ -411,7 +411,7 @@
"chai": "3.5.0",
"chance": "1.0.18",
"cheerio": "0.22.0",
"chromedriver": "^83.0.0",
"chromedriver": "^84.0.0",
"classnames": "2.2.6",
"dedent": "^0.7.0",
"delete-empty": "^2.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/kbn-plugin-generator/sao_template/sao.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ module.exports = function ({ name, targetPath }) {
return !customPath;
},
},
generateTsconfig: {
type: 'confirm',
message: 'Would you like to use a custom tsconfig file?',
default: true,
},
},
filters: {
'public/**/index.scss': 'generateScss',
Expand All @@ -128,6 +133,7 @@ module.exports = function ({ name, targetPath }) {
'translations/**/*': 'generateTranslations',
'i18nrc.json': 'generateTranslations',
'eslintrc.js': 'generateEslint',
'tsconfig.json': 'generateTsconfig',
},
move: {
'eslintrc.js': '.eslintrc.js',
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-plugin-generator/sao_template/sao.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ describe('plugin generator sao integration', () => {
generateApi: true,
generateScss: false,
generateEslint: false,
generateTsconfig: false,
});

// check output files
expect(res.fileList).toContain('public/plugin.ts');
expect(res.fileList).not.toContain('public/index.scss');
expect(res.fileList).not.toContain('.eslintrc.js');
expect(res.fileList).not.toContain('tsconfig.json');
});

it('plugin package has correct title', async () => {
Expand Down Expand Up @@ -136,6 +138,7 @@ describe('plugin generator sao integration', () => {

it('includes dotfiles', async () => {
const res = await sao.mockPrompt(template);
expect(res.files['tsconfig.json']).toBeTruthy();
expect(res.files['.eslintrc.js']).toBeTruthy();
expect(res.files['.i18nrc.json']).toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const <%= upperCamelCaseName %>App = ({ basename, notifications, http, na
<Router basename={basename}>
<I18nProvider>
<>
<navigation.ui.TopNavMenu appName={ PLUGIN_ID } showSearchBar={true} />
<navigation.ui.TopNavMenu appName={ PLUGIN_ID } showSearchBar={true} useDefaultBehaviors={true}/>
<EuiPage restrictWidth="1000px">
<EuiPageBody>
<EuiPageHeader>
Expand Down
16 changes: 16 additions & 0 deletions packages/kbn-plugin-generator/sao_template/template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./target",
"skipLibCheck": true
},
"include": [
"index.ts",
"common/**/*.ts",
"public/**/*.ts",
"public/**/*.tsx",
"server/**/*.ts",
"../../typings/**/*",
],
"exclude": []
}
3 changes: 1 addition & 2 deletions src/core/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
@import './chrome/index';
@import './overlays/index';
@import './rendering/index';
@import './styles/index';

// Global styles need to be migrated
@import '../../legacy/ui/public/styles/_legacy/_index';
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@import '@elastic/eui/src/components/call_out/variables';
@import '@elastic/eui/src/components/call_out/mixins';

// SASSTODO: Replace with an EUI editor
// Intentionally not using the EuiCodeBlock colors here because they actually change
// hue from light to dark theme. So some colors would change while others wouldn't.
Expand Down Expand Up @@ -181,7 +178,7 @@
}

&.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px $euiColorEmptyShade;
box-shadow: 0 0 3px 0 $euiColorEmptyShade;
}

.ace_marker-layer .ace_step {
Expand Down
58 changes: 58 additions & 0 deletions src/core/public/styles/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@import '@elastic/eui/src/components/collapsible_nav/variables';
// Application Layout

// chrome-context
// TODO #64541
// Delete this block
.chrHeaderWrapper:not(.headerWrapper) .content {
display: flex;
flex-flow: row nowrap;
width: 100%;
height: 100%;
overflow: hidden;
}

.application,
.app-container {
> * {
position: relative;
}
}

.application {
position: relative;
z-index: 0;
display: flex;
flex-grow: 1;
flex-shrink: 0;
flex-basis: auto;
flex-direction: column;

> * {
flex-shrink: 0;
}
}

// We apply brute force focus states to anything not coming from Eui
// which has focus states designed at the component level.
// You can also use "kbn-resetFocusState" to not apply the default focus
// state. This is useful when you've already hand crafted your own
// focus states in Kibana.
:focus {
&:not([class^='eui']):not(.kbn-resetFocusState) {
@include euiFocusRing;
}
}

// A necessary hack so that the above focus policy doesn't pollute some EUI
// entrenched inputs.
.euiComboBox {
// :not() specificity needed to override the above
input:not([class^='eui']):focus {
animation: none !important;
}
}

.euiBody--collapsibleNavIsDocked .euiBottomBar {
margin-left: $euiCollapsibleNavWidth;
}
2 changes: 2 additions & 0 deletions src/core/public/styles/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import './base';
@import './ace_overrides';
1 change: 1 addition & 0 deletions src/core/server/elasticsearch/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export { IScopedClusterClient, ScopedClusterClient } from './scoped_cluster_clie
export { ElasticsearchClientConfig } from './client_config';
export { IClusterClient, ICustomClusterClient, ClusterClient } from './cluster_client';
export { configureClient } from './configure_client';
export { retryCallCluster, migrationRetryCallCluster } from './retry_call_cluster';
Loading

0 comments on commit 32416ac

Please sign in to comment.