fix : doc view crashing when selecting enum value#2859
Merged
SB-virendrasolanke merged 6 commits intomainfrom Jan 16, 2026
Merged
fix : doc view crashing when selecting enum value#2859SB-virendrasolanke merged 6 commits intomainfrom
SB-virendrasolanke merged 6 commits intomainfrom
Conversation
✅ Deploy Preview for stoplight-elements-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stoplight-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
prafullaAtSB
left a comment
There was a problem hiding this comment.
looks common code of encodeSafeSelectorValue method here and at packages/elements-core/src/components/TryIt/Servers/VariableEditor.tsx
create utility class and use it at both place.
Contributor
Author
|
@prafullaAtSB , I have removed the redundant code. |
prafullaAtSB
approved these changes
Dec 22, 2025
Contributor
prafullaAtSB
left a comment
There was a problem hiding this comment.
Changes looks good to go ahead after comments incorporating..
…query-parameter-try-request
darekplawecki
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
STOP-4423
Description
Elements crash when user tries to apply query parameter to try request with enum value & example.
The error originated from React Aria (which Mosaic uses internally), but the root cause was that Elements was passing unencoded values with special characters to Mosaic's Select component.
Mosaic's Select component is a generic UI component that shouldn't need to know about encoding/sanitizing data values.
By encoding values in Elements before passing them to Mosaic Select, we've ensured the values are CSS-selector-safe.
How Has This Been Tested?
Verified on PR environment by publishing Elements alpha version first. - https://x-20657.stoplight-dev.com
Screenshot(s)/recordings(s)
Before -

After

Types of changes
Checklist
s/needs-docslabel.