Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enhance UI Consistency and Refactor Color Naming Conventions for Improved UX #4424

Merged
merged 22 commits into from
Nov 6, 2024

Conversation

Cristhianzl
Copy link
Collaborator

This pull request includes several changes to improve the consistency of color naming conventions and enhance the user interface components. The most important changes include updating color variables, refactoring components to use new color names, and adjusting styles for better visual consistency.

Color Naming Consistency:

  • Updated color variables from inner-* to accent-* in src/frontend/src/style/index.css to standardize naming conventions.

Component Refactoring:

  • Refactored HandleTooltipComponent to use new accentColorName and accentForegroundColorName props, and replaced div elements with Badge components for tooltips. [1] [2]
  • Modified HandleRenderComponent to use accent-* color variables and updated the pulse animation styles accordingly. [1] [2] [3] [4] [5]

Style Adjustments:

  • Adjusted border and ring colors in NodeStatus component to use muted-foreground instead of foreground.
  • Updated the class for validation messages to use accent-red-foreground in NodeStatus component.

UI Enhancements:

  • Added scaling effect to NodeToolbarComponent based on zoom level using ReactFlow's store selector. [1] [2] [3] [4] [5]
  • Removed unused imports and components from GenericNode and nodeToolbarComponent files for cleaner code. [1] [2] [3] [4] [5]

…ent-" for better clarity and consistency in naming conventions
…an up the code and improve maintainability

♻️ (GenericNode/index.tsx): Refactor GenericNode component by removing unnecessary code related to BuildStatus and BorderBeam to simplify the component and improve readability
…oregroundColorName variables to accentColorName and accentForegroundColorName for better clarity and consistency

🔧 (handleRenderComponent/index.tsx): update CSS variables to use accent prefix instead of inner for better naming convention and readability
🔧 (handleRenderComponent/index.tsx): pass accentColorName and accentForegroundColorName props to HandleTooltipComponent for improved customization and styling
… to use Badge component for tooltip styling and add support for custom accent colors and foreground colors based on left alignment. Update styles and data-testid attributes accordingly.
… class based on build status, now correctly returns class for BUILDING status
…lbarComponent using ReactFlow's store selector to dynamically adjust scale based on zoom level.
…olbar with flex layout, spacing, border, background color, padding, and shadow for better visual appearance
@Cristhianzl Cristhianzl self-assigned this Nov 6, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request javascript Pull requests that update Javascript code labels Nov 6, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Nov 6, 2024
Copy link
Collaborator

@mfortman11 mfortman11 left a comment

Choose a reason for hiding this comment

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

LGMT just small style suggestions

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 6, 2024
Cristhianzl and others added 5 commits November 6, 2024 14:40
…elected nodes for better visual consistency

🔧 (applies.css): Remove unnecessary border width specification in various CSS classes to simplify styling and improve maintainability
…ed-md' instead of 'rounded-[6px]' for consistency and better readability

📝 (applies.css): Update class name to use 'rounded-xl' instead of 'rounded-[12px]' for consistency and better readability
@Cristhianzl Cristhianzl enabled auto-merge (squash) November 6, 2024 17:44
@Cristhianzl Cristhianzl enabled auto-merge (squash) November 6, 2024 17:45
…r for better clarity and consistency in styling

🔧 (sidebarFilterComponent/index.tsx): Update backgroundColor style to use accent color instead of inner color for better visual consistency
🔧 (nodeToolbarComponent/index.tsx): Add relative positioning to the buttons in the NodeToolbarComponent for better alignment on the page
…Tooltip component to apply custom styling for positioning

♻️ (applies.css): Refactor CSS classes to use shorthand notation for height and width properties, and update class names for better readability and maintainability
@Cristhianzl Cristhianzl enabled auto-merge (squash) November 6, 2024 18:29
@Cristhianzl Cristhianzl merged commit 9394fe1 into main Nov 6, 2024
27 of 28 checks passed
@Cristhianzl Cristhianzl deleted the cz/sweeps branch November 6, 2024 19:42
joaoguilhermeS pushed a commit that referenced this pull request Nov 7, 2024
…r Improved UX (#4424)

* 📝 (tailwind.config.mjs): refactor color classes from "inner-" to "accent-" for better clarity and consistency in naming conventions

* 🔧 (GenericNode/index.tsx): Remove unused imports and constants to clean up the code and improve maintainability
♻️ (GenericNode/index.tsx): Refactor GenericNode component by removing unnecessary code related to BuildStatus and BorderBeam to simplify the component and improve readability

* 🔧 (handleRenderComponent/index.tsx): rename innerColorName and innerForegroundColorName variables to accentColorName and accentForegroundColorName for better clarity and consistency
🔧 (handleRenderComponent/index.tsx): update CSS variables to use accent prefix instead of inner for better naming convention and readability
🔧 (handleRenderComponent/index.tsx): pass accentColorName and accentForegroundColorName props to HandleTooltipComponent for improved customization and styling

* 📝 (HandleTooltipComponent/index.tsx): Refactor HandleTooltipComponent to use Badge component for tooltip styling and add support for custom accent colors and foreground colors based on left alignment. Update styles and data-testid attributes accordingly.

* 📝 (NodeStatus/index.tsx): update border and text color classes for better visual consistency and clarity

* 🐛 (get-class-from-build-status.ts): fix incorrect condition to return class based on build status, now correctly returns class for BUILDING status

* ✨ (nodeToolbarComponent/index.tsx): Add zoom functionality to NodeToolbarComponent using ReactFlow's store selector to dynamically adjust scale based on zoom level.

* 📝 (applies.css): add a new CSS class .toolbar-wrapper to style the toolbar with flex layout, spacing, border, background color, padding, and shadow for better visual appearance

* 📝 (index.css): Update accent color variables to improve consistency and readability in the stylesheet.

* [autofix.ci] apply automated fixes

* Update src/frontend/src/style/applies.css

Co-authored-by: Mike Fortman <[email protected]>

* Update src/frontend/src/CustomNodes/GenericNode/components/HandleTooltipComponent/index.tsx

Co-authored-by: Mike Fortman <[email protected]>

* ✨ (NodeStatus/index.tsx): Improve border styling for selected and unselected nodes for better visual consistency
🔧 (applies.css): Remove unnecessary border width specification in various CSS classes to simplify styling and improve maintainability

* 🔧 (PageComponent/index.tsx): Update innerColor variable to accentColor for better clarity and consistency in styling
🔧 (sidebarFilterComponent/index.tsx): Update backgroundColor style to use accent color instead of inner color for better visual consistency
🔧 (nodeToolbarComponent/index.tsx): Add relative positioning to the buttons in the NodeToolbarComponent for better alignment on the page

* ✨ (nodeToolbarComponent/index.tsx): Add styleClasses property to ShadTooltip component to apply custom styling for positioning
♻️ (applies.css): Refactor CSS classes to use shorthand notation for height and width properties, and update class names for better readability and maintainability

* 🔧 (nodeToolbarComponent/index.tsx): update button height class to improve consistency and readability

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Mike Fortman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants