Skip to content

Conversation

@kube
Copy link
Collaborator

@kube kube commented Dec 20, 2025

🌟 What is the purpose of this PR?

🔗 Related links

  • ...

🚫 Blocked by

  • ...

🔍 What does this change?

  • ...

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing
  • modifies an npm-publishable library and I have added a changeset file(s)
  • modifies a Cargo-publishable library and I have amended the version
  • modifies a Cargo-publishable library, but it is not yet ready to publish
  • modifies a block that will need publishing via GitHub action once merged
  • I am unsure / need advice

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change
  • are in a state where docs changes are not yet required but will be
  • require changes to docs which are made as part of this PR
  • require changes to docs which are not made in this PR
    • Provide more detail here
  • I am unsure / need advice

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph
  • affected the execution graph, and the turbo.json's have been updated to reflect this
  • I am unsure / need advice

⚠️ Known issues

🐾 Next steps

🛡 What tests cover this?

❓ How to test this?

  1. Checkout the branch / view the deployment
  2. Try X
  3. Confirm that Y

📹 Demo

@github-actions github-actions bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels Dec 20, 2025
Copy link
Collaborator Author

kube commented Dec 20, 2025

@kube kube changed the title Extract styles from all component files in Petrinaut H-5768: Extract styles from all component files in Petrinaut Dec 20, 2025
@kube kube marked this pull request as ready for review December 20, 2025 03:04
@cursor
Copy link

cursor bot commented Dec 20, 2025

PR Summary

Standardizes styling by migrating inline styles to css/cva utilities across the editor.

  • Refactors LeftSideBar sections, BottomPanel, and numerous PropertiesPanel components (place, transition, type, differential-equation, color-select, initial-state-editor, sortable-arc-item) to use class-based styles and variants
  • Updates core canvas components (SDCPNView, TransitionNode, Arc) and layout (EditorView) to class-based styling; preserves behavior
  • Converts shared UI elements (Menu, SegmentGroup, Tooltip) to extracted styles; minor tweaks (e.g., submenu arrow class, hover/focus states, z-index)
  • Adds small style helpers/variants (cva) for selected/disabled states; centralizes paddings, borders, and shadows
  • No business logic changes; visual consistency and maintainability improved

Written by Cursor Bugbot for commit 5e05299. This will update automatically on new commits. Configure here.

padding: "[5px 8px]",
border: "[1px solid rgba(0, 0, 0, 0.15)]",
borderRadius: "[3px]",
flex: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

There appears to be a numeric value that needs to be converted to a string with brackets to satisfy the ConditionalValue type requirement. Any numeric values in this style definition should be wrapped in brackets like '[value]'.

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

fontWeight: "medium",
color: "core.gray.80",
"&:hover": {
_hover: {
Copy link

Choose a reason for hiding this comment

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

Missing background property on entity toggle button

The entityButtonStyle is missing a background property. The old inline style included background: "none" which was lost during the refactoring. Without this, the button will render with the browser's default button background styling instead of being transparent, causing a visual regression in the diagnostics panel's collapsible entity headers.

Fix in Cursor Fix in Web

defaultVariants: {
selection: "none",
},
});
Copy link

Choose a reason for hiding this comment

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

Hover effect overrides selection glow on transition nodes

The transitionBoxStyle CVA has a _hover rule with boxShadow in the base and selection-specific boxShadow values in the variants. Previously, the selection boxShadow was applied via inline style prop which had higher specificity than CSS :hover rules. Now both are CSS classes, so hovering over a selected transition node causes the selection glow (blue for resource selection, orange for ReactFlow selection) to be temporarily replaced by the weaker generic hover glow, reducing the visual indication that the node is selected.

Fix in Cursor Fix in Web

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

Labels

area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants