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

Look and feel enhancements - Batch 1 #5766

Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,23 @@ doc-table {
}
}

.osdDiscoverTable {
@include ouiCodeFont;

& > tbody > tr:not(.osdDiscoverInViewRow):not(.osdDiscoverExpandedRow) {
visibility: hidden;
}
AMoo-Miki marked this conversation as resolved.
Show resolved Hide resolved

.osdDiscoverExpandedRow {
background: $euiColorEmptyShade;
border-top: none !important;

& > td {
padding: 2em;
AMoo-Miki marked this conversation as resolved.
Show resolved Hide resolved
}
}
}

.osdDocTable__row {
td {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.osdDocTable_expandedRow {
border-top: none !important;
}

.osdDocTableCell__toggleDetails {
padding: 4px 0 0 !important;
}
Expand Down Expand Up @@ -32,3 +28,10 @@
opacity: 1;
}
}

.osdDocTableCell__source {
AMoo-Miki marked this conversation as resolved.
Show resolved Hide resolved
.osdDocTable__limitedHeight {
transform: translateY(-3px);
max-height: calc(10em - 3px);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const TableRow = ({
const flattened = indexPattern.flattenHit(row);
const [isExpanded, setIsExpanded] = useState(false);
const tableRow = (
<tr>
<tr key={row._id}>
<td data-test-subj="docTableExpandToggleColumn" className="osdDocTableCell__toggleDetails">
<EuiButtonIcon
color="text"
Expand All @@ -61,6 +61,7 @@ export const TableRow = ({
if (typeof row === 'undefined') {
return (
<td
key={columnId}
data-test-subj="docTableField"
className="osdDocTableCell eui-textBreakAll eui-textBreakWord"
>
Expand All @@ -71,8 +72,14 @@ export const TableRow = ({

if (fieldInfo?.type === '_source') {
return (
<td className="eui-textBreakAll eui-textBreakWord" data-test-subj="docTableField">
{fetchSourceTypeDataCell(indexPattern, row, columnId, false)}
<td
key={columnId}
AMoo-Miki marked this conversation as resolved.
Show resolved Hide resolved
className="osdDocTableCell eui-textBreakAll eui-textBreakWord osdDocTableCell__source"
data-test-subj="docTableField"
>
<div className="osdDocTable__limitedHeight">
AMoo-Miki marked this conversation as resolved.
Show resolved Hide resolved
{fetchSourceTypeDataCell(indexPattern, row, columnId, false)}
</div>
</td>
);
}
Expand All @@ -82,6 +89,7 @@ export const TableRow = ({
if (typeof formattedValue === 'undefined') {
return (
<td
key={columnId}
data-test-subj="docTableField"
className="osdDocTableCell eui-textBreakAll eui-textBreakWord"
>
Expand All @@ -95,6 +103,7 @@ export const TableRow = ({
if (!fieldInfo?.filterable) {
return (
<td
key={columnId}
data-test-subj="docTableField"
className="osdDocTableCell eui-textBreakAll eui-textBreakWord"
>
Expand All @@ -106,7 +115,9 @@ export const TableRow = ({

return (
<TableCell
key={columnId}
columnId={columnId}
columnType={fieldInfo?.type}
onFilter={onFilter}
fieldMapping={fieldMapping}
sanitizedCellValue={sanitizedCellValue}
Expand All @@ -117,9 +128,9 @@ export const TableRow = ({
);

const expandedTableRow = (
<tr>
<td className="osdDocTable_expandedRow" colSpan={columnIds.length + 1}>
<EuiFlexGroup justifyContent="center" alignItems="center">
<tr className="osdDiscoverExpandedRow" key={'x' + row._id}>
<td colSpan={columnIds.length + 2}>
<EuiFlexGroup>
<EuiFlexItem grow={false}>
<EuiIcon type="folderOpen" />
</EuiFlexItem>
Expand Down