-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: New confirm action modal UI #1075
Conversation
* @returns {string} | ||
*/ | ||
export function capitalizeFirstLetter(string) { | ||
return string.charAt(0).toUpperCase() + string.slice(1); |
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.
can we have a default string = ''
?
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.
It already returns ''
if the input string is empty.
return flattenParameters(event.meta.parameters); | ||
} | ||
|
||
return undefined; |
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.
It intentionally returns undefined
, rather than {}
. Either one should be fine, and I'm curious to know the reason for that.
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.
Mainly to keep things in line with the original API response. The meta
field returned on the event from the API would resolve to undefined
if there are no parameters set.
Context
New UI for the modal to confirm start/restarting of a job from the workflow graph.
Objective
As part of the new UI work, this provides a new modal that is a Glimmer component and leverages the pipeline parameters component from #1068.
The new component also properly displays the desired action that is to be taken with the job (e.g., start or restarting a job)
References
screwdriver-cd/screwdriver#3200
License
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.