Skip to content

Commit

Permalink
Changes after UX/UI feedback.
Browse files Browse the repository at this point in the history
Signed-off-by: Ketan Verma <ketan9495@gmail.com>
  • Loading branch information
ketanv3 committed Jun 3, 2021
1 parent 7819e5c commit 5a93cbd
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class IndexControls extends Component<IndexControlsProps, IndexCo
{
type: "field_value_selection",
field: "data_streams",
name: "Data Streams",
name: "Data streams",
noOptionsMessage: "No data streams found",
multiSelect: "or",
cache: 60000,
Expand All @@ -98,7 +98,7 @@ export default class IndexControls extends Component<IndexControlsProps, IndexCo
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSwitch label="Show Data Stream Indices" checked={showDataStreams} onChange={toggleShowDataStreams} />
<EuiSwitch label="Show data stream indices" checked={showDataStreams} onChange={toggleShowDataStreams} />
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ maxWidth: 250 }}>
<EuiRefreshPicker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ exports[`<IndexControls /> spec renders the component 1`] = `
class="euiSwitch__label"
id="some_html_id"
>
Show Data Stream Indices
Show data stream indices
</span>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion public/pages/Indices/containers/Indices/Indices.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe("<Indices /> spec", () => {
expect(queryByText("index_0")).toBeNull();

// @ts-ignore
fireEvent.click(getByTestId("tableHeaderCell_docs.count_7").firstChild);
fireEvent.click(getByTestId("tableHeaderCell_docs.count_6").firstChild);

// should load indices 0-19 after clicking sort (defaults to asc) on docs.count
await waitFor(() => getByText("index_0"));
Expand Down
2 changes: 1 addition & 1 deletion public/pages/Indices/containers/Indices/Indices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default class Indices extends Component<IndicesProps, IndicesState> {
this.context.notifications.toasts.addDanger(getErrorMessage(err, "There was a problem loading the indices"));
}

// Avoiding flicker by showing/hiding the "Data Stream" column only after the results are loaded.
// Avoiding flicker by showing/hiding the "Data stream" column only after the results are loaded.
const { showDataStreams } = this.state;
this.setState({ loadingIndices: false, isDataStreamColumnVisible: showDataStreams });
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,44 +99,6 @@ exports[`<Indices /> spec renders the component 1`] = `
</div>
</div>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero euiSearchBar__filtersHolder"
>
<div
class="euiFilterGroup"
>
<div
class="euiPopover euiPopover--anchorDownCenter"
id="field_value_selection_0"
>
<div
class="euiPopover__anchor"
>
<button
class="euiButtonEmpty euiButtonEmpty--text euiFilterButton euiFilterButton--hasIcon"
type="button"
>
<span
class="euiButtonContent euiButtonContent--iconRight euiButtonEmpty__content"
>
EuiIconMock
<span
class="euiButtonEmpty__text"
>
<span
class="euiFilterButton__textShift"
data-text="Data Streams"
title="Data Streams"
>
Data Streams
</span>
</span>
</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div
Expand All @@ -146,7 +108,7 @@ exports[`<Indices /> spec renders the component 1`] = `
class="euiSwitch"
>
<button
aria-checked="true"
aria-checked="false"
aria-labelledby="some_html_id"
class="euiSwitch__button"
id="some_html_id"
Expand All @@ -171,7 +133,7 @@ exports[`<Indices /> spec renders the component 1`] = `
class="euiSwitch__label"
id="some_html_id"
>
Show Data Stream Indices
Show data stream indices
</span>
</div>
</div>
Expand Down Expand Up @@ -398,40 +360,9 @@ exports[`<Indices /> spec renders the component 1`] = `
</span>
</button>
</th>
<th
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_data_stream_2"
role="columnheader"
scope="col"
style="width: 120px;"
>
<button
class="euiTableHeaderButton"
data-test-subj="tableHeaderSortButton"
type="button"
>
<span
class="euiTableCellContent euiTableCellContent--alignRight"
>
<span
class="euiTableCellContent__text"
title="Data Stream"
>
Data Stream
</span>
<span
class="euiScreenReaderOnly"
>
Click to sort in ascending order
</span>
</span>
</button>
</th>
<th
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_managed_3"
data-test-subj="tableHeaderCell_managed_2"
role="columnheader"
scope="col"
style="width: 140px;"
Expand All @@ -451,7 +382,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_status_4"
data-test-subj="tableHeaderCell_status_3"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -481,7 +412,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_store.size_5"
data-test-subj="tableHeaderCell_store.size_4"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -511,7 +442,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_pri.store.size_6"
data-test-subj="tableHeaderCell_pri.store.size_5"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -541,7 +472,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_docs.count_7"
data-test-subj="tableHeaderCell_docs.count_6"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -571,7 +502,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_docs.deleted_8"
data-test-subj="tableHeaderCell_docs.deleted_7"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -601,7 +532,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_pri_9"
data-test-subj="tableHeaderCell_pri_8"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -631,7 +562,7 @@ exports[`<Indices /> spec renders the component 1`] = `
aria-live="polite"
aria-sort="none"
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_rep_10"
data-test-subj="tableHeaderCell_rep_9"
role="columnheader"
scope="col"
>
Expand Down Expand Up @@ -665,7 +596,7 @@ exports[`<Indices /> spec renders the component 1`] = `
>
<td
class="euiTableRowCell euiTableRowCell--isMobileFullWidth"
colspan="12"
colspan="11"
>
<div
class="euiTableCellContent euiTableCellContent--alignCenter"
Expand Down
4 changes: 2 additions & 2 deletions public/pages/Indices/utils/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const DEFAULT_QUERY_PARAMS = {
search: "",
sortField: "name",
sortDirection: SortDirection.DESC,
showDataStreams: true,
showDataStreams: false,
};

const HEALTH_TO_COLOR: {
Expand Down Expand Up @@ -87,7 +87,7 @@ const INDICES_COLUMNS: EuiTableFieldDataColumnType<ManagedCatIndex>[] = [
},
{
field: "data_stream",
name: "Data Stream",
name: "Data stream",
sortable: true,
truncateText: true,
textOnly: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class ManagedIndexControls extends Component<ManagedIndexControls
{
type: "field_value_selection",
field: "data_streams",
name: "Data Streams",
name: "Data streams",
noOptionsMessage: "No data streams found",
multiSelect: false,
cache: 60000,
Expand All @@ -93,7 +93,7 @@ export default class ManagedIndexControls extends Component<ManagedIndexControls
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSwitch label="Show Data Stream Indices" checked={showDataStreams} onChange={toggleShowDataStreams} />
<EuiSwitch label="Show data stream indices" checked={showDataStreams} onChange={toggleShowDataStreams} />
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ maxWidth: 250 }}>
<EuiRefreshPicker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ exports[`<ManagedIndexControls /> spec renders the component 1`] = `
class="euiSwitch__label"
id="some_html_id"
>
Show Data Stream Indices
Show data stream indices
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class ManagedIndices extends Component<ManagedIndicesProps, Manag
},
{
field: "dataStream",
name: "Data Stream",
name: "Data stream",
sortable: true,
truncateText: true,
textOnly: true,
Expand Down Expand Up @@ -266,7 +266,7 @@ export default class ManagedIndices extends Component<ManagedIndicesProps, Manag
this.context.notifications.toasts.addDanger(getErrorMessage(err, "There was a problem loading the managed indices"));
}

// Avoiding flicker by showing/hiding the "Data Stream" column only after the results are loaded.
// Avoiding flicker by showing/hiding the "Data stream" column only after the results are loaded.
const { showDataStreams } = this.state;
this.setState({ loadingManagedIndices: false, isDataStreamColumnVisible: showDataStreams });
};
Expand Down
Loading

0 comments on commit 5a93cbd

Please sign in to comment.