Skip to content

Commit

Permalink
cleaned out unused files + fixed tooltip breakage due to quick toggle…
Browse files Browse the repository at this point in the history
… + added intent delay
  • Loading branch information
yyassi-heartex committed Mar 7, 2025
1 parent b06aaa8 commit 93aa9f4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 112 deletions.
36 changes: 0 additions & 36 deletions web/apps/labelstudio/src/utils/transition.js

This file was deleted.

2 changes: 2 additions & 0 deletions web/libs/core/src/lib/utils/transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ export const aroundTransition = (

element.removeEventListener("transitionstart", onTransitionStarted);
element.removeEventListener("transitionend", onTransitionEnded);
element.removeEventListener("transitioncancel", onTransitionEnded);
resolve();
};

if (element) {
element.addEventListener("transitionstart", onTransitionStarted);
element.addEventListener("transitionend", onTransitionEnded);
element.addEventListener("transitioncancel", onTransitionEnded);
}

await beforeTransition?.(element);
Expand Down
36 changes: 0 additions & 36 deletions web/libs/datamanager/src/utils/transition.js

This file was deleted.

4 changes: 3 additions & 1 deletion web/libs/editor/src/components/TopBar/TopBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export const TopBar = observer(({ store }) => {
</Tooltip>
)}
{store.hasInterface("annotations:add-new") && (
<Tooltip alignment="top-left" title="Create a new annotation">
<Tooltip alignment="top-left" title="Create a new annotation"
style={{ "--offset-x": "11px" }}
>
<Button
icon={<LsPlus />}
className={"topbar__button"}
Expand Down
39 changes: 0 additions & 39 deletions web/libs/editor/src/utils/transition.ts

This file was deleted.

2 changes: 2 additions & 0 deletions web/libs/ui/src/lib/Tooltip/Tooltip.module.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.tooltip {
--transition-delay: 150ms;
--animation-duration: 100ms;
--animation-curve: cubic-bezier(0.21, 1.04, 0.68, 1);
--animation-start: -10px;
Expand Down Expand Up @@ -32,6 +33,7 @@

&.before-appear,
&.before-disappear {
transition-delay: var(--transition-delay);
transition-property: opacity, transform;
transition-duration: var(--animation-duration);
transition-timing-function: var(--animation-curve);
Expand Down

0 comments on commit 93aa9f4

Please sign in to comment.