Skip to content

Commit

Permalink
[EuiPopover] Remove 2nd unnecessary anchor div wrapper (#7311)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Oct 30, 2023
1 parent cfa84f4 commit be84bc7
Show file tree
Hide file tree
Showing 52 changed files with 2,792 additions and 3,415 deletions.
7 changes: 7 additions & 0 deletions src-docs/src/services/playground/knobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,13 @@ const KnobColumn = ({ state, knobNames, error, set, isPlayground }) => {
{humanizedName} <EuiTextColor color="danger">(required)</EuiTextColor>
</>
);
} else if (state[name].description?.includes('@deprecated')) {
humanizedName = (
<>
<s>{humanizedName}</s>{' '}
<EuiTextColor color="subdued">(deprecated)</EuiTextColor>
</>
);
}

/**
Expand Down
70 changes: 31 additions & 39 deletions src/components/basic_table/__snapshots__/basic_table.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -171,30 +171,26 @@ exports[`EuiBasicTable renders (kitchen sink) with pagination, selection, sortin
class="euiTableSortMobile"
>
<div
class="euiPopover emotion-euiPopover"
class="euiPopover emotion-euiPopover-inline-block"
>
<div
class="euiPopover__anchor css-16vtueo-render"
<button
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-xs-empty-primary-flush-right"
type="button"
>
<button
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-xs-empty-primary-flush-right"
type="button"
<span
class="euiButtonEmpty__content emotion-euiButtonDisplayContent"
>
<span
class="euiButtonEmpty__content emotion-euiButtonDisplayContent"
class="eui-textTruncate euiButtonEmpty__text"
>
<span
class="eui-textTruncate euiButtonEmpty__text"
>
Sorting
</span>
<span
color="inherit"
data-euiicon-type="arrowDown"
/>
Sorting
</span>
</button>
</div>
<span
color="inherit"
data-euiicon-type="arrowDown"
/>
</span>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -773,33 +769,29 @@ exports[`EuiBasicTable renders (kitchen sink) with pagination, selection, sortin
class="euiFlexItem emotion-euiFlexItem-growZero"
>
<div
class="euiPopover emotion-euiPopover"
class="euiPopover emotion-euiPopover-inline-block"
>
<div
class="euiPopover__anchor css-16vtueo-render"
<button
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-xs-empty-text"
data-test-subj="tablePaginationPopoverButton"
type="button"
>
<button
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-xs-empty-text"
data-test-subj="tablePaginationPopoverButton"
type="button"
<span
class="euiButtonEmpty__content emotion-euiButtonDisplayContent"
>
<span
class="euiButtonEmpty__content emotion-euiButtonDisplayContent"
class="eui-textTruncate euiButtonEmpty__text"
>
<span
class="eui-textTruncate euiButtonEmpty__text"
>
Rows per page
:
3
</span>
<span
color="inherit"
data-euiicon-type="arrowDown"
/>
Rows per page
:
3
</span>
</button>
</div>
<span
color="inherit"
data-euiicon-type="arrowDown"
/>
</span>
</button>
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,26 @@

exports[`CollapsedItemActions render 1`] = `
<div
class="euiPopover emotion-euiPopover"
class="euiPopover emotion-euiPopover-inline-block"
id="id-actions"
>
<div
class="euiPopover__anchor css-16vtueo-render"
<span
class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock"
>
<span
class="euiToolTipAnchor emotion-euiToolTipAnchor-inlineBlock"
<button
aria-label="All actions"
class="euiButtonIcon emotion-euiButtonIcon-xs-empty-text"
data-test-subj="euiCollapsedItemActionsButton"
type="button"
>
<button
aria-label="All actions"
class="euiButtonIcon emotion-euiButtonIcon-xs-empty-text"
data-test-subj="euiCollapsedItemActionsButton"
type="button"
>
<span
aria-hidden="true"
class="euiButtonIcon__icon"
color="inherit"
data-euiicon-type="boxesHorizontal"
/>
</button>
</span>
</div>
<span
aria-hidden="true"
class="euiButtonIcon__icon"
color="inherit"
data-euiicon-type="boxesHorizontal"
/>
</button>
</span>
</div>
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,29 @@ exports[`PaginationBar renders 1`] = `
class="euiFlexItem emotion-euiFlexItem-growZero"
>
<div
class="euiPopover emotion-euiPopover"
class="euiPopover emotion-euiPopover-inline-block"
>
<div
class="euiPopover__anchor css-16vtueo-render"
<button
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-xs-empty-text"
data-test-subj="tablePaginationPopoverButton"
type="button"
>
<button
class="euiButtonEmpty emotion-euiButtonDisplay-euiButtonEmpty-xs-empty-text"
data-test-subj="tablePaginationPopoverButton"
type="button"
<span
class="euiButtonEmpty__content emotion-euiButtonDisplayContent"
>
<span
class="euiButtonEmpty__content emotion-euiButtonDisplayContent"
class="eui-textTruncate euiButtonEmpty__text"
>
<span
class="eui-textTruncate euiButtonEmpty__text"
>
Rows per page
:
5
</span>
<span
color="inherit"
data-euiicon-type="arrowDown"
/>
Rows per page
:
5
</span>
</button>
</div>
<span
color="inherit"
data-euiicon-type="arrowDown"
/>
</span>
</button>
</div>
</div>
<div
Expand Down
30 changes: 13 additions & 17 deletions src/components/breadcrumbs/__snapshots__/breadcrumb.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,23 @@ exports[`EuiBreadcrumbContent renders breadcrumbs with \`popoverContent\` with p
<body>
<div>
<div
class="euiPopover euiPopover-isOpen emotion-euiPopover"
class="euiPopover euiPopover-isOpen emotion-euiPopover-inline-block"
data-test-subj="popover"
>
<div
class="euiPopover__anchor css-16vtueo-render"
<button
class="euiLink euiBreadcrumb__content emotion-euiLink-subdued-euiBreadcrumb__content-page"
data-test-subj="popoverToggle"
title="Toggles a popover - Clicking this button will toggle a popover dialog."
type="button"
>
<button
class="euiLink euiBreadcrumb__content emotion-euiLink-subdued-euiBreadcrumb__content-page"
data-test-subj="popoverToggle"
title="Toggles a popover - Clicking this button will toggle a popover dialog."
type="button"
Toggles a popover
<span
data-euiicon-type="arrowDown"
>
Toggles a popover
<span
data-euiicon-type="arrowDown"
>
- Clicking this button will toggle a popover dialog.
</span>
</button>
</div>
- Clicking this button will toggle a popover dialog.
</span>
</button>
</div>
</div>
<div
Expand Down
Loading

0 comments on commit be84bc7

Please sign in to comment.