Summary
Move all inline styles from the functional apps/email/view/MainView.mjs component into its dedicated stylesheet at resources/scss/src/apps/email/MainView.scss.
Rationale
Separating component structure (defined in JavaScript) from its presentation (defined in SCSS) is a core principle of maintainable web development. This change will:
- Make the
MainView.mjs component code cleaner and more focused on logic and structure.
- Centralize all styling for the component in one place, making it easier to theme and modify.
- Align the new functional component with the framework's established best practices for styling.
Implementation Details
Completed Work
- File Creation: The stylesheet
resources/scss/src/apps/email/MainView.scss has been created.
- Root Element Styling: The styles for the root container (
display: flex, etc.) have been moved into an .email-mainview class within the SCSS file.
- Component Update: The
MainView.mjs component has been updated to use the cls: ['email-mainview'] config to apply these styles.
To-Do
- Refactor Pane Styles: The
paneStyle object, which defines the border, margin, and padding for the three panes, is still defined inline within createVdom().
- Create SCSS Class: Create a new class (e.g.,
.email-mainview-pane) in MainView.scss for these styles.
- Apply Class in VDOM: Update the
createVdom() method in MainView.mjs to apply this new class to the three pane nodes instead of using the inline style object.
Acceptance Criteria
- The
paneStyle object is completely removed from MainView.mjs.
- The styles for the panes are defined in
MainView.scss under a dedicated class.
- The visual appearance of the
MainView component remains identical to the previous implementation.
Summary
Move all inline styles from the functional
apps/email/view/MainView.mjscomponent into its dedicated stylesheet atresources/scss/src/apps/email/MainView.scss.Rationale
Separating component structure (defined in JavaScript) from its presentation (defined in SCSS) is a core principle of maintainable web development. This change will:
MainView.mjscomponent code cleaner and more focused on logic and structure.Implementation Details
Completed Work
resources/scss/src/apps/email/MainView.scsshas been created.display: flex, etc.) have been moved into an.email-mainviewclass within the SCSS file.MainView.mjscomponent has been updated to use thecls: ['email-mainview']config to apply these styles.To-Do
paneStyleobject, which defines theborder,margin, andpaddingfor the three panes, is still defined inline withincreateVdom()..email-mainview-pane) inMainView.scssfor these styles.createVdom()method inMainView.mjsto apply this new class to the three pane nodes instead of using the inlinestyleobject.Acceptance Criteria
paneStyleobject is completely removed fromMainView.mjs.MainView.scssunder a dedicated class.MainViewcomponent remains identical to the previous implementation.