Styling issue in Quarkus Flow - #442
kumaradityaraj wants to merge 5 commits into
Conversation
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
✅ Deploy Preview for openworkflow-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
🟡 Changes recommended
Address the CSS isolation issue and strengthen the download regression test.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR fixes embedded Quarkus Flow styling and Mermaid download behavior.
Changes:
- Corrects toast positioning and embedded CSS behavior.
- Fixes Export button border rendering.
- Prevents download actions from closing the modal.
- Updates download tests.
File summaries
| File | Review |
|---|---|
packages/open-workflow-diagram-editor/tests/lib/download.test.ts |
Moderate finding (1 vote): strengthen the regression test to verify no temporary anchor is appended. |
packages/open-workflow-diagram-editor/src/styles.css |
Moderate finding (3 votes): scope the universal border-style rule to .dec-root. |
packages/open-workflow-diagram-editor/src/lib/download.ts |
Removes temporary DOM insertion during downloads. |
Review details
Suppressed comments (1)
packages/open-workflow-diagram-editor/tests/lib/download.test.ts:44
- The updated test verifies the detached anchor's attributes, but it no longer guards the behavior this PR is fixing: an implementation could append/remove the anchor again and all current assertions would still pass, allowing the modal-closing regression to return. Spy on
document.body.appendChildbefore callingdownloadFileand assert that it is not called (or add an equivalent integration regression test).
expect(mockElement.href).toBe("blob:mock-url");
expect(mockElement.download).toBe("test.mmd");
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Two unresolved moderate CSS issues must be addressed before approval.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
packages/open-workflow-diagram-editor/src/styles.css:21
- This package is explicitly embedded, and
src/styles.css:48-53requires global selectors to stay under.dec-root, but importing Sonner's raw stylesheet here leaves its global[data-sonner-*]rules active for every Sonner instance in the host document. If the host also uses Sonner, the editor can restyle or reposition the host's toasts; bundle a.dec-root-scoped copy (or otherwise scope the dependency rules) instead of exporting the raw stylesheet.
packages/open-workflow-diagram-editor/src/styles.css:21
- Moving the Tailwind import ahead of this layer-order declaration changes the cascade order. Tailwind v4 creates its
theme, base, components, utilitieslayers while processing@import 'tailwindcss'; these custom layers are then first introduced afterutilities, soside-panel,react-flow-overrides, and the other custom layers now outrank everydec:*utility. The existing layer-order list was declared before the imports specifically to keep utilities at the intended end, so this can change existing styling when a utility and a component rule target the same element. Preserve the intended order by declaring the custom layers before the Tailwind import or explicitly including/reordering Tailwind's layers.
@import 'tailwindcss' prefix(dec);
@import './components/ui/shadcn.css';
@import 'sonner/dist/styles.css';
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fix the invalid CSS layer statement and independent export feedback timers before approval.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Unresolved moderate findings cover overlapping download timers, missing user-visible export failures, and incomplete timer/failure tests.
Review effort: Lite
Findings: None
Resolved since last review (1)
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
| "sidebar.exportMermaid.copy": "Copy Mermaid Code", | ||
| "sidebar.exportMermaid.download": "Download as Mermaid File", | ||
| "sidebar.exportMermaid.copied": "Copied!", | ||
| "sidebar.export.downloaded": "Downloaded", |
There was a problem hiding this comment.
It doesnt need to say downloaded, I think just flashing downloading is fine - its obvious when its downloaded
| @@ -15,15 +15,28 @@ | |||
| */ | |||
|
|
|||
| /* layer order (Priority: lowest -> highest) */ | |||
There was a problem hiding this comment.
The ordering in this file was deliberate before so not sue why it changed?
I would revert it and add your new block after import but it should be
/* layer order (Priority: lowest -> highest) */
@layer base,
side-panel,
react-flow-overrides,
custom-nodes,
custom-edge-labels;
@import 'tailwindcss' prefix(dec);
@import './components/ui/shadcn.css';
@custom-variant dark (&:where(.dec-root.dark, .dec-root.dark *));
@layer base {
.dec-root,
.dec-root *,
.dec-root::before,
.dec-root::after,
.dec-root::backdrop,
.dec-root *::before,
.dec-root *::after,
.dec-root *::backdrop {
--tw-border-style: solid;
}
}
| custom-edge-labels; | ||
|
|
||
| @custom-variant dark (&:where(.dec-root.dark, .dec-root.dark *)); | ||
|
|
There was a problem hiding this comment.
I also see further down this file there are toast tokens that are no longer used if you can remove please
| import * as sonner from "sonner"; | ||
|
|
||
| describe("WorkflowActions", () => { | ||
| const toastMock = vi.fn(); |
There was a problem hiding this comment.
Can still see references to toasts in tests here, can you have a look and update and remove where applicable
| export function WorkflowActions({ model }: { model: Specification.Workflow }): React.JSX.Element { | ||
| const { t } = useI18n(); | ||
| const [isCopied, setIsCopied] = React.useState(false); | ||
| const [downloadedType, setDownloadedType] = React.useState<"mermaid" | "png" | null>(null); |
There was a problem hiding this comment.
Considering there is no need to show downloaded, it will simplify changes to this file, if you can make those updates to strip out that code

closes #375 and #378
Description
Fixes UI issues when the editor is embedded in the Quarkus Flow Dev UI.
Changes
Screenshots
Screen.Recording.2026-09-22.at.3.22.36.PM.mov