Skip to content

Commit

Permalink
Remove shift caused by the Exclude filter button (#2265)
Browse files Browse the repository at this point in the history
Previously, the Exclude button was removed from the the element tree
entirely until the group is hovered. Only when the group is hovered, the
button element was being switched to a proper display form. This has
caused the layout shift which was very visible when quickly moving
cursor over the filter options.

This commit makes it so that the Exclude button is always in its proper
display form (flex), however is transparent until the group is hovered.
The repeated transparency classes were removed from the icon as well to
prevent jarringly-looking double transition.
  • Loading branch information
brawaru authored Aug 23, 2024
1 parent 599f23c commit e099091
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/frontend/src/pages/search/[searchProjectType].vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,10 @@
!negativeFilterSelected(category)
"
v-tooltip="negativeFilterSelected(category) ? 'Include' : 'Exclude'"
class="hidden items-center justify-center gap-2 rounded-xl bg-transparent px-2 py-1 text-sm font-semibold text-secondary transition-all hover:bg-button-bg hover:text-red active:scale-[0.96] group-hover:flex"
class="flex items-center justify-center gap-2 rounded-xl bg-transparent px-2 py-1 text-sm font-semibold text-secondary opacity-0 transition-all hover:bg-button-bg hover:text-red active:scale-[0.96] group-hover:opacity-100"
@click="toggleNegativeFilter(category)"
>
<BanIcon
class="h-4 w-4 opacity-0 transition-opacity group-hover:opacity-100"
aria-hidden="true"
/>
<BanIcon class="h-4 w-4" aria-hidden="true" />
</button>
</div>
</div>
Expand Down

0 comments on commit e099091

Please sign in to comment.