Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Redesign for the grid, panels and sidebar v1 #165866

Merged
merged 76 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
6be6936
[Discover] Update grid styles
jughosta Aug 17, 2023
7c27938
[Discover] Update tests
jughosta Aug 17, 2023
72bc5b2
[Discover] Update tests
jughosta Aug 17, 2023
0ac8342
[Discover] Add a comment
jughosta Aug 17, 2023
69ed036
[Discover] Update tests
jughosta Aug 17, 2023
680641b
[Discover] Update tests
jughosta Aug 17, 2023
de53757
[Discover] Address review comments
jughosta Sep 4, 2023
aca35f3
[Discover] Enable row stripes
jughosta Sep 4, 2023
2c65d30
Merge remote-tracking branch 'upstream/main' into redesign-checkboxes
jughosta Sep 4, 2023
bdcbf1d
[Discover] Update header background
jughosta Sep 4, 2023
1c71502
[Discover] Update document view
jughosta Sep 4, 2023
159dcbb
Merge branch 'main' into redesign-checkboxes
jughosta Sep 4, 2023
fa58fa3
[Discover] Update jest snapshots
jughosta Sep 4, 2023
e575c01
Merge branch 'main' into redesign-checkboxes
jughosta Sep 5, 2023
f56a108
[Discover] Remove background from panels
jughosta Sep 5, 2023
dbe7a7f
[Discover] Update field list styles
jughosta Sep 5, 2023
f5d1996
[Discover] Update Add Field button
jughosta Sep 5, 2023
9a139e3
[Discover] Remove tabs background
jughosta Sep 5, 2023
2eddea6
[Discover] Apply item shadow changes only for discover
jughosta Sep 5, 2023
15693c9
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 5, 2023
604d722
[Discover] Swap checkbox and arrow back
jughosta Sep 5, 2023
7e59c76
[Discover] Update context app layout to remove extra horizontal margin
jughosta Sep 5, 2023
46d813c
[Discover] Add top border to grid controls
jughosta Sep 5, 2023
1820c3a
[Discover] Change how shadow is overriden
jughosta Sep 5, 2023
3ffc0ff
Merge remote-tracking branch 'origin/164661-discover-panels-redesign'…
jughosta Sep 5, 2023
2e783c3
[Discover] Fix tests
jughosta Sep 5, 2023
1f86e50
[Discover] Remove comment
jughosta Sep 5, 2023
cd4c90c
Merge branch 'main' into 164661-discover-panels-redesign
jughosta Sep 5, 2023
22637f5
Merge branch 'main' into redesign-checkboxes
jughosta Sep 6, 2023
5cd57a0
Merge branch 'main' into 164661-discover-panels-redesign
jughosta Sep 6, 2023
e691ccb
Merge branch '164661-discover-panels-redesign' into discover-redesign-v1
jughosta Sep 6, 2023
4c20cd7
[Discover] Show a drag handle on hover
jughosta Sep 6, 2023
ba5267a
[Discover] Reduce space between items
jughosta Sep 6, 2023
fcc7a24
[Discover] Update bottom button
jughosta Sep 6, 2023
c15f2e4
[Discover] Add collapse/expand buttons
jughosta Sep 6, 2023
296613f
[Discover] Update tests
jughosta Sep 6, 2023
4c5b6e4
[Discover] Rearrange sidebar toggle button
jughosta Sep 6, 2023
25de160
Merge branch 'main' into discover-redesign-v1
jughosta Sep 6, 2023
68bac23
[Discover] Cleanup translations
jughosta Sep 6, 2023
84e11a4
[Discover] Update tests
jughosta Sep 6, 2023
a94212a
[Discover] Update tests
jughosta Sep 6, 2023
cf1f1bc
[Discover] Fix drag handle theme
jughosta Sep 6, 2023
68c3208
[Discover] Fix sidebar toggle theme
jughosta Sep 6, 2023
c8cf870
Merge branch 'main' into discover-redesign-v1
jughosta Sep 6, 2023
d8a0666
[Discover] Update tests
jughosta Sep 6, 2023
eb0f3d2
Merge remote-tracking branch 'origin/discover-redesign-v1' into disco…
jughosta Sep 6, 2023
20064d6
Merge branch 'main' into discover-redesign-v1
jughosta Sep 7, 2023
ab2c54e
[Discover] Update sidebar toggle icons to old ones
jughosta Sep 7, 2023
1d8ae3b
[Discover] Remove sidebar item drag icon
jughosta Sep 7, 2023
47b4595
[Discover] Update padding on Single Document page
jughosta Sep 7, 2023
eeb633f
Update src/plugins/discover/public/application/context/context_app.tsx
jughosta Sep 7, 2023
ac89e52
[Discover] Remove the border above tabs
jughosta Sep 7, 2023
12f56be
[Discover] Move sidebar toggle logic from discover plugin to unified …
jughosta Sep 7, 2023
84ef775
[Discover] Make bottom button style customizable and fix it for the f…
jughosta Sep 7, 2023
f8ff9c5
[Discover] Enable sidebar toggle for example page
jughosta Sep 7, 2023
f2171cc
[Discover] Clean up tests
jughosta Sep 7, 2023
6aafce3
Merge branch 'main' into discover-redesign-v1
jughosta Sep 7, 2023
f631110
[Discover] Update histogram test
jughosta Sep 7, 2023
44bf5de
Merge branch 'main' into discover-redesign-v1
jughosta Sep 7, 2023
5357b53
Remove some whitespace around the Unified Histogram resize button
davismcphee Sep 7, 2023
ddb0795
[Discover] Fix flyout button action
jughosta Sep 8, 2023
4325927
[Discover] Add top level configuration for the compressed view
jughosta Sep 8, 2023
b34d3bc
[Discover] Add bottom border for Field Statistics tab
jughosta Sep 8, 2023
1ec4869
Merge pull request #5 from davismcphee/discover-redesign-resize-button
jughosta Sep 8, 2023
ee354cd
[Discover] Overwrite item background and cleanup
jughosta Sep 8, 2023
0aaf693
Merge branch 'main' into discover-redesign-v1
jughosta Sep 8, 2023
951fe65
Fix Unified Field List drag styles
davismcphee Sep 9, 2023
a93943c
[Discover] Fine tune row controls positioning
jughosta Sep 9, 2023
55daac1
Merge pull request #6 from davismcphee/discover-redesign-drag-fix
jughosta Sep 11, 2023
920ba5b
Merge branch 'main' into discover-redesign-v1
jughosta Sep 11, 2023
c824954
Merge branch 'main' into discover-redesign-v1
jughosta Sep 11, 2023
dec3d35
[Discover] Make time field column a little wider
jughosta Sep 11, 2023
a1173fa
[Discover] Fix row controls on Surrounding Documents page
jughosta Sep 11, 2023
b54538e
[Discover] Update test snapshots
jughosta Sep 11, 2023
d55d577
Merge branch 'main' into discover-redesign-v1
jughosta Sep 11, 2023
ee7807a
Merge branch 'main' into discover-redesign-v1
jughosta Sep 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const getCreationOptions: UnifiedFieldListSidebarContainerProps['getCreationOpti
originatingApp: PLUGIN_ID,
localStorageKeyPrefix: 'examples',
timeRangeUpdatesType: 'timefilter',
compressed: true,
showSidebarToggleButton: true,
disablePopularFields: true,
};
};
Expand Down
68 changes: 34 additions & 34 deletions packages/kbn-unified-data-table/src/components/data_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,6 @@
max-width: 100%;
height: 100%;
overflow: hidden;
border-radius: $euiBorderRadius;

