Conversation
Signed-off-by: tison <wander4096@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the voter.ezt template to improve how vote creator and authorization information is displayed in election cards. The authz ("who can vote") label is moved to its own prominently positioned <span> at the start of the card footer, and the creator info is consolidated into a single span that now always includes the election ID (eid).
Changes:
- The
authzinfo is moved to a dedicated<span>rendered before the creator info in each card footer, formatted as "[authz] can vote". - The creator name, PID, and eid are merged into one
<span>instead of being split across two. - These changes are applied consistently across open, upcoming, and past election sections.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [if-any open_elections.authz] | ||
| <span>[open_elections.authz] can vote</span> | ||
| [end] | ||
| <span class="text-muted" style="font-size: 0.8em;"> | ||
| Created By [open_elections.owner_name] | ||
| <span class="text-muted" style="font-size: 0.8em;">([open_elections.owner_pid])</span> | ||
| [if-any open_elections.authz] | ||
| · [open_elections.authz] | ||
| [end] | ||
| · eid: [open_elections.eid] | ||
| </span> |
There was a problem hiding this comment.
The card-footer uses d-flex justify-content-between align-items-center, which distributes space between its direct children. In the new layout, when authz is absent the [if-any open_elections.authz] block produces no DOM element, leaving only the single creator <span> as a child. With only one flex child, justify-content-between has no effect and the creator info will be left-aligned instead of pushed to the right edge of the footer. The original code always had two <span> elements (owner info on the left, eid on the right), so the footer's layout was always well-defined.
To preserve the intended two-column flex layout, consider always rendering the left slot (e.g., an empty <span> when authz is absent, or unconditionally rendering a <span> that is just empty when authz is not set), so there are always two flex children for justify-content-between to act on. This same issue applies to the upcoming_elections and past_elections sections as well (lines 133–140 and 173–180).
| <span>[open_elections.authz] can vote</span> | ||
| [end] | ||
| <span class="text-muted" style="font-size: 0.8em;"> | ||
| Created By [open_elections.owner_name] |
There was a problem hiding this comment.
The text "Created By" uses title-case mid-sentence; "By" should be lowercase: "Created by". The same issue exists in the upcoming_elections section (line 137) and past_elections section (line 177).
| <span> | ||
| [past_elections.owner_name] | ||
| [if-any past_elections.authz] | ||
| <span>[past_elections.authz] can vote</span> |
There was a problem hiding this comment.
The authz span "[past_elections.authz] can vote" is shown on past elections (lines 173–175). Since past elections are already closed, displaying "can vote" is misleading — there is no voting action available on a past election. Consider suppressing the authz display for past elections, or changing the label (e.g., "could vote") if it is meant to be informational.
| <span>[past_elections.authz] can vote</span> | |
| <span>[past_elections.authz] could vote</span> |
This closes #82.