Skip to content

fix(aws): correctly reformat dropdown text on forced update#534

Open
stackunderfl0w wants to merge 1 commit into
canonical:mainfrom
stackunderfl0w:dropdown-reformat
Open

fix(aws): correctly reformat dropdown text on forced update#534
stackunderfl0w wants to merge 1 commit into
canonical:mainfrom
stackunderfl0w:dropdown-reformat

Conversation

@stackunderfl0w

@stackunderfl0w stackunderfl0w commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/_static/js/formatted-dropdown.js
@k-dimple

Copy link
Copy Markdown
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants