Copilot commented on code in PR #83:
URL: https://github.com/apache/steve/pull/83#discussion_r2866995605
##########
v3/server/templates/voter.ezt:
##########
@@ -78,14 +78,14 @@
</div>
</div>
<div class="card-footer text-muted small
d-flex justify-content-between align-items-center">
- <span>
- [open_elections.owner_name]
+ [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>
Review 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).
##########
v3/server/templates/voter.ezt:
##########
@@ -170,14 +170,14 @@
</p>
</div>
<div class="card-footer text-muted small
d-flex justify-content-between align-items-center">
- <span>
- [past_elections.owner_name]
+ [if-any past_elections.authz]
+ <span>[past_elections.authz] can
vote</span>
Review 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.
```suggestion
<span>[past_elections.authz]
could vote</span>
```
##########
v3/server/templates/voter.ezt:
##########
@@ -78,14 +78,14 @@
</div>
</div>
<div class="card-footer text-muted small
d-flex justify-content-between align-items-center">
- <span>
- [open_elections.owner_name]
+ [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]
Review 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).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]