.euiDataGrid__controls {
border: none;
border-bottom: $euiBorderThin;
}

.euiDataGridRowCell.euiDataGridRowCell--firstColumn {
border-left: none;
padding: 0;
}

.euiDataGridRowCell.euiDataGridRowCell--lastColumn {
border-right: none;
}

.unifiedDataTable__table .euiDataGridRowCell:first-of-type,
.unifiedDataTable__table .euiDataGrid--headerShade.euiDataGrid--bordersAll .euiDataGridHeaderCell:first-of-type {
border-left: none;
border-right: none;
}

.euiDataGridRowCell:last-of-type,
.euiDataGridHeaderCell:last-of-type {
border-right: none;
}
}

.unifiedDataTable__cellValue {
Expand Down Expand Up @@ -57,6 +31,31 @@
flex-direction: column;
flex-wrap: nowrap;
height: 100%;

.euiDataGrid__content {
background: transparent;
}

.euiDataGrid__controls {
border-top: $euiBorderThin;
}

.euiDataGrid--headerUnderline .euiDataGridHeaderCell {
border-bottom: $euiBorderThin;
}

.euiDataGridRowCell.euiDataGridRowCell--controlColumn[data-gridcell-column-id='select'] {
padding: $euiSizeS+2 0 0 $euiSizeXS;
}

.euiDataGridRowCell.euiDataGridRowCell--controlColumn[data-gridcell-column-id='openDetails'] {
padding: $euiSizeXS+1 0 0 0;
}

.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover,
.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover .euiDataGridRowCell__contentByHeight + .euiDataGridRowCell__expandActions {
background-color: tintOrShade($euiColorLightShade, 50%, 0);
}
}

