-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI: remove references to comma separation for string array edit types #20163
UI: remove references to comma separation for string array edit types #20163
Conversation
@@ -107,7 +107,7 @@ export default class PkiIssuerModel extends Model { | |||
|
|||
@attr('string', { | |||
subText: | |||
'The URL values for the Issuing Certificate field. These are different URLs for the same resource, and should be added individually, not in a comma-separated list.', | |||
'The URL values for the Issuing Certificate field; these are different URLs for the same resource.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how often and for what cases we would use a semicolon. This comes from my experience making language changes and Ivana correcting them :) . From what I can remember, she avoided them and stuck with a period. (Note: trying to search for text with semicolons is a challenge given how much we use them for all other things...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since they're related independent clauses a semicolon felt appropriate here, the super short sentences seemed really choppy. But I can defer to design!
I also thought about removing the second part all together, since it felt like it was only there so add the part about adding one per row
@@ -20,7 +20,7 @@ export default class PkiUrlsModel extends Model { | |||
@attr({ | |||
label: 'Issuing certificates', | |||
subText: | |||
'The URL values for the Issuing Certificate field. These are different URLs for the same resource, and should be added individually, not in a comma-separated list.', | |||
'The URL values for the Issuing Certificate field; these are different URLs for the same resource.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment here re: ;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@@ -39,7 +39,6 @@ | |||
{{else if (eq group "Additional subject fields")}} | |||
These fields provide more information about the client to which the certificate belongs. | |||
{{/if}} | |||
Add one item per row. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just one small nit, otherwise LGTM
ui/app/utils/openapi-to-attrs.js
Outdated
@@ -22,6 +22,10 @@ export const expandOpenApiProps = function (props) { | |||
type = 'number'; | |||
} | |||
|
|||
if (prop['x-vault-displayAttrs']?.description) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we not add description
above on line 19? Would make this a bit clearer. If we needed to rename it to something so a falsey value doesn't override the previous definition of description
you could rename it like { ..., description: openApiDescription } = prop[...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea!
Opened #20231 without |
Models that build from openApi use the
description
key ashelpText
which renders as a tooltip beside the label. These descriptions are written for CLI users and so the tooltips are misleading in the UI for inputs witheditType: stringArray
. The tooltip will say to inputcomma separated
values, but the UI doesn't actually accept this for that specific input type.This PR:
description
block to theDisplayAttributes
struct that generates an attrs open api schemaAdd one item per row
as subtext to all<StringList>
inputs rendered by the<FormField>
component (which all models that leverage openAPI use)<StringList>
input itself if a comma exists and reminding to input separate values individuallyFixes #19451
Fixes #10346
demo of fix and validations
k8 role
Abandoned idea: sanitizing the input and stripping out the comma