Skip to content

Commit

Permalink
[Discover] Fix document comparison table padding (elastic#205984)
Browse files Browse the repository at this point in the history
## Summary

This PR fixes the table padding on the Discover document comparison
table which was causing the diff decorations to be cut off. This likely
started after elastic#188495 when some of the standard table styles the
comparison table inherits from changed.

Fixes elastic#205463.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit de3bd71)
  • Loading branch information
davismcphee committed Jan 10, 2025
1 parent ebe62f9 commit fb91d4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('CompareDocuments', () => {
"data-test-subj": "unifiedDataTableCompareDocuments",
"gridStyle": Object {
"border": "horizontal",
"cellPadding": "s",
"cellPadding": "l",
"fontSize": "s",
"header": "underline",
"rowHover": "highlight",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ export interface CompareDocumentsProps {

const COMPARISON_ROW_HEIGHT: EuiDataGridRowHeightsOptions = { defaultHeight: 'auto' };
const COMPARISON_IN_MEMORY: EuiDataGridInMemory = { level: 'sorting' };
const COMPARISON_GRID_STYLE: EuiDataGridStyle = { ...DATA_GRID_STYLE_DEFAULT, stripes: undefined };
const COMPARISON_GRID_STYLE: EuiDataGridStyle = {
...DATA_GRID_STYLE_DEFAULT,
cellPadding: 'l',
stripes: undefined,
};

const getStorageKey = (consumer: string, key: string) => `${consumer}:dataGridComparison${key}`;

Expand Down

0 comments on commit fb91d4d

Please sign in to comment.