Question menu settings show the old value for 400 ms, and a quick change back is lost
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 64/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, typescript
- Domínio
- frontend
Direção de pesquisa
Start in src/composables/useQuestion.ts at onExtraSettingsChange() and the debounced saveExtraSettings() (INPUT_DEBOUNCE_MS, 400 ms), then look at the menu controls that bind to props.extraSettings (the rating "Highest rating" select and the linear scale's lowest/highest selects). Reproduce on a form with a rating or linear scale question: pick a new value and watch the control lag, then pick the saved value back within 400 ms. Done when the control reflects the pick immediately and the last pick wins; verify by hand in the editor, since no test is named.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug
Settings in a question's menu that are saved as extra settings go through onExtraSettingsChange() in src/composables/useQuestion.ts, which batches them and saves them through a debounced saveExtraSettings() (INPUT_DEBOUNCE_MS, 400 ms). Until that save runs, props.extraSettings still holds the saved value, and the controls are bound to it. This has two effects:
- A select such as "Highest rating" (or the lowest/highest value of a linear scale) keeps showing the old value for up to 400 ms after a new one is picked.
- Picking the saved value again within those 400 ms is lost: the control's model value already equals the saved value, so no change is emitted, and the pending other value is saved instead.
To Reproduce
Steps to reproduce the behavior:
- Edit a form with a rating question (#3637) or a linear scale.
- Open the question's menu and pick another value in the "Highest rating" select, e.g. 7 instead of 10.
- Watch the select: it shows 10 at about 300 ms and 7 at about 600 ms.
- Pick a value, then pick the previously saved value again within 400 ms: the first pick is saved.
Expected behavior
The control shows the picked value at once, and the last pick is the one saved, however quickly the user changes it.
A possible fix: keep the pending extra settings in a reactive local state that the controls read (saved value merged with pending changes), or flush the pending save before a control that shows the saved value is updated. The fix belongs in useQuestion, as all question types that save extra settings from their menu share this path.
Screenshots
N/A
Nextcloud (please complete the following information):
- Nextcloud-Version: 36 (dev)
- Forms-Version:
main(5.5 development) with #3637
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Microsoft Edge (Chromium)
- Version: current
Smartphone (please complete the following information):
N/A
Browser log
No errors are logged; the behaviour follows from the debounce.
Additional context
Found in the review of #3637 (rating question). Validated and reproduced on a live Nextcloud 36 instance with the rating question of #3637: the select timing was measured, and the lost second pick was reproduced for the icon choice before #3637 switched it to @change. The "Highest rating" select is left as is in #3637, as the fix belongs in useQuestion. The linear scale's lowest and highest value selects use the same code path; they were not reproduced separately.
Assisted by Claude Code:claude-opus-5-5
- Linguagem predominante
- JavaScript
- Estrelas
- 385
- Forks
- 133
- Merge médio
- 7h 54min
- PRs com merge (30d)
- 157
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de nextcloud/forms
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Allow a team to own a formAberta1. to develop enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
nextcloud/forms#3841 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
0. Needs triage bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
nextcloud/forms#3831 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
1. to develop enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 22/100
nextcloud/forms#3829 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de nextcloud/forms
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
cytoscape/cytoscape.js#3597 ·
Mantenedores costumam responder em até 5 dias
-
priority: low server testing
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
blamechris/chroxy#9277 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
sunososobro-hub/cloudball#191 ·
Mantenedores costumam responder em até 1 dia
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
microsoft/playwright#44289 ·
Mantenedores costumam responder em até 1 dia
-
Wire ISO post: has() accepts text values such as an empty string, true or 0x1A for wire numbersAbertaarea:post effort:low enhancement P7 source:agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia