fix(aws): correctly reformat dropdown text on forced update#534
fix(aws): correctly reformat dropdown text on forced update#534stackunderfl0w wants to merge 1 commit into
Conversation
Some combinations of values for the dropdown widget are note possible requiring a forced update. In some cases this only updated the main field and not dependent fields earlier in the string.
There was a problem hiding this comment.
Pull request overview
This PR fixes inconsistent dropdown recomputation in the “formatted-dropdown” docs widget when a forced value change is required, and adds support for an explicit “empty string” dropdown value so the generated output string formats correctly.
Changes:
- Treats
""as an empty string value when parsing dropdown option values in the Sphinx directive. - Updates the client-side dropdown recomputation to iterate until selections stabilize, ensuring dependent fields are also updated after forced value changes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/exts/formatted-dropdown.py | Normalizes the literal "" option value into an actual empty string during parsing. |
| docs/_static/js/formatted-dropdown.js | Recomputes dropdown options/values in multiple passes so forced updates propagate across dependent fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@stackunderfl0w This version correctly addresses the use case that Carlos mentioned. On selecting 'Focal', the name string includes 'pro-server' as appropriate. But after that if I decide to go back by selecting say 'Resolute', it does not reset the name string correctly. The string still includes 'pro-server' in it. |
Some combinations of values for the dropdown widget are not possible requiring a forced update. In some cases this only updated the main field and not dependent fields earlier in the string.