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

fix(protocol-designer): preserve uppercase letters of step name #16584

Merged
merged 6 commits into from
Oct 24, 2024

Conversation

syao1226
Copy link
Collaborator

@syao1226 syao1226 commented Oct 23, 2024

fixes RQA-3398

Overview

Fixes the issue where renaming a step name with uppercase characters caused everything after the first character to be lowercased.

Test Plan and Hands on Testing

Changelog

  • added a capitalizeFirstLetter() to StepForm/utils to capitalize onlt the first character while leaving the rest of the string unchanged

Review requests

Risk assessment

@syao1226 syao1226 changed the title fix(protocol-designer): perserve uppercase letters of step name fix(protocol-designer): preserve uppercase letters of step name Oct 23, 2024
@syao1226 syao1226 marked this pull request as ready for review October 24, 2024 12:12
@syao1226 syao1226 requested a review from a team as a code owner October 24, 2024 12:12
@syao1226 syao1226 requested a review from jerader October 24, 2024 12:13
@@ -322,3 +322,6 @@ export const getSaveStepSnackbarText = (
return t(`protocol_steps:save_no_errors`, { stepType: stepTypeDisplayName })
}
}

export const capitalizeFirstLetter = (stepName: string): string =>
stepName.charAt(0).toUpperCase() + stepName.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.

nit

`${stepName.charAt(0).toUpperCase()}${stepName.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.

Could you add tests for capitalizeFirstLetter?

Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a couple of comments but the changes look good to me.

@syao1226 syao1226 merged commit dcc8f76 into edge Oct 24, 2024
40 checks passed
@syao1226 syao1226 deleted the protocol_designer-perserve-uppercase branch October 24, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants