digiexpress-io / digiexpress-parent

Apache License 2.0
0 stars 1 forks source link

ActionStyles clean up #164

Closed NadirDulic closed 11 months ago

NadirDulic commented 1 year ago

/ActionStyles

This folder became a sort of catch-all for the ActionStart, ActionOngoing, etc. styles, that we didn't know where to put at the time. Now, we need to clean it up.

  1. If the components exported from ActionStyles/index.ts are used in only one place, they should be moved and declared inside of the component that uses them.
  2. Any components that are used in more than one place should become Plugins.
NadirDulic commented 1 year ago

ActionStyles components

NewMessages is used in StyledUserActionButtons.tsx, nowhere else as far as I can see, there is another one made in ActionHistory>Mobile>HistoryItems, both in the src/core and Plugin context, the same code is written twice.

 
 CardMessageSection is used in CardHeaderContent and in NewMessages.




WorkflowSelect is used in PluginContext>ActionContinue>Mobile>WorkflowSelection.tsx
 WorkflowSelect is used in PluginContext>ActionHistory>Mobile>HistoryItems.tsx
 WorkflowSelect is used in PluginContext>ActionOngoing>Mobile>OngoingItems.tsx

 It is used in the same components inside src/core



StyledBox is used inside StyledWorkflowSelectButton



There is this dbButtonColor that is declared in ActionStyles.tsx.
It is used in the ActionStyles folder in the StyledBox component and in StyledDashboardButton, both in src/core and PluginContext.



This WorkflowSelect is the biggest component and uses these other components inside itself.

olev-mutso commented 11 months ago

Not valid in this format.