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

UIU-3005 - Display Profile picture on edit screen based on user permission. #2620

Merged
merged 12 commits into from
Feb 7, 2024

Conversation

Terala-Priyanka
Copy link
Contributor

@Terala-Priyanka Terala-Priyanka commented Feb 1, 2024

Purpose

UIU-3005 - Integrate UX wireframes based on permission - "Users: Can view, edit, and delete profile pictures"

Approach

  • Based on permission "Users: Can view, edit, and delete profile pictures", profilepicture and associated action buttons on user edit screen/user create screen.
  • reuse "useProfilePicture" hook, from hooks folder in user detail screen too.
  • remove "hooks" folder from src/components/UserDetailSections/UserInfo
  • Update, localFile and delete are not binded with chick handlers - it will be taken care in the scope of other ticket.

Screencast

RJZHZWhs5T

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
    • There are no breaking changes in this PR.

If there are breaking changes, please STOP and consider the following:

  • What other modules will these changes impact?
  • Do JIRAs exist to update the impacted modules?
    • If not, please create them
    • Do they contain the appropriate level of detail? Which endpoints/schemas changed, etc.
    • Do they have all they appropriate links to blocked/related issues?
  • Are the JIRAs under active development?
    • If not, contact the project's PO and make sure they're aware of the urgency.
  • Do PRs exist for these changes?
    • If so, have they been approved?

Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.

While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.

@Terala-Priyanka Terala-Priyanka marked this pull request as draft February 1, 2024 13:30
@Terala-Priyanka Terala-Priyanka self-assigned this Feb 1, 2024
@Terala-Priyanka Terala-Priyanka changed the title UI u 3005 UIU-3005 - Display Profile picture on edit screen based on user permission. Feb 2, 2024
@Terala-Priyanka Terala-Priyanka marked this pull request as ready for review February 5, 2024 08:06
@Terala-Priyanka Terala-Priyanka requested review from a team and manvendra-s-rathore and removed request for a team February 5, 2024 08:06
@Terala-Priyanka Terala-Priyanka requested review from a team and removed request for a team February 5, 2024 14:02
<Dropdown
data-testId="updateProfilePictureDropdown"
id="updateProfilePictureDropdown"
label="Update"
Copy link
Member

Choose a reason for hiding this comment

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

Update must be i18n'ed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for identifying it @zburke
I have added the needful. Please re-review.

Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

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

Please correct a few more missing i18n strings. I don't have context for the rest of this work so I am hesitant to review, but I'll be happy to dismiss my "request changes" comment once the i18n changes are in place so you can merge with approval from your team.

Comment on lines 43 to 48
aria-label="profile picture action menu"
role="menu"
>
<Button buttonStyle="dropdownItem"><Icon icon="profile">Local File</Icon></Button>
<Button buttonStyle="dropdownItem"><Icon icon="external-link">External URL</Icon></Button>
<Button buttonStyle="dropdownItem"><Icon icon="trash">Delete</Icon></Button>
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, more missing i18n

Comment on lines 54 to 57
<Label tagName="div">
{label}
</Label>
{ renderProfilePic()}
Copy link
Member

Choose a reason for hiding this comment

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

Should this be <Label>{renderProfilePic()}</Label> instead? It's a bit odd to see a <Label> all on its own, unattached to a field since its raison d'être is to label a field.

Copy link

sonarqubecloud bot commented Feb 7, 2024

@Terala-Priyanka Terala-Priyanka merged commit cba4384 into master Feb 7, 2024
5 checks passed
@Terala-Priyanka Terala-Priyanka deleted the UIU-3005 branch February 7, 2024 03:00
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.

5 participants