Quansight / Quansight-website

💻 Source code for Quansight Labs website
https://labs.quansight.org
21 stars 50 forks source link

BUG - Broken staff member's display #470

Closed trallard closed 1 year ago

trallard commented 2 years ago

Right now in https://quansight.com/about-us the Leadership team looks like this: About_Quansight___Quansight

The only person with a GitHub icon (+link) is Ralf which looks pretty terrible. This has to be removed from the Leadership profiles.

Second - We now have a mixture of folks with projects listed under the GitHub icon and some others without. Which is expected because not everyone work on OSS projects. This also looks pretty inconsistent so I'd suggest removing this altogether to enable consistency. Like in the original Figma design, else everything is going to remain pretty inconsistent.

About_Quansight___Quansight

bskinn commented 2 years ago

Removing all of the project names for Consulting About Us will be a straightforward Storyblok content change, I will proceed to implement. :+1:



On the other hand, after looking into it for a bit, I think removal of the Github logos is going to require code and Storyblok schema changes, when considered in combination with this feature request from #182:

It would be best if [the Github username in each author's card] were actually a link (with the correct styling) and we could prepend with an @ or the such

This is due to an intersection of reasons:

  1. A team member's Github handle and profile URL are defined in one place: in their team entry on Storyblok.
  2. If a team member's profile URL is defined, as currently implemented the TeamMember component will always render the Github logo/link when building the parent Team component.
  3. The Team component used to render the headshots on the Consulting About Us and Labs Team pages is common between the two sites (located in /libs/shared).
    • Therefore, we can't just disable the Github logo rendering in a piece of Consulting-specific code -- the solution has to work correctly on both Consulting and Labs sites at the same time.
  4. In order to implement the feature requested in #182, each team member will need to have their Github username and profile URL defined in their team entry.

(2) and (4) represent the core of the intractable problem for the Consulting site. If we define the username and profile for the user, it will cause the Github logo/link to render undesirably on the About Us page. If we do not define the username and profile for the user, it will prevent rendering of the author card as per #182.


I think the most robust and workable solution would be to add a boolean withGithub flag to the Team component, the value of which would be passed to each TeamMember component, which indicates whether to render the Github logo and link. A matching Storyblok schema change would expose this flag as a checkbox in the Team component, allowing the Consulting and Labs sites to respectively disable and enable Github logo/link rendering.

Another possible solution would be to modify the TeamMember component such that it detects whether it's being rendered on the Consulting or Labs site, and suppresses insertion of the Github logo and profile link when it's rendering for the Consulting site. I don't know how to implement such a check, however. (It will not work to check the domain of the page during rendering for quansight.com or labs.quansight.org or similar, because any check I can imagine will not work correctly on Vercel preview builds, which live at xyz123.vercel.app domains.) It also seems like a worse idea because it is less flexible in the long term.

WDYT, @trallard?