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

chore(TDP-12538): always show tooltip on faceted badge overlay #4903

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/dirty-geckos-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@talend/react-faceted-search': minor
---

chore(TDP-12538): always show tooltip on faceted badge overlay
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`BadgeDate should render a default badge 1`] = `
class="tc-badge-faceted-overlay theme-tc-badge-faceted-overlay"
>
<button
aria-describedby="42"
aria-label="2011-10-01"
class="btn btn-link"
id="myId-badge-date-action-overlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`BadgeFaceted should render the html output by default 1`] = `
class="tc-badge-faceted-overlay theme-tc-badge-faceted-overlay"
>
<button
aria-describedby="42"
aria-label="All"
class="btn btn-link"
id="my-id-action-overlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`BadgeNumber should mount a default badge 1`] = `
class="tc-badge-faceted-overlay theme-tc-badge-faceted-overlay"
>
<button
aria-describedby="42"
aria-label="All"
class="btn btn-link"
id="myId-badge-number-action-overlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,11 @@ const BadgeOverlay = ({
</Button>
);

const buttonToRender = iconName ? (
<TooltipTrigger label={label} tooltipPlacement="top">
{button}
</TooltipTrigger>
) : (
button
);

return (
<div className={className}>
{buttonToRender}
<TooltipTrigger label={label} tooltipPlacement="top">
{button}
</TooltipTrigger>

<Overlay
id={`${id}-overlay`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`BadgeOverlay should render the html output in the default state 1`] = `
<div>
<button
aria-describedby="42"
aria-label="my label"
class="btn btn-link"
id="my-id-action-overlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`BadgeSlider should mount a default badge 1`] = `
class="tc-badge-faceted-overlay theme-tc-badge-faceted-overlay"
>
<button
aria-describedby="42"
aria-label="0"
class="btn btn-link"
id="myId-badge-slider-action-overlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports[`BadgeText should mount a default badge 1`] = `
class="tc-badge-faceted-overlay theme-tc-badge-faceted-overlay"
>
<button
aria-describedby="42"
aria-label="All"
class="btn btn-link"
id="myId-badge-text-action-overlay"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ exports[`BasicSearch should render the default html output with no badges 1`] =
class="tc-badge-faceted-overlay theme-tc-badge-faceted-overlay"
>
<button
aria-describedby="42"
aria-label="hello"
class="btn btn-link"
id="name-7bc9bd07-3b46-4b8c-a406-a08b6263de5b-badge-text-action-overlay"
Expand Down
Loading