Cosmetic: request header description set as placeholder for related textbox
See original GitHub issueDon’t get distracted by values, please. Pictures = 1000 words:
swagger-json; request params:
This is expected (swagger-json > default
becomes input.value
):
But, input.placeholder
being set to swagger-json > name + " - " + description
seems out of place:
Rendered HTML:
How about not setting the input.placeholder
to anything, if same information is displayed right next to it (name, description). There is nothing new to show, really. Maybe, it could be set to default
, so once retyped and then cleared, the user can still see what it was (although it won’t be much useful, since browsers remove the placeholder value the moment you start typing).
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:5 (1 by maintainers)
Top Results From Across the Web
OpenAPI query parameter description not set to text box as ...
If the parameter has an example or default value (or x-example in OpenAPI 2.0), Swagger UI will use this value as a placeholder...
Read more >Adding Placeholders - Microsoft Dynamics CRM Forum ...
I am looking to add placeholders for a text fields in a form, and want to know how can it be done if...
Read more >Placeholder for a text field - Discussion - BMC Community
Hi,. I am working on cosmetic changes to a form. One of the things in the design was to have placeholders for some...
Read more >Don't Use The Placeholder Attribute - Smashing Magazine
An interoperable input is created by programmatically associating a label element with it. Labels describe the purpose of an input field, ...
Read more >Format text and placeholders in paginated reports
When a simple or complex expression is defined inside a text box, the resulting UI representation of this expression is known as a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would like to provide (via some reasonable means) the text that Swagger UI will render as placeholder text. Using the description, which is immediately above the text input field (redundant) and often doesn’t fit inside the input control isn’t attractive and doesn’t add value to the UI.
I suggest populating the placeholder text with either:
example
value. I don’t like that the example values become request defaults. If you don’t want to make the example request, you have to delete the example values everytime you make a request using the UI. Setting the example as the placeholder text seems more intuitive to me. It shows the user an example of what could go in the field without providing the value as some sort of default.summary
value. If people really like having the example values prepopulated, that’s okay. One can just opt to not provide examples if they don’t want this behavior. In this case, using thesummary
text as the placeholder text would at least provide an option for providing more concise text (that might fit inside the text input control) and it wouldn’t be redundant with the already provideddescription
.My $0.02. 😎
Any possible workaround right now to get only the name for the placeholder? 5.6.3