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

PSP-9710, PSP-9313: UI/UX Cleanup - Make icons consistent across PIMS #4541

Merged
merged 9 commits into from
Dec 23, 2024

Conversation

stairaku
Copy link
Collaborator

image image image image

@stairaku stairaku added enhancement New feature or request 5.7 labels Dec 18, 2024
@stairaku stairaku self-assigned this Dec 18, 2024
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4541

Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4541

return (
<StyledRemoveIconButton
variant="primary"
title={title ?? 'edit'}
Copy link
Collaborator

Choose a reason for hiding this comment

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

default title for remove buttons should be "remove" - not "edit"

onClick: () => void;
title?: string;
icon?: React.ReactNode;
dataTestId?: string | null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have an existing pattern for passing data-testId to components without having to use a new property name.
See SectionListHeader.tsx for reference below:

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for the observation. Changing the data-testId pattern on both RemoveButton and ViewButton files.

}) => (
<StyledIconButton
variant="primary"
title={title ?? 'edit'}
Copy link
Collaborator

Choose a reason for hiding this comment

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

View button default title should not be "edit" - maybe "view" would be more suitable?

Comment on lines 69 to 72
<StyledCompensationContainer>
{asCurrency ? formatMoney(Number(value)) : value}
<EditButton onClick={() => setIsEditing(true)} />
</StyledCompensationContainer>
Copy link
Collaborator

@asanchezr asanchezr Dec 23, 2024

Choose a reason for hiding this comment

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

nit: This component is generic so the styled container shouldn't be named "StyledCompensationContainer" - maybe just "StyledContainer"? This is very minor of course

)}

{hasClaim(Claims.CONTACT_VIEW) && (
<StyledIconButton
<ViewButton
Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks for making these!

</StyledRemoveLinkButton>
)}
<Col xs={1} className="p-0">
{' '}
Copy link
Collaborator

Choose a reason for hiding this comment

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

no sure whether we need this here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! I forgot to clean that up!

Copy link
Collaborator

@asanchezr asanchezr left a comment

Choose a reason for hiding this comment

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

Approved with comments

@stairaku stairaku merged commit 8aa0ab6 into bcgov:dev Dec 23, 2024
8 checks passed
Copy link
Contributor

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/4541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.7 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants