Skip to content

Commit 72883e7

Browse files
authored
[WEB-5773] fix: editor image full screen modal (#8413)
1 parent 57bbf3c commit 72883e7

File tree

5 files changed

+21
-17
lines changed

5 files changed

+21
-17
lines changed

apps/web/core/components/workspace/confirm-workspace-member-remove.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { useState } from "react"; import { observer } from "mobx-react";
1+
import { useState } from "react";
2+
import { observer } from "mobx-react";
23
import { AlertTriangle } from "lucide-react";
34
// ui
45
import { useTranslation } from "@plane/i18n";

packages/editor/src/core/extensions/custom-image/components/toolbar/alignment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function ImageAlignmentAction(props: Props) {
3434
<Tooltip disabled={isTouchDevice} tooltipContent="Align">
3535
<button
3636
type="button"
37-
className="h-full flex items-center gap-1 text-on-color/60 hover:text-on-color transition-colors"
37+
className="h-full flex items-center gap-1 text-alpha-white-800 hover:text-alpha-white-1200 transition-colors"
3838
onClick={() => setIsDropdownOpen((prev) => !prev)}
3939
>
4040
{activeAlignmentDetails && <activeAlignmentDetails.icon className="flex-shrink-0 size-3" />}
@@ -47,7 +47,7 @@ export function ImageAlignmentAction(props: Props) {
4747
<Tooltip disabled={isTouchDevice} key={option.value} tooltipContent={option.label}>
4848
<button
4949
type="button"
50-
className="flex-shrink-0 h-full grid place-items-center text-on-color/60 hover:text-on-color transition-colors"
50+
className="flex-shrink-0 h-full grid place-items-center text-alpha-white-800 hover:text-alpha-white-1200 transition-colors"
5151
onClick={() => {
5252
handleChange(option.value);
5353
setIsDropdownOpen(false);

packages/editor/src/core/extensions/custom-image/components/toolbar/download.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function ImageDownloadAction(props: Props) {
1414
<button
1515
type="button"
1616
onClick={() => window.open(src, "_blank")}
17-
className="flex-shrink-0 h-full grid place-items-center text-on-color/60 hover:text-on-color transition-colors"
17+
className="flex-shrink-0 h-full grid place-items-center text-alpha-white-800 hover:text-alpha-white-1200 transition-colors"
1818
aria-label="Download image"
1919
>
2020
<Download className="size-3" />

packages/editor/src/core/extensions/custom-image/components/toolbar/full-screen/modal.tsx

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,14 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
193193

194194
return (
195195
<div
196-
className={cn("fixed inset-0 size-full z-50 bg-black/90 opacity-0 pointer-events-none transition-opacity", {
197-
"opacity-100 pointer-events-auto editor-image-full-screen-modal": isFullScreenEnabled,
198-
"cursor-default": !isDragging,
199-
"cursor-grabbing": isDragging,
200-
})}
196+
className={cn(
197+
"fixed inset-0 size-full z-50 bg-alpha-black-1100 opacity-0 pointer-events-none transition-opacity",
198+
{
199+
"opacity-100 pointer-events-auto editor-image-full-screen-modal": isFullScreenEnabled,
200+
"cursor-default": !isDragging,
201+
"cursor-grabbing": isDragging,
202+
}
203+
)}
201204
role="dialog"
202205
aria-modal="true"
203206
aria-label="Fullscreen image viewer"
@@ -213,7 +216,7 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
213216
className="absolute top-10 right-10 size-8 grid place-items-center"
214217
aria-label="Close image viewer"
215218
>
216-
<CloseIcon className="size-8 text-on-color/60 hover:text-on-color transition-colors" />
219+
<CloseIcon className="size-8 text-alpha-white-800 hover:text-alpha-white-1200 transition-colors" />
217220
</button>
218221
<img
219222
ref={setImageRef}
@@ -231,7 +234,7 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
231234
}}
232235
onMouseDown={handleMouseDown}
233236
/>
234-
<div className="fixed bottom-10 left-1/2 -translate-x-1/2 flex items-center justify-center gap-1 rounded-md border border-white/20 py-2 divide-x divide-white/20 bg-black">
237+
<div className="fixed bottom-10 left-1/2 -translate-x-1/2 flex items-center justify-center gap-1 rounded-md border border-subtle-1 py-2 divide-x divide-subtle-1 bg-black">
235238
<div className="flex items-center">
236239
<button
237240
type="button"
@@ -242,13 +245,13 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
242245
}
243246
handleMagnification("decrease");
244247
}}
245-
className="size-6 grid place-items-center text-on-color/60 hover:text-on-color disabled:text-on-color/30 transition-colors duration-200"
248+
className="size-6 grid place-items-center text-alpha-white-800 hover:text-alpha-white-1200 disabled:text-alpha-white-500 transition-colors duration-200"
246249
disabled={magnification <= MIN_ZOOM}
247250
aria-label="Zoom out"
248251
>
249252
<Minus className="size-4" />
250253
</button>
251-
<span className="text-13 w-12 text-center text-on-color">{Math.round(100 * magnification)}%</span>
254+
<span className="text-13 w-12 text-center text-alpha-white-1200">{Math.round(100 * magnification)}%</span>
252255
<button
253256
type="button"
254257
onClick={(e) => {
@@ -258,7 +261,7 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
258261
}
259262
handleMagnification("increase");
260263
}}
261-
className="size-6 grid place-items-center text-on-color/60 hover:text-on-color disabled:text-on-color/30 transition-colors duration-200"
264+
className="size-6 grid place-items-center text-alpha-white-800 hover:text-alpha-white-1200 disabled:text-alpha-white-500 transition-colors duration-200"
262265
disabled={magnification >= MAX_ZOOM}
263266
aria-label="Zoom in"
264267
>
@@ -269,7 +272,7 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
269272
<button
270273
type="button"
271274
onClick={() => window.open(downloadSrc, "_blank")}
272-
className="flex-shrink-0 size-8 grid place-items-center text-on-color/60 hover:text-on-color transition-colors duration-200"
275+
className="flex-shrink-0 size-8 grid place-items-center text-alpha-white-800 hover:text-alpha-white-1200 transition-colors duration-200"
273276
aria-label="Download image"
274277
>
275278
<Download className="size-4" />
@@ -279,7 +282,7 @@ function ImageFullScreenModalWithoutPortal(props: Props) {
279282
<button
280283
type="button"
281284
onClick={() => window.open(src, "_blank")}
282-
className="flex-shrink-0 size-8 grid place-items-center text-on-color/60 hover:text-on-color transition-colors duration-200"
285+
className="flex-shrink-0 size-8 grid place-items-center text-alpha-white-800 hover:text-alpha-white-1200 transition-colors duration-200"
283286
aria-label="Open image in new tab"
284287
>
285288
<ExternalLink className="size-4" />

packages/editor/src/core/extensions/custom-image/components/toolbar/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function ImageToolbarRoot(props: Props) {
3131
<>
3232
<div
3333
className={cn(
34-
"absolute top-1 right-1 h-7 z-20 bg-black/80 rounded-sm flex items-center gap-2 px-2 opacity-0 pointer-events-none group-hover/image-component:opacity-100 group-hover/image-component:pointer-events-auto transition-opacity",
34+
"absolute top-1 right-1 h-7 z-20 bg-alpha-black-1000 rounded-sm flex items-center gap-2 px-2 opacity-0 pointer-events-none group-hover/image-component:opacity-100 group-hover/image-component:pointer-events-auto transition-opacity",
3535
{
3636
"opacity-100 pointer-events-auto": shouldShowToolbar,
3737
}

0 commit comments

Comments
 (0)