Refactor test cases for improved readability and consistency
- Updated test functions in various test files to enhance code clarity by formatting long lines and improving indentation. - Adjusted assertions to use multi-line formatting for better readability. - Added new test cases for theme settings API to ensure proper functionality. - Ensured consistent use of line breaks and spacing across test files for uniformity.
This commit is contained in:
@@ -28,6 +28,32 @@ Import macros via:
|
||||
- **Tables**: `.table-container` wrappers need overflow handling for narrow viewports; consider `overflow-x: auto` with padding adjustments.
|
||||
- **Feedback/Empty states**: Messages use default font weight and spacing; a utility class for margin/padding would ensure consistent separation from forms or tables.
|
||||
|
||||
## CSS Variable Naming Conventions
|
||||
|
||||
The project adheres to a clear and descriptive naming convention for CSS variables, primarily defined in `static/css/main.css`.
|
||||
|
||||
## Naming Structure
|
||||
|
||||
Variables are prefixed based on their category:
|
||||
|
||||
- `--color-`: For all color-related variables (e.g., `--color-primary`, `--color-background`, `--color-text-primary`).
|
||||
- `--space-`: For spacing and layout-related variables (e.g., `--space-sm`, `--space-md`, `--space-lg`).
|
||||
- `--font-size-`: For font size variables (e.g., `--font-size-base`, `--font-size-lg`).
|
||||
- Other specific prefixes for components or properties (e.g., `--panel-radius`, `--table-radius`).
|
||||
|
||||
## Descriptive Names
|
||||
|
||||
Color names are chosen to be semantically meaningful rather than literal color values, allowing for easier theme changes. For example:
|
||||
|
||||
- `--color-primary`: Represents the main brand color.
|
||||
- `--color-accent`: Represents an accent color used for highlights.
|
||||
- `--color-text-primary`: The main text color.
|
||||
- `--color-text-muted`: A lighter text color for less emphasis.
|
||||
- `--color-surface`: The background color for UI elements like cards or panels.
|
||||
- `--color-background`: The overall page background color.
|
||||
|
||||
This approach ensures that the CSS variables are intuitive, maintainable, and easily adaptable for future theme customizations.
|
||||
|
||||
## Per-page data & actions
|
||||
|
||||
Short reference of per-page APIs and primary actions used by templates and scripts.
|
||||
@@ -76,6 +102,21 @@ Short reference of per-page APIs and primary actions used by templates and scrip
|
||||
- Data: `POST /api/reporting/summary` (accepts arrays of `{ "result": float }` objects)
|
||||
- Actions: Trigger summary refreshes and export/download actions.
|
||||
|
||||
## Navigation Structure
|
||||
|
||||
The application uses a sidebar navigation menu organized into the following top-level categories:
|
||||
|
||||
- **Dashboard**: Main overview page.
|
||||
- **Overview**: Sub-menu for core scenario inputs.
|
||||
- Parameters: Process parameters configuration.
|
||||
- Costs: Capital and operating costs.
|
||||
- Consumption: Resource consumption tracking.
|
||||
- Production: Production output settings.
|
||||
- Equipment: Equipment inventory (with Maintenance sub-item).
|
||||
- **Simulations**: Monte Carlo simulation runs.
|
||||
- **Analytics**: Reporting and analytics.
|
||||
- **Settings**: Administrative settings (with Themes and Currency Management sub-items).
|
||||
|
||||
## UI Template Audit (2025-10-20)
|
||||
|
||||
- Existing HTML templates: `ScenarioForm.html`, `ParameterInput.html`, and `Dashboard.html` (reporting summary view).
|
||||
|
||||
Reference in New Issue
Block a user