Skip to content

Styling issue in Quarkus Flow - #442

Open
kumaradityaraj wants to merge 5 commits into
open-workflow-specification:mainfrom
kumaradityaraj:toastNotification
Open

kumaradityaraj wants to merge 5 commits into
open-workflow-specification:mainfrom
kumaradityaraj:toastNotification

Conversation

@kumaradityaraj

@kumaradityaraj kumaradityaraj commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

closes #375 and #378

Description

Fixes UI issues when the editor is embedded in the Quarkus Flow Dev UI.

Changes

  • Removed toast component and where it is used and updated the test cases.
  • When downloading file or PNG, the button itself changes to downloaded for 2 seconds similar to copy button.
  • Fixed missing CSS properties in the Quarkus Flow Dev UI, including the Export button border not being rendered correctly.
  • Fixed the modal closing unexpectedly when clicking Download as Mermaid.

Screenshots

Screen.Recording.2026-09-22.at.3.22.36.PM.mov

Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Copilot AI lite review requested due to automatic review settings September 18, 2026 11:15
@netlify

netlify Bot commented Sep 18, 2026

Copy link
Copy Markdown

Deploy Preview for openworkflow-editor ready!

Name Link
🔨 Latest commit e2d378d
🔍 Latest deploy log https://app.netlify.com/projects/openworkflow-editor/deploys/6ab252ec97f71400087ea8cb
😎 Deploy Preview https://deploy-preview-442--openworkflow-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.appendChild before calling downloadFile and 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.

Comment thread packages/open-workflow-diagram-editor/src/styles.css
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings September 18, 2026 11:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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-53 requires 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, utilities layers while processing @import 'tailwindcss'; these custom layers are then first introduced after utilities, so side-panel, react-flow-overrides, and the other custom layers now outrank every dec:* 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

Comment thread packages/open-workflow-diagram-editor/src/styles.css Outdated
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings September 22, 2026 09:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity

Open (1)
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread packages/open-workflow-diagram-editor/src/styles.css Outdated
Signed-off-by: Kumar Aditya Raj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings September 22, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 *));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: styling issue in Quarkus Flow

3 participants