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: make avatars clickable #3198

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

adam-strzelec
Copy link
Contributor

@adam-strzelec adam-strzelec commented Sep 27, 2024

Description

Make avatars on teams page clickable
Screenshot 2024-09-27 at 13 21 20

Testing

  • Go to the /{colony_name}/teams page
  • Click the avatars on teams card
  • After click, You should be redirected to contributors page with the relevant team filter applied

Diffs

New stuff

  • New stuff goes here

Add link for avatars inside TeamCard component

Resolves #31415

@adam-strzelec adam-strzelec requested review from a team as code owners September 27, 2024 11:33
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


strzelec seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@adam-strzelec adam-strzelec self-assigned this Sep 27, 2024
Copy link
Contributor

@mmioana mmioana left a comment

Choose a reason for hiding this comment

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

Nice start on this PR @adam-strzelec 🎉

Everything works as expected, but I would appreciate if you can tackle my comment 🙏

Screen.Recording.2024-09-30.at.09.32.03.mov

<Link
to={{
pathname: `/${colonyName}/${COLONY_CONTRIBUTORS_ROUTE}`,
search: `${links?.[0]?.to.search}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest refactoring this line, as the links might update and is not a reliable source of truth for the parameter we want to use

So my suggestion would be to add an extra property to the TeamCardProps either nativeId or searchParams
and then update the useTeams hook to include either the nativeId or

searchParams: {
  team: `${TEAM_SEARCH_PARAM}=${nativeId}`
}

and then use it here either as
search: ?${TEAM_SEARCH_PARAM}=${nativeId},
or
search: ?${searchParams.team},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mmioana done 🙂

@adam-strzelec adam-strzelec linked an issue Sep 30, 2024 that may be closed by this pull request
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Nice job on this @adam-strzelec ! Can confirm the avatars are linking to the correct page with the correct team filter. :)

Screen.Recording.2024-09-30.at.10.03.56.mov

However, this part of the original issue has been missed:

The hover state of the icons should show a highlighted border on individual avatars using the primary blue/400 color token.

When the component is hovered, the border on each of the icons should change to blue-400:

Screenshot 2024-09-30 at 10 10 49

Please also address Ioana's code suggestion.

@iamsamgibbs done 🙂

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Thanks Adam! Can you also add the transition-colors class so that the border transitions in the same way as the other hover states on the site?

Screen.Recording.2024-09-30.at.11.39.39.mov
Screen.Recording.2024-09-30.at.11.39.51.mov

@iamsamgibbs done

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Nice one, this looks great now:

Screen.Recording.2024-09-30.at.12.36.24.mov

Copy link
Contributor

@mmioana mmioana left a comment

Choose a reason for hiding this comment

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

Thank you for your changes and continuous effort @adam-strzelec 🥇

It all looks great now and behaves as expected 🎉

Screen.Recording.2024-10-01.at.18.38.28.mov

@adam-strzelec adam-strzelec merged commit d0abe33 into master Oct 1, 2024
3 of 6 checks passed
@adam-strzelec adam-strzelec deleted the feat/16083206-make-avatars-clickable branch October 1, 2024 16:43
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 avatars on team cards clickable
4 participants