This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new d4f447b Improve the design of the vote resolution forms
d4f447b is described below
commit d4f447bbea81d43d0461ffb0b1b686284a23bf59
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jun 30 14:27:58 2025 +0100
Improve the design of the vote resolution forms
---
atr/routes/resolve.py | 1 +
atr/routes/vote.py | 3 ++-
atr/templates/check-selected-candidate-forms.html | 5 ++---
atr/templates/vote-tabulate.html | 7 +++++--
4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/atr/routes/resolve.py b/atr/routes/resolve.py
index 3e91633..508a524 100644
--- a/atr/routes/resolve.py
+++ b/atr/routes/resolve.py
@@ -48,6 +48,7 @@ class ResolveForm(util.QuartFormTyped):
"Resolution email body",
validators=[wtforms.validators.Optional()],
description="Enter optional comment for the resolution email (e.g.,
summary of issues if failed).",
+ render_kw={"rows": 12},
)
submit = wtforms.SubmitField("Resolve vote")
diff --git a/atr/routes/vote.py b/atr/routes/vote.py
index 91b9868..6a3e8ca 100644
--- a/atr/routes/vote.py
+++ b/atr/routes/vote.py
@@ -53,7 +53,7 @@ class CastVoteForm(util.QuartFormTyped):
class ResolveVoteForm(util.QuartFormTyped):
"""Form for resolving a vote."""
- email_body = wtforms.TextAreaField("Email body")
+ email_body = wtforms.TextAreaField("Email body", render_kw={"rows": 24})
vote_result = wtforms.HiddenField("Vote result")
submit = wtforms.SubmitField("Resolve vote")
@@ -196,6 +196,7 @@ async def tabulate(session: routes.CommitterSession,
project_name: str, version_
committee, release, tabulated_votes, summary, passed, outcome,
full_name, asf_uid, thread_id
)
resolve_form.vote_result.data = "passed" if passed else "failed"
+ resolve_form.submit.label.text = f"Resolve vote as {'passed' if passed
else 'failed'}"
return await template.render(
"vote-tabulate.html",
release=release,
diff --git a/atr/templates/check-selected-candidate-forms.html
b/atr/templates/check-selected-candidate-forms.html
index 0466b90..d3f3879 100644
--- a/atr/templates/check-selected-candidate-forms.html
+++ b/atr/templates/check-selected-candidate-forms.html
@@ -1,3 +1,4 @@
+{% include "check-selected-vote-email.html" %}
<h2>Cast your vote</h2>
<div class="card bg-warning-subtle mb-3">
@@ -7,8 +8,6 @@
</div>
</div>
-{% include "check-selected-vote-email.html" %}
-
<form method="post"
action="{{ as_url(routes.vote.selected_post, project_name=project_name,
version_name=version_name) }}"
class="atr-canary py-4 px-5 mb-4 border rounded">
@@ -73,7 +72,7 @@
<div class="row">
{{ forms.label(resolve_form.resolution_body, col="md3") }}
<div class="col-sm-9">
- {{ forms.widget(resolve_form.resolution_body, rows="3") }}
+ {{ forms.widget(resolve_form.resolution_body) }}
{{ forms.errors(resolve_form.resolution_body) }}
{{ forms.description(resolve_form.resolution_body) }}
</div>
diff --git a/atr/templates/vote-tabulate.html b/atr/templates/vote-tabulate.html
index c107b8b..f912453 100644
--- a/atr/templates/vote-tabulate.html
+++ b/atr/templates/vote-tabulate.html
@@ -106,10 +106,13 @@
{{ resolve_form.hidden_tag() }}
<div class="form-group">
{{ forms.label(resolve_form.email_body) }}
- {{ forms.widget(resolve_form.email_body, rows=24) }}
+ {{ forms.widget(resolve_form.email_body) }}
{{ forms.errors(resolve_form.email_body, classes="invalid-feedback
d-block") }}
</div>
- {{ resolve_form.submit(class="btn btn-primary mt-2") }}
+ {{ resolve_form.submit(class="btn btn-primary my-3") }}
+ <p>
+ You can also <a href="{{ as_url(routes.vote.selected,
project_name=release.project.name, version_name=release.version)
}}#resolve-vote">resolve the vote manually</a>.
+ </p>
</form>
{% else %}
<p>No votes tabulated yet.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]