-
Notifications
You must be signed in to change notification settings - Fork 26
Story 2304: User Profile UI #2400
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
Open
jlchilders11
wants to merge
14
commits into
develop
Choose a base branch
from
jc/user-profile
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9334cf9
Init
jlchilders11 b65a73e
add additional cards
jlchilders11 5fe7f33
Complete unfilled version
jlchilders11 0d94812
Continue work
jlchilders11 535a373
continue work
jlchilders11 d8c2738
continue work
jlchilders11 e5a4bf9
Complete right column
jlchilders11 3a6d488
Finish filled version
jlchilders11 128b492
Correct mobile styling of top buttons
jlchilders11 532c633
Implement Julio's suggested changes, add comments, remove extra classes
jlchilders11 9a85e74
Fix rebase issues
jlchilders11 190ad78
Update badge usage to use new options
jlchilders11 d5e1bc2
Update mobile alignment
jlchilders11 df4b29d
PR feedback: Clean up icons.html, remove extra var added during rebas…
jlchilders11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| .mailing-list-activity-card__mailing-items { | ||
| display: grid; | ||
| grid-template-columns: auto 1fr; | ||
| width: 100%; | ||
| gap: var(--space-large); | ||
| } | ||
|
|
||
| .mailing-list-activity-card__date { | ||
| color: var(--color-text-secondary); | ||
| font-family: var(--font-sans); | ||
| font-size: var(--font-size-xs); | ||
| font-weight: var(--font-weight-regular); | ||
| line-height: var(--line-height-default); | ||
| letter-spacing: var(--letter-spacing-tight); | ||
| width: 80px; | ||
| } | ||
|
|
||
| .mailing-list-activity-card__headline { | ||
| color: var(--color-text-primary); | ||
| font-family: var(--font-sans); | ||
| font-size: var(--font-size-small); | ||
| font-weight: var(--font-weight-medium); | ||
| line-height: var(--line-height-relaxed); | ||
| letter-spacing: var(--letter-spacing-tight); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| .bio-card__contributor_role { | ||
| color: var(--color-text-primary); | ||
| font-family: var(--font-sans); | ||
| font-size: var(--font-size-small); | ||
| font-weight: var(--font-weight-medium); | ||
| line-height: var(--line-height-relaxed); | ||
| letter-spacing: var(--letter-spacing-tight); | ||
| } | ||
|
|
||
| .bio-card__contributor_libraries { | ||
| color: var(--color-text-secondary); | ||
| font-family: var(--font-sans); | ||
| font-size: var(--font-size-small); | ||
| font-weight: var(--font-weight-regular); | ||
| line-height: var(--line-height-relaxed); | ||
| letter-spacing: var(--letter-spacing-tight); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| /* ──────── Top Level Container ──────── */ | ||
| .user-profile__container { | ||
| margin-top: var(--space-xl); | ||
| padding: 0 var(--space-large); | ||
| } | ||
|
|
||
| /* ──────── Header row, including profile card and buttons ──────── */ | ||
|
|
||
| .user-profile__profile-card-row { | ||
| display: flex; | ||
| flex-direction: row; | ||
| justify-content: space-between; | ||
| margin-bottom: var(--space-large); | ||
| align-items: flex-end; | ||
| } | ||
|
|
||
| .user-profile__button-group { | ||
| display: flex; | ||
| flex-direction: row; | ||
| gap: var(--space-s); | ||
| height: fit-content; | ||
| align-self: flex-end; | ||
| max-width: 100%; | ||
| flex-wrap: wrap; | ||
| } | ||
|
|
||
| /* ──────── Two Row Card Display ──────── */ | ||
|
|
||
| .user-profile__profile-content-area { | ||
| display: grid; | ||
| grid-template-columns: 1fr 1fr; | ||
| gap: var(--space-large); | ||
| margin-bottom: var(--space-xl); | ||
| } | ||
|
|
||
|
|
||
| .user-profile__col { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--space-large); | ||
| } | ||
|
|
||
| /* ──────── Override card width to fill columns ────────*/ | ||
|
|
||
| .user-profile__profile-content-area .card, | ||
| .user-profile__profile-content-area .card-group { | ||
| max-width: 100%; | ||
| } | ||
|
|
||
| @media (max-width: 767px) { | ||
| /* ──────── Stack header row on mobile ──────── */ | ||
| .user-profile__profile-card-row { | ||
| flex-direction: column; | ||
| gap: var(--space-xl); | ||
| align-items: flex-start; | ||
| } | ||
|
|
||
| /* ──────── Collapse to one column on mobile ──────── */ | ||
| .user-profile__profile-content-area { | ||
| grid-template-columns: 1fr; | ||
| } | ||
|
|
||
| /* Lift the column wrappers out of the layout so the cards become | ||
| direct grid children and `order` can interleave them in the | ||
| single-column cascade. */ | ||
| .user-profile__col { | ||
| display: contents; | ||
| } | ||
|
|
||
| .user-profile__bio { order: 1; } | ||
| .user-profile__achievements { order: 2; } | ||
| .user-profile__badges { order: 3; } | ||
| .user-profile__github { order: 4; } | ||
| .user-profile__posts { order: 5; } | ||
| .user-profile__mailing-list { order: 6; } | ||
| .user-profile__connections { order: 7; } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| {% comment %} | ||
| Card that displays the latest mailing list activity | ||
| Inputs: | ||
| title: str, required - text that appears bolded at the top of the card | ||
| mailing_list_items: list, required - list of dicts, each with the values (date, headline, url) for linking the mailing list items | ||
| {% endcomment %} | ||
| <div class="basic-card card"> | ||
| <div class="card__header"> | ||
| <span class="card__title">{{ title }}</span> | ||
| </div> | ||
| <hr class="card__hr" /> | ||
| <div class="card__column px-large"> | ||
| <div class="mailing-list-activity-card__mailing-items"> | ||
| {% for it in mailing_list_items %} | ||
| <span class="mailing-list-activity-card__date">{{ it.date|date:"n/d/y" }}</span> | ||
| <a class="mailing-list-activity-card__headline" href="{{it.url}}">{{ it.headline }}</a> | ||
| {% endfor %} | ||
| </div> | ||
| </div> | ||
| <hr class="card__hr" /> | ||
| <div class="card__cta_section"> | ||
| {% include 'v3/includes/_button.html' with style='primary' url=primary_button_url label='View all activity' only %} | ||
| </div> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| {% load wagtailmarkdown %} | ||
| {% comment %} | ||
| Card for displaying the users bio data on their profile. Accepts markdown content and library contributor_data and displays it in a card layout. | ||
| Inputs: | ||
| title: str, required - text that appears bolded at the top of the card | ||
| contributor_data: dict, required - a dict of contributions and libraries (i.e. {"author": "beast", "asyncio"}) | ||
| markdown: str, required - markdown formatted text that appears in the body of the card. The card handles transforming the text | ||
| button_url: str, optional - url that the button should link to. If not provided, button is not shown | ||
| button_label: str, optional - label for the optional cta button. If not provided, button is not shown. | ||
| {% endcomment %} | ||
| <div class="basic-card card markdown-card"> | ||
| <div class="card__header"> | ||
| <span class="card__title">{{ title }}</span> | ||
| </div> | ||
| <hr class="card__hr" /> | ||
| {% if contributor_data %} | ||
| <div class="card__column px-large"> | ||
| {% for role, libraries in contributor_data.items %} | ||
| <div> | ||
| <div class="bio-card__contributor_role">{{ role }}</div> | ||
| <div class="bio-card__contributor_libraries">{{ libraries|join:', ' }}</div> | ||
| </div> | ||
| {% endfor %} | ||
| </div> | ||
| <hr class="card__hr" /> | ||
| {% endif %} | ||
| <div class="card__column markdown-content">{{ markdown|markdown }}</div> | ||
| {% if button_url and button_label %} | ||
| <hr class="card__hr" /> | ||
| <div class="card__cta_section"> | ||
| {% include 'v3/includes/_button.html' with url=button_url label=button_label only %} | ||
| </div> | ||
| {% endif %} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| {% extends 'base.html' %} | ||
| {% load static %} | ||
|
|
||
| {% block title %} | ||
| User Profile | ||
| {% endblock %} | ||
|
|
||
| {% block extra_head %} | ||
| {{ block.super }} | ||
| <link href="{% static 'css/v3/user-profile-page.css' %}" rel="stylesheet" /> | ||
| {% endblock %} | ||
|
|
||
| {% block content %} | ||
| <div class="user-profile__container"> | ||
| <div class="user-profile__profile-card-row"> | ||
| {% with user_info as user %} | ||
|
herzog0 marked this conversation as resolved.
|
||
| {% include 'v3/includes/_user_card.html' with username=user.user_name avatar_url=user.avatar_url badge_name=user.featured_badge.name badge=user.featured_badge.badge member_since=user.member_since role=user.role flag_emoji='🇺🇸' compact=True %} | ||
| {% endwith %} | ||
| <div class="user-profile__button-group"> | ||
| {% include "v3/includes/_button.html" with label="GitHub" url="#" icon_name="pixel-github" icon_position="right" style="secondary" icon_viewbox="0 0 16 16" only %} | ||
| {% include "v3/includes/_button.html" with label="Website" url="#" icon_name="pixel-computer" icon_position="right" style="secondary" icon_viewbox="0 0 16 16" only %} | ||
| {% include "v3/includes/_button.html" with label="Email" url="#" icon_name="pixel-email" icon_position="right" style="secondary" icon_viewbox="0 0 16 16" only %} | ||
| {% include "v3/includes/_button.html" with label="Chat on Slack" url="#" icon_name="pixel-slack" icon_position="right" style="secondary" icon_viewbox="0 0 16 16" only %} | ||
| {% include "v3/includes/_button.html" with label="Edit Profile" url="#" icon_name="pixel-pencil" icon_position="right" style="secondary" icon_viewbox="0 0 16 16" only %} | ||
| </div> | ||
| </div> | ||
| <div class="user-profile__profile-content-area"> | ||
| <div class="user-profile__col"> | ||
| <div class="user-profile__bio"> | ||
| {% include 'v3/includes/_user_profile_bio_card.html' with title='Bio' markdown=bio contributor_data=contributor_data only %} | ||
| </div> | ||
| <div class="user-profile__github"> | ||
| {% with data=github_activity_card_data %} | ||
| {% include 'v3/includes/_markdown_card.html' with title=data.title markdown=data.markdown_text button_url=data.button_url button_label=data.button_label %} | ||
| {% endwith %} | ||
| </div> | ||
| <div class="user-profile__mailing-list"> | ||
| {% with data=mailing_list_activity_card_data %} | ||
| {% include 'v3/includes/_mailing_list_activity_card.html' with title=data.title mailing_list_items=data.mailing_list_items %} | ||
| {% endwith %} | ||
| </div> | ||
| </div> | ||
| <div class="user-profile__col"> | ||
| <div class="user-profile__achievements"> | ||
| {% include "v3/includes/_achievement_card.html" with achievements=achievements_data.achievements primary_button_url="https://www.example.com" %} | ||
| </div> | ||
| <div class="user-profile__badges"> | ||
| {% include "v3/includes/_badges_card.html" with cta_url="#" cta_label="Explore available badges and how to earn them" badges=demo_badges %} | ||
| </div> | ||
| <div class="user-profile__posts"> | ||
| {% include "v3/includes/_post_card.html" with heading="Posts" items=posts variant="card" theme="teal" primary_cta_label=profile_post_cta_label primary_cta_url=profile_post_cta_url %} | ||
| </div> | ||
| <div class="user-profile__connections"> | ||
| {% include "v3/includes/_account_connections_card.html" with connections=account_connections_none_connected %} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {% endblock %} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.