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

Make the inbox items avatars clickable #2240 #2274

Merged
merged 4 commits into from
Nov 7, 2023

Conversation

roienatan
Copy link
Collaborator

@roienatan roienatan commented Oct 30, 2023

  • PR title equals to the ticket name
  • I added the ticket to the Development section of this PR.

What was changed?

  • Inbox items avatars are now clickable. DM avatar click opens the user info and Common/Space click redirects to its page.

@netlify
Copy link

netlify bot commented Oct 30, 2023

Deploy Preview for preview-common ready!

Name Link
🔨 Latest commit 1e898bc
🔍 Latest deploy log https://app.netlify.com/sites/preview-common/deploys/65495b623f364200081a39ba
😎 Deploy Preview https://deploy-preview-2274--preview-common.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@roienatan roienatan linked an issue Oct 30, 2023 that may be closed by this pull request
@roienatan roienatan marked this pull request as ready for review October 30, 2023 16:47
alt={imageAlt}
/>
)}
<div onClick={handleAvatarClick}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would move click handler outside of this component to the parents which use it and pass the callback as onImageClick prop. So the component at least will not know about the dm user and such kind of things which are not related to the component itself.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@andreymikhadyuk I'm not sure I understood what's the issue with that. Currently the handleAvatarClick is only being used there, and data like dmUserId is necessary for this. So if it's being used only here, why should we define the function outside and pass it by props...

@andreymikhadyuk andreymikhadyuk merged commit 4a38a0e into dev Nov 7, 2023
5 checks passed
@andreymikhadyuk andreymikhadyuk deleted the cw-2240-inbox-items-avatar-clickable branch November 7, 2023 11:05
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.

Make the inbox items avatars clickable
2 participants