Skip to content

Refactor components and code base in general#17

Merged
reenatoteixeira merged 8 commits intostagefrom
refactor/minor-fixes
Mar 30, 2026
Merged

Refactor components and code base in general#17
reenatoteixeira merged 8 commits intostagefrom
refactor/minor-fixes

Conversation

@reenatoteixeira
Copy link
Copy Markdown
Member

This pull request refactors and improves the dashboard module, focusing on component modularization, type safety, and consistent styling. Key changes include extracting types and props for better maintainability, updating component exports/imports, improving style consistency, and enhancing the dashboard's data flow and UI structure.

Dashboard Component Refactoring and Modularization:

  • Removed the DashboardHeader component and inlined its content directly into DashboardPage, simplifying the header structure. [1] [2]
  • Renamed and restructured files for clarity: moved StatsSkeleton and RecentOrders components into dedicated folders and updated their exports. [1] [2] [3]

Type Safety and Data Flow Improvements:

  • Extracted and centralized Order, OrderStatus, and RecentOrdersProps types into a separate types file, ensuring consistent usage across components. [1] [2] [3]
  • Updated the RecentOrders component to receive orders as a prop instead of using hardcoded data, allowing dynamic rendering based on parent state. [1] [2] [3]

Chart Component Enhancement:

  • Refactored the chart component: moved and renamed OrdersChart to a generic Chart component, extracted its props and types, and made it accept dynamic data, title, and description. Improved color theming based on user preference. [1] [2] [3] [4] [5]

Styling and UI Consistency:

  • Updated button, card, and input field styles for improved color consistency, accessibility, and theme support. This includes changes to hover states, status colors, and placeholder text. [1] [2] [3] [4] [5] [6] [7]
  • Improved capitalization and text consistency in UI labels and helper texts. [1] [2]

Cleanup and Removal of Unused Code:

  • Removed the unused RecentOrdersSkeleton component and cleaned up related imports.

These changes collectively improve code maintainability, type safety, and user interface consistency across the dashboard module.

@reenatoteixeira reenatoteixeira self-assigned this Mar 30, 2026
@reenatoteixeira reenatoteixeira added the enhancement New feature or request label Mar 30, 2026
@reenatoteixeira reenatoteixeira changed the title Refactor/minor fixes Refactor components and code base in general Mar 30, 2026
@reenatoteixeira reenatoteixeira merged commit b99d812 into stage Mar 30, 2026
2 checks passed
@reenatoteixeira reenatoteixeira deleted the refactor/minor-fixes branch March 30, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant