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

chore: break down ProfileSummary into logical components #2069

Open
wants to merge 3 commits into
base: feature/sc-29344/sheet-header
Choose a base branch
from

Conversation

stevekaplan123
Copy link
Contributor

Description

A fair amount of ProfileSummary could be re-used by the new Sheet Viewer sidebar which displays profile data. I broke down ProfileSummary into logical components and re-used one of them, ProfileBio.

Code Changes

  1. ProfileBio is re-usable as in both UserProfile and Sheets Viewer, we want to display user education, organization, and location info.
  2. The existing ProfileSummary return statement is 50 lines long. I found this difficult to read, and so even though I couldn't re-use every aspect of ProfileSummary for the sheets viewer, I re-factored ProfileSummary so that we now have 3 new constants -- profileName, profileButtons, and followInfo -- that allowed me to reduce considerably the size of the return statement in ProfileSummary. I didn't make these constants into their own components because (1) profileName is too simple to be its own component and (2) profileButtons and followInfo do not conform to the spec for the sheets viewer profile.

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.

1 participant