Skip to content

Commit af0041e

Browse files
committed
fix(ui): remove HUD overlay animations for instant show/hide
1 parent 7c3c5dd commit af0041e

2 files changed

Lines changed: 7 additions & 28 deletions

File tree

src/styles/brackets.less

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,7 +3414,7 @@ label input {
34143414
position: fixed;
34153415
top: 50%;
34163416
left: 50%;
3417-
transform: translate(-50%, -50%) scale(0.9);
3417+
transform: translate(-50%, -50%);
34183418
display: flex;
34193419
flex-direction: column;
34203420
align-items: center;
@@ -3425,8 +3425,6 @@ label input {
34253425
background: rgba(30, 30, 30, 0.85);
34263426
color: #e0e0e0;
34273427
z-index: 10000;
3428-
opacity: 0;
3429-
transition: opacity 0.2s ease, transform 0.2s ease;
34303428
pointer-events: none;
34313429
user-select: none;
34323430
i {
@@ -3439,10 +3437,6 @@ label input {
34393437
letter-spacing: 0.5px;
34403438
}
34413439
}
3442-
.hud-overlay.visible {
3443-
opacity: 1;
3444-
transform: translate(-50%, -50%) scale(1);
3445-
}
34463440

34473441
.inline-toast kbd {
34483442
display: inline-block;

src/widgets/NotificationUI.js

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -517,29 +517,14 @@ define(function (require, exports, module) {
517517
const notification = new Notification($hud, "hud");
518518
_activeHUD = notification;
519519

520-
// Fade in on next frame
521-
requestAnimationFrame(function () {
522-
$hud.addClass("visible");
523-
});
524-
525-
function closeHUD(reason) {
526-
if (!notification.$notification) {
527-
return;
520+
notification.close = function (closeType) {
521+
if (!this.$notification) {
522+
return this;
528523
}
529-
notification.$notification = null;
524+
this.$notification = null;
530525
_activeHUD = null;
531-
$hud.removeClass("visible");
532-
function cleanup() {
533-
$hud.remove();
534-
notification._result.resolve(reason);
535-
}
536-
$hud.one("transitionend transitioncancel", cleanup);
537-
// Safety fallback
538-
setTimeout(cleanup, 600);
539-
}
540-
541-
notification.close = function (closeType) {
542-
closeHUD(closeType || CLOSE_REASON.CLICK_DISMISS);
526+
$hud.remove();
527+
this._result.resolve(closeType || CLOSE_REASON.CLICK_DISMISS);
543528
return this;
544529
};
545530

0 commit comments

Comments
 (0)