Skip to content
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

Merged
merged 3 commits into from
Jun 28, 2024
Merged

feat: New confirm action modal UI #1075

merged 3 commits into from
Jun 28, 2024

Conversation

minghay
Copy link
Contributor

@minghay minghay commented Jun 27, 2024

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)
Screenshot 2024-06-27 at 14-52-08 New Pipeline Events Show

Screenshot 2024-06-27 at 14-52-21 New Pipeline Events Show

Screenshot 2024-06-27 at 14-52-30 New Pipeline Events Show

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.

* @returns {string}
*/
export function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
Copy link
Contributor

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 = '' ?

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@minghay minghay merged commit f6d0307 into master Jun 28, 2024
2 checks passed
@minghay minghay deleted the confirm-action-modal branch June 28, 2024 18:04
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.

2 participants