Poll set to days is posted with minutes #3585

Open
lambadalambda wants to merge 1 commit from fix/poll-expiry-unit into develop

A poll set to 1 day ended after 1 minute. The unit Select had @change="expiryAmountChange" next to its v-model; that handler ran in the same tick and emitted {...modelValue, expiryAmount} from the stale prop, which put expiryUnit back to minutes. The native select kept showing days, so nothing looked wrong. expiryAmountChange also emitted twice (min, then max) from the same stale value.

The unit setter now emits the unit together with the amount clamped for it, and the amount field clamps the value from its own event. Tests mount the form inside a parent that holds the v-model, as the post form does; both fail on develop.

A poll set to 1 day ended after 1 minute. The unit `Select` had `@change="expiryAmountChange"` next to its v-model; that handler ran in the same tick and emitted `{...modelValue, expiryAmount}` from the stale prop, which put `expiryUnit` back to minutes. The native select kept showing days, so nothing looked wrong. `expiryAmountChange` also emitted twice (min, then max) from the same stale value. The unit setter now emits the unit together with the amount clamped for it, and the amount field clamps the value from its own event. Tests mount the form inside a parent that holds the v-model, as the post form does; both fail on develop.
fix(poll): a poll set to days is posted with days, not minutes
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
02d456bdc3
The unit select's change handler emitted the amount from the form's stale
modelValue prop, which put the unit back to minutes while the select still
showed days. The unit setter now emits the unit and its clamped amount in one
update, and the amount is clamped from the field's own value.
hj approved these changes 2026-10-14 16:02:20 +00:00
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/changelog Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-e2e Pipeline was successful
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/poll-expiry-unit:fix/poll-expiry-unit
git switch fix/poll-expiry-unit

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch develop
git merge --no-ff fix/poll-expiry-unit
git switch fix/poll-expiry-unit
git rebase develop
git switch develop
git merge --ff-only fix/poll-expiry-unit
git switch fix/poll-expiry-unit
git rebase develop
git switch develop
git merge --no-ff fix/poll-expiry-unit
git switch develop
git merge --squash fix/poll-expiry-unit
git switch develop
git merge --ff-only fix/poll-expiry-unit
git switch develop
git merge fix/poll-expiry-unit
git push origin develop
Sign in to join this conversation.
No reviewers
hj
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pleroma/pleroma-fe!3585
No description provided.