Skip to content

Conversation

@kube
Copy link
Collaborator

@kube kube commented Dec 20, 2025

🌟 What is the purpose of this PR?

Modernizes styling by extracting inline styles into css/cva utilities across the editor to improve consistency, reuse, and theming.

  • Converts all components to class-based styles
  • Adds style variants (e.g., isSelected, isDisabled, isReadOnly) and consolidates repeated patterns (spacing, borders, z-index, hover/focus states)
  • Minor UI polish (layout, paddings, shadows); no functional or API changes intended

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

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

The changes in this PR:

  • do not affect the execution graph

🐾 Next steps

  • Continue refactoring by progressively cleaning styles, and find a common way to organize them.
  • Adapt/Migrate UI to match Figma mockups

❓ How to test this?

Use latest Petrinaut deployment

@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

Modernizes styling by extracting inline styles into reusable css/cva classes across the editor.

  • Migrates components (e.g., LeftSideBar, BottomPanel, PropertiesPanel, SegmentGroup, Tooltip, Menu, SDCPN arc) to class-based styles
  • Adds style variants (isSelected, isDisabled, isReadOnly, etc.) and centralizes spacing, borders, shadows, and z-index
  • Minor visual refinements (padding, hover/focus, positioning) while preserving behavior and APIs
  • Includes a changeset for @hashintel/petrinaut (patch)

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

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

@graphite-app graphite-app bot requested a review from a team January 2, 2026 19:01
@kube kube changed the base branch from cf/h-5768-integrate-quick-simulation-in-edit-mode to graphite-base/8205 January 2, 2026 19:57
@kube kube force-pushed the cf/h-5883-extract-styles-from-all-components branch from 0a34775 to 0b9c14c Compare January 2, 2026 20:03
@kube kube changed the base branch from graphite-base/8205 to cf/h-5768-integrate-quick-simulation-in-edit-mode January 2, 2026 20:03
@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Jan 2, 2026
@graphite-app graphite-app bot requested a review from a team January 2, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area) 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