.unifiedDataTable__table {
Expand All @@ -65,14 +64,6 @@
min-height: 0;
}

.unifiedDataTable__footer {
flex-shrink: 0;
background-color: $euiColorLightShade;
padding: $euiSize / 2 $euiSize;
margin-top: $euiSize / 4;
text-align: center;
}

.unifiedDataTable__flyoutHeader {
white-space: nowrap;
}
Expand Down Expand Up @@ -118,7 +109,16 @@
@include euiTextTruncate;
}

.unifiedDataTable__descriptionListTitle {
margin-inline: 0 0;
padding-inline: 0;
background: transparent;
font-weight: $euiFontWeightBold;
}

.unifiedDataTable__descriptionListDescription {
margin-inline: $euiSizeS $euiSizeS;
padding-inline: 0;
Comment on lines +129 to +138
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth to note that these changes will also resolve #146339 🥳

word-break: break-all;
white-space: normal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { buildEditFieldButton } from './build_edit_field_button';

const openDetails = {
id: 'openDetails',
width: 24,
width: 26,
headerCellRender: () => (
<EuiScreenReaderOnly>
<span>
Expand Down
12 changes: 7 additions & 5 deletions packages/kbn-unified-data-table/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ export const defaultMonacoEditorWidth = 370;
export const defaultTimeColumnWidth = 210;
export const kibanaJSON = 'kibana-json';

export const GRID_STYLE = {
border: 'all',
export const GRID_STYLE: EuiDataGridStyle = {
border: 'horizontal',
fontSize: 's',
cellPadding: 's',
rowHover: 'none',
} as EuiDataGridStyle;
cellPadding: 'l',
rowHover: 'highlight',
header: 'underline',
stripes: true,
};

export const toolbarVisibility = {
showColumnSelector: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ describe('Unified data table cell rendering', function () {
compressed={true}
type="inline"
>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
extension
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -223,7 +225,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
bytesDisplayName
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -234,7 +238,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_index
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -245,7 +251,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_score
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand Down Expand Up @@ -363,7 +371,9 @@ describe('Unified data table cell rendering', function () {
compressed={true}
type="inline"
>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
extension
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -376,7 +386,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
bytesDisplayName
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -389,7 +401,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_index
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -400,7 +414,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_score
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand Down Expand Up @@ -443,7 +459,9 @@ describe('Unified data table cell rendering', function () {
compressed={true}
type="inline"
>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
extension
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -456,7 +474,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
bytesDisplayName
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -469,7 +489,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_index
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand All @@ -480,7 +502,9 @@ describe('Unified data table cell rendering', function () {
}
}
/>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
_score
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand Down Expand Up @@ -603,7 +627,9 @@ describe('Unified data table cell rendering', function () {
compressed={true}
type="inline"
>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
object.value
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand Down Expand Up @@ -646,7 +672,9 @@ describe('Unified data table cell rendering', function () {
compressed={true}
type="inline"
>
<EuiDescriptionListTitle>
<EuiDescriptionListTitle
className="unifiedDataTable__descriptionListTitle"
>
object.value
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export const getRenderCellValueFn =
>
{pairs.map(([key, value]) => (
<Fragment key={key}>
<EuiDescriptionListTitle>{key}</EuiDescriptionListTitle>
<EuiDescriptionListTitle className="unifiedDataTable__descriptionListTitle">
{key}
</EuiDescriptionListTitle>
<EuiDescriptionListDescription
className="unifiedDataTable__descriptionListDescription"
dangerouslySetInnerHTML={{ __html: value }}
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 @@ -105,6 +105,7 @@ export function FieldItemButton<T extends FieldListItem = DataViewField>({
[`unifiedFieldListItemButton--${type}`]: type,
[`unifiedFieldListItemButton--exists`]: !isEmpty,
[`unifiedFieldListItemButton--missing`]: isEmpty,
[`unifiedFieldListItemButton--withDragHandle`]: Boolean(otherProps.dragHandle),
},
className
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface FieldListFiltersProps<T extends FieldListItem> {
getCustomFieldType?: FieldTypeFilterProps<T>['getCustomFieldType'];
onSupportedFieldFilter?: FieldTypeFilterProps<T>['onSupportedFieldFilter'];
onChangeFieldTypes: FieldTypeFilterProps<T>['onChange'];
compressed?: FieldNameSearchProps['compressed'];
nameFilter: FieldNameSearchProps['nameFilter'];
screenReaderDescriptionId?: FieldNameSearchProps['screenReaderDescriptionId'];
onChangeNameFilter: FieldNameSearchProps['onChange'];
Expand All @@ -38,6 +39,7 @@ export interface FieldListFiltersProps<T extends FieldListItem> {
* @param getCustomFieldType
* @param onSupportedFieldFilter
* @param onChangeFieldTypes
* @param compressed
* @param nameFilter
* @param screenReaderDescriptionId
* @param onChangeNameFilter
Expand All @@ -52,6 +54,7 @@ function InnerFieldListFilters<T extends FieldListItem = DataViewField>({
getCustomFieldType,
onSupportedFieldFilter,
onChangeFieldTypes,
compressed,
nameFilter,
screenReaderDescriptionId,
onChangeNameFilter,
Expand All @@ -72,6 +75,7 @@ function InnerFieldListFilters<T extends FieldListItem = DataViewField>({
/>
) : undefined
}
compressed={compressed}
nameFilter={nameFilter}
screenReaderDescriptionId={screenReaderDescriptionId}
onChange={onChangeNameFilter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { EuiFieldSearch, type EuiFieldSearchProps } from '@elastic/eui';
export interface FieldNameSearchProps {
'data-test-subj': string;
append?: EuiFieldSearchProps['append'];
compressed?: EuiFieldSearchProps['compressed'];
nameFilter: string;
screenReaderDescriptionId?: string;
onChange: (nameFilter: string) => unknown;
Expand All @@ -25,6 +26,7 @@ export interface FieldNameSearchProps {
* Search input for fields list
* @param dataTestSubject
* @param append
* @param compressed
* @param nameFilter
* @param screenReaderDescriptionId
* @param onChange
Expand All @@ -33,6 +35,7 @@ export interface FieldNameSearchProps {
export const FieldNameSearch: React.FC<FieldNameSearchProps> = ({
'data-test-subj': dataTestSubject,
append,
compressed,
nameFilter,
screenReaderDescriptionId,
onChange,
Expand All @@ -52,6 +55,7 @@ export const FieldNameSearch: React.FC<FieldNameSearchProps> = ({
placeholder={searchPlaceholder}
value={nameFilter}
append={append}
compressed={compressed}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ async function getComponent({
isEmpty: false,
groupIndex: 1,
itemIndex: 0,
size: 'xs',
workspaceSelectedFieldNames: [],
};
const comp = await mountWithIntl(<UnifiedFieldListItem {...props} />);
Expand Down
Loading