Skip to content

docs(mypolitics): add result module specs and tasks - #80

Merged
AdrianOrlow merged 4 commits into
mainfrom
mypolitics/results-tasks
Oct 6, 2026
Merged

AdrianOrlow merged 4 commits into
mainfrom
mypolitics/results-tasks

Conversation

@AdrianOrlow

@AdrianOrlow AdrianOrlow commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

What

The result modules of the quiz, taken from their docs and Figma frames to specs and developer tasks with the concept-to-task skill.

Commit What it holds
39d9967 Module wrapper spec and its task
1819a82 Specs for the eight remaining result modules, and the build order
b3e09b1 A change to the universal axis spec: an entry without a value
65a5288 Nine tasks for the modules epic

Specs

All in mypolitics/spec/quiz/. The folder README gains a build order table.

Step Spec Needs first
0 universal-axis.md (changed), module-wrapper.md (new) Nothing
1 single-axis-chart.md, double-axis-chart.md, horizontal-bar-chart.md Universal axis, module wrapper
1 traits.md Module wrapper
1 header.md Nothing
2 multi-axis-chart.md Double axis chart
2 archetype.md Header, horizontal bar chart
3 nolan-chart.md Multi axis chart

Four 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.

Epic Cycle Issue Branch Blocked by
Results (#39) 1 ModuleWrapper #62 (done) feature/module-wrapper-62 -
Modules (#64) 1 UniversalAxis: entry without a value #73 bugfix/universal-axis-absent-value-73 -
Modules (#64) 1 SingleAxisChart #65 feature/single-axis-chart-65 -
Modules (#64) 1 DoubleAxisChart #66 feature/double-axis-chart-66 #73
Modules (#64) 1 Traits #67 feature/traits-67 -
Modules (#64) 1 ResultsHeader #68 feature/results-header-68 -
Modules (#64) 1 HorizontalBarChart #69 feature/horizontal-bar-chart-69 -
Modules (#64) 2 MultiAxisChart #70 feature/multi-axis-chart-70 #66
Modules (#64) 2 Archetype #71 feature/archetype-71 #68, #69
Modules (#64) 3 NolanChart #72 feature/nolan-chart-72 #70

Task files are in mypolitics/tasks/epics/results/cycle-1/ and mypolitics/tasks/epics/modules/cycle-{1,2,3}/, and match the issue bodies. The result modules go to src/components/results/modules/; ModuleWrapper and UniversalAxis stay in shared.

Decisions on record

Approved in review, or decided by the Technical Leader afterwards:

  • Opening a group or a category replaces the card's content (multi axis, horizontal bar). One is open at a time.
  • A multi axis group is named by its first axis, its headline axis, not by the strongest result inside it.
  • Ties are decided on rounded values, so a title never contradicts the "50% / 50%" on the bar.
  • Nolan names are whole phrases from the author, never composed from a level and a noun.
  • Nolan thresholds: about 0.47 and 1 for the map, as the Figma note gives them; 1/3 and exactly 1 along a single axis, inferred from the examples.
  • Archetype bars are coloured by match band through an overridden orientation.color taken from a map of band colours. UniversalAxis stays universal and is not changed for this.
  • Traits take the quiz's trait definitions plus each party's earned ids, so the order lives in one place.
  • An absent side on a double axis is passed to the bar as an entry without a value. That needs the fix in chore: update readme #73, so Bartosz Smętek - create personal page with React #66 is blocked by it although both are in cycle 1.
  • Copy is Polish by default and fully translatable. Every task has a Copy section listing its strings with Polish source and English, all through Lingui macros.

Where doc and Figma disagreed

  • "Action" on the module wrapper. Figma uses it for a component title; the doc for the two buttons. The specs use the doc's meaning.
  • Header band colour. Figma draws 75% in green; its own band chart makes 50-80 amber. The spec follows the chart, and 80 itself counts as a match.
  • Double axis sum. The doc says the sides always add up to a hundred; Figma shows 47/31. Values are drawn as given.
  • Zero on a double-sided bar. One Figma bar shows "0%"; the universal axis hides a side too small to hold its number, and that rule wins.
  • Nolan dot at a corner. The taker's dot is clipped by the map's edge as Figma draws it; a friend's avatar is moved inward so it stays visible.

To know

  • Every doc involved is still ⚪ idea, so the specs are ahead of a formal GO.
  • The issues link their specs on main, so those links are dead until this PR is merged. Doc and image links already work.
  • The empty state of traits is not drawn in Figma; the spec gives it one line of text.

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T14:00:01.801293Z 39d9967 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

AdrianOrlow and others added 3 commits October 6, 2026 17:03
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>
@AdrianOrlow AdrianOrlow changed the title docs(mypolitics): add module wrapper spec and task docs(mypolitics): add result module specs and tasks Oct 6, 2026
@AdrianOrlow
AdrianOrlow merged commit 7e3f30d into main Oct 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant