Four Rewrites of the Same Screen
Objectives
- Make one screen serve every category, so that adding a category never means adding a file.
- Keep the reading column narrow enough that the text does not become a wall.
- Let the page state what it holds before the reader scrolls.
Development Process
The first version was written for a single category and read well. That was the problem: it read well because it had been tuned to one set of content. The second version generalised it and lost the tuning. The third version tried to recover the tuning with per-category overrides, which is the same as having several screens while pretending to have one.
The fourth version removed the overrides and moved the differences into the data instead. What varies between categories is now the content of fields, not the shape of the page.
Challenges
The hardest part was not technical. It was noticing that "make it configurable" and "make it general" pull in opposite directions. A screen with eleven switches is not one screen; it is eleven screens sharing a filename.
Solutions
Every optional element renders only when its field is present, and there is no switch anywhere that says which category is being viewed. If a category needs something the page cannot do, the answer is a new optional element that any category may use — never a branch on the category's name.
Decisions
- No per-category branching in the layout. Not deferred, not discouraged — absent.
- Optional blocks are opt-in by data. A category that fills nothing sees no change.
- Width is fixed for reading, not for content. Longer entries do not get a wider column.
Revision History
| Version | Date | Change |
|---|---|---|
| 0.1 | Rewrite one | Written for a single category; tuned by hand |
| 0.2 | Rewrite two | Generalised; tuning lost |
| 0.3 | Rewrite three | Per-category overrides added, then judged a mistake |
| 0.4 | Rewrite four | Overrides removed; differences moved into fields |
Timeline
| Point | What happened |
|---|---|
| Start | One category, one screen, no plan to reuse it |
| Midpoint | Second category added; the tuning problem became visible |
| Decision | Overrides written, reviewed, and deleted the same week |
| Close | Fourth version left in place and not touched since |