User story: As a facilitator or communications person, the interface to modify text and image content should be technologically straightforward.
-
Problem: Currently, strings are implicitly joined, multiline strings in
messages.py. But not all strings are located there, some are hard coded in the HTML (headings, form labels). These are harder to maintain than necessary. It isn't obvious how someone with less technical knowledge would go about modifying the theme, images, and text copy.
Proposed Solution
Refactor the account app software to enable specific solutions:
- Move all content strings into a YAML file. This provides a clean interface for modifying text content.
- Move all image paths into the same YAML file. This provides a clean interface for modifying image content.
- Move theming (colors) into a CSS file. This provides a clean interface for theming.
- Provide an interface for building static pages to...
- verify appearance;
- take screenshots for documentation that doesn't rely on modification of production environment
Specific Actions
-
Migrate string and image content into YAML. -
Identify relevant components: - Displayed strings: titles, headings, messages,
- Displayed form elements:
- labels, placeholders
- buttons, fields, checkboxes, etc.
- Images: favicon, UAB logo, Cheaha logo, loading.gif
- Image alt text: UAB logo, Cheaha logo, loading.gif
-
-
Define YAML -
Create YAML schema describing a YAML file that incorporates components. -
Put in a reasonable location, not for general modification. -
Create YAML file that directly incorporates components, meeting schema. -
Put YAML file into TLD in the repo, for general modification.
-
-
Modify app code to use YAML -
Phase 1 -
Update execution environment to include pyyaml. -
Use pyyaml to read file, verifying against schema. -
Use data read by pyyaml to replace the existing string content and file paths. Read the file multiple times if you have to. -
Create a unit-test for schema verification.
-
-
Phase 2 -
Modify Jinja HTML templates to include YAML paths to relevant variables. -
Use Jinja engine to transform templates into static HTML files. -
Create a unit-test for transformation to verify no errors or warnings are produced.
-
-
Phase 3 -
Extract HTML components shared between templates (e.g.,
-
-
Edited by William E Warriner