Skip to content

Commit

Permalink
Merge branch 'main' into d/2022-03-09-fix-ff-color-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 9, 2022
2 parents 411c94f + 488d939 commit 6e98b39
Show file tree
Hide file tree
Showing 33 changed files with 498 additions and 207 deletions.
29 changes: 0 additions & 29 deletions .ci/package-testing/Jenkinsfile

This file was deleted.

12 changes: 0 additions & 12 deletions test/scripts/jenkins_xpack_package_build.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/scripts/jenkins_xpack_package_deb.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/scripts/jenkins_xpack_package_docker.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/scripts/jenkins_xpack_package_rpm.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import { CLOUD_KIBANA_CONFIG } from './fixtures/cloud_kibana_config';

const logFilePath = Path.join(__dirname, 'logs.log');

describe('Fleet preconfiguration reset', () => {
// FAILING: https://github.com/elastic/kibana/issues/127076
describe.skip('Fleet preconfiguration reset', () => {
let esServer: kbnTestServer.TestElasticsearchUtils;
let kbnServer: kbnTestServer.TestKibanaUtils;

Expand Down
5 changes: 5 additions & 0 deletions x-pack/plugins/lens/common/expressions/datatable/datatable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export interface DatatableArgs {
sortingColumnId: SortingState['columnId'];
sortingDirection: SortingState['direction'];
fitRowToContent?: boolean;
rowHeightLines?: number;
pageSize?: PagingState['size'];
}

Expand Down Expand Up @@ -68,6 +69,10 @@ export const getDatatable = (
types: ['boolean'],
help: '',
},
rowHeightLines: {
types: ['number'],
help: '',
},
pageSize: {
types: ['number'],
help: '',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('datatable cell renderer', () => {
/>
</DataContext.Provider>
);
expect(cell.find('.lnsTableCell').prop('className')).toContain('--right');
expect(cell.find('.lnsTableCell--right').exists()).toBeTruthy();
});

describe('dynamic coloring', () => {
Expand Down Expand Up @@ -127,6 +127,7 @@ describe('datatable cell renderer', () => {
],
sortingColumnId: '',
sortingDirection: 'none',
rowHeightLines: 1,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export const createGridCell = (
columnConfig: ColumnConfig,
DataContext: React.Context<DataContextType>,
uiSettings: IUiSettingsClient,
fitRowToContent?: boolean
fitRowToContent?: boolean,
rowHeight?: number
) => {
// Changing theme requires a full reload of the page, so we can cache here
const IS_DARK_THEME = uiSettings.get('theme:darkMode');
Expand All @@ -31,7 +32,7 @@ export const createGridCell = (
const currentAlignment = alignments && alignments[columnId];
const alignmentClassName = `lnsTableCell--${currentAlignment}`;
const className = classNames(alignmentClassName, {
lnsTableCell: !fitRowToContent,
lnsTableCell: !fitRowToContent && rowHeight === 1,
});

const { colorMode, palette } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function sampleArgs() {
],
sortingColumnId: '',
sortingDirection: 'none',
rowHeightLines: 1,
};

return { data, args };
Expand Down Expand Up @@ -299,6 +300,7 @@ describe('DatatableComponent', () => {
],
sortingColumnId: '',
sortingDirection: 'none',
rowHeightLines: 1,
};

const wrapper = mountWithIntl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,16 @@ export const DatatableComponent = (props: DatatableRenderProps) => {
columnConfig,
DataContext,
props.uiSettings,
props.args.fitRowToContent
props.args.fitRowToContent,
props.args.rowHeightLines
),
[formatters, columnConfig, props.uiSettings, props.args.fitRowToContent]
[
formatters,
columnConfig,
props.uiSettings,
props.args.fitRowToContent,
props.args.rowHeightLines,
]
);

const columnVisibility = useMemo(
Expand Down Expand Up @@ -414,13 +421,15 @@ export const DatatableComponent = (props: DatatableRenderProps) => {
<EuiDataGrid
aria-label={dataGridAriaLabel}
data-test-subj="lnsDataTable"
rowHeightsOptions={
props.args.fitRowToContent
rowHeightsOptions={{
defaultHeight: props.args.fitRowToContent
? 'auto'
: props.args.rowHeightLines
? {
defaultHeight: 'auto',
lineCount: props.args.rowHeightLines,
}
: undefined
}
: undefined,
}}
columns={columns}
columnVisibility={columnVisibility}
trailingControlColumns={trailingControlColumns}
Expand Down
Loading

0 comments on commit 6e98b39

Please sign in to comment.