Repository navigation
docs(mypolitics): add result module specs and tasks - #80
Conversation
Specify the frame every result module sits in, from its doc and Figma frame, and add the developer task cut from it. The task is published as gi-org-pl/mypolitics-app#62 under the Results epic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 39d996727c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```ts | ||
| export interface ModuleWrapperProps { | ||
| title?: ReactNode; // a string is a text title; any other node is a component title | ||
| ariaLabel?: string; // name of the card for assistive technology; needed with a component title |
There was a problem hiding this comment.
Require an accessible name for component titles
When a caller supplies a component title without ariaLabel, this interface accepts the props even though the wrapper cannot derive a name from the node. The resulting region is unnamed and its icon-button labels cannot include the module name, contradicting the accessibility contract later in this task. Model the component-title case so that ariaLabel is required, or specify and test a reliable fallback.
Useful? React with 👍 / 👎.
| ## Non-functional | ||
|
|
||
| ### Rendering contexts | ||
| The card renders on the result screen and in comparison mode. Where a result is drawn without interaction, such as the generated image of the [short results card](../../docs/modules/quiz/results/short-results-card.md), the caller leaves both actions out and gets the titled card. The wrapper has no static mode and does not know which context it is in, so nothing on it may depend on hover or on viewport size. |
There was a problem hiding this comment.
Do not add titled wrappers to the short-result image
In the generated short-result context, this instruction would retain each module's title/header merely by omitting the action handlers. That conflicts with the fixed short-card template shown in assets/short-results-card.png, where the module bodies appear as compact blocks without the standard title pill and divider; following this spec would add repeated wrapper chrome and materially change the shareable image. This context needs to omit the title/header as well or use an explicitly frame-less composition.
Useful? React with 👍 / 👎.
Specify the eight remaining result modules from their docs and Figma frames: single axis, double axis, multi axis and horizontal bar charts, Nolan chart, archetype, traits and the header. Each spec names what it needs first, and the folder README gains a build order with the four rules shared between modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An entry without a value now stays present: its cap and label are drawn, with no fill and no number. The mode follows which entries are passed, so a double-sided bar with one unknown side stays double-sided. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nine developer tasks in three cycles, cut from the result module specs and published as sub-issues of gi-org-pl/mypolitics-app#64: - cycle 1: UniversalAxis entry without a value (#73), SingleAxisChart (#65), DoubleAxisChart (#66), Traits (#67), ResultsHeader (#68), HorizontalBarChart (#69) - cycle 2: MultiAxisChart (#70), Archetype (#71) - cycle 3: NolanChart (#72) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
The result modules of the quiz, taken from their docs and Figma frames to specs and developer tasks with the
concept-to-taskskill.39d99671819a82b3e09b165a5288Specs
All in
mypolitics/spec/quiz/. The folder README gains a build order table.universal-axis.md(changed),module-wrapper.md(new)single-axis-chart.md,double-axis-chart.md,horizontal-bar-chart.mdtraits.mdheader.mdmulti-axis-chart.mdarchetype.mdnolan-chart.mdFour rules are written once and used by more than one module, each in the spec that is built first: the lead rule (double axis), the match bands (header), the ranked row (horizontal bar) and the axis row (multi axis).
Universal axis change
An entry without a value used to be treated as if the entry was not passed. It now stays present: its cap and label are drawn, with no fill and no number, so a double-sided bar with one unknown side stays double-sided. The mode follows which entries are passed, not which have values.
Tasks
Published in gi-org-pl/mypolitics-app. Each task names its branch and the issues that block it.
feature/module-wrapper-62bugfix/universal-axis-absent-value-73feature/single-axis-chart-65feature/double-axis-chart-66feature/traits-67feature/results-header-68feature/horizontal-bar-chart-69feature/multi-axis-chart-70feature/archetype-71feature/nolan-chart-72Task files are in
mypolitics/tasks/epics/results/cycle-1/andmypolitics/tasks/epics/modules/cycle-{1,2,3}/, and match the issue bodies. The result modules go tosrc/components/results/modules/;ModuleWrapperandUniversalAxisstay inshared.Decisions on record
Approved in review, or decided by the Technical Leader afterwards:
orientation.colortaken from a map of band colours.UniversalAxisstays universal and is not changed for this.Where doc and Figma disagreed
To know
main, so those links are dead until this PR is merged. Doc and image links already work.🤖 Generated with Claude Code