Skip to content

Commit

Permalink
chore(TDP-12538): always show tooltip on faceted badge overlay (#4903)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmoreno authored Sep 25, 2023
1 parent 3fc8e01 commit 08b8257
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
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

0 comments on commit 08b8257

Please sign in to comment.