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

Fixes #3565: Post user avatar not using proper GitHub image #3703

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

manekenpix
Copy link
Member

@manekenpix manekenpix commented Oct 10, 2022

Issue This PR Addresses

Fixes #3565

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

This PR adds changes to send the github username of a telescope user (if stored) to the frontend and use it to display the user's github avatar in posts.

image

image

Steps to test the PR

  • Run supabase locally and use the db:init script to add feeds to the database.
  • Using the supabase dashboard, create rows in the telescope_profiles table with valid github usernames and link them to users in the feeds table by using the same id in telescope_profiles->id and feeds->user_id.
  • Run the rest of telescope.
  • Assert that posts by users with a stored github username display the user's github avatar, and the user's initials when there's no github username stored.

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@gitpod-io
Copy link

gitpod-io bot commented Oct 10, 2022

humphd
humphd previously approved these changes Oct 11, 2022
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

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

This is amazing, I've always wanted this! Thanks for doing it.

One question I have for a follow-up: this isn't using

github_avatar_url String
, and I think the way you're doing it is logical (passing username vs. image URL). Should we remove this from the db?

cc @DukeManh

RC-Lee
RC-Lee previously approved these changes Oct 11, 2022
Copy link
Contributor

@RC-Lee RC-Lee left a comment

Choose a reason for hiding this comment

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

Tested, Built. Works
image

@manekenpix
Copy link
Member Author

github_avatar_url String

Should we remove this from the db?

I'm not sure, I think it's not used anywhere else, but I'm not very familiar with how we use supabase, so maybe I'm missing something.

@manekenpix manekenpix merged commit 76609ba into Seneca-CDOT:master Oct 11, 2022
@manekenpix manekenpix deleted the use-user-avatar-in-posts branch October 11, 2022 17:06
@humphd
Copy link
Contributor

humphd commented Oct 11, 2022

github_avatar_url String

Should we remove this from the db?

I'm not sure, I think it's not used anywhere else, but I'm not very familiar with how we use supabase, so maybe I'm missing something.

Filed #3704

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.

Post user avatar not using proper GitHub image
3 participants