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

[EuiPopover] Remove 2nd unnecessary anchor div wrapper #7311

Merged
merged 10 commits into from
Oct 30, 2023
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
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
Loading