Story 2304: User Profile UI#2400
Conversation
julioest
left a comment
There was a problem hiding this comment.
Looks great and works well in both states! One small thought: we could drop that duplicate markup (achievements, badges, posts, connections) and let CSS grid do the layout work for us instead.
I tried collapsing it into a single grid with grid-template-areas first, but every row took the height of the taller card across columns and left big gaps under the shorter ones. Two flex columns with display: contents on mobile cleared both problems up: each card renders once, the columns flow independently, and the mobile cascade is just order:.
<div class="user-profile__profile-content-area">
<div class="user-profile__col">
{# bio, github, mailing-list #}
</div>
<div class="user-profile__col">
{# achievements, badges, posts, connections #}
</div>
</div>.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);
}
@media (max-width: 767px) {
.user-profile__profile-content-area {
grid-template-columns: 1fr;
}
/* Lift the column wrappers so the cards become direct grid children */
.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; }
}Tried it locally and each card class shows up once, columns flow independently on desktop, and the mobile cascade orders bio → achievements → badges → github → posts → mailing-list → connections.
Here's a patch for this: pr-2400-dom-duplication-fix.patch
This is slick as heck, implemented. |
837cfbf to
ebee7e1
Compare
herzog0
left a comment
There was a problem hiding this comment.
Looking pretty good! Just a few fixes I think should be applied. Also, can you add some info to the description on how we can see other user's public profiles? I see me in the url, but I wouldn't know what to replace that with in order to see others' users pages.
92a4212 to
d5e1bc2
Compare
herzog0
left a comment
There was a problem hiding this comment.
Just some small nits and a color that must be fixed. Otherwise it looks good!
Thanks for the tooltip work too, that's pretty good to use now!!
| {% elif icon_name == "pixel-pencil" %} | ||
| <path d="M12 1.33334H10.6667V2.66668H9.33337V4.00001H8.00004V5.33334H6.66671V6.66668H5.33337V8.00001H4.00004V9.33334H2.66671V10.6667H1.33337V14.6667H5.33337V13.3333H6.66671V12H8.00004V10.6667H9.33337V9.33334H10.6667V8.00001H12V6.66668H13.3334V5.33334H14.6667V4.00001H13.3334V2.66668H12V1.33334ZM12 6.66668H10.6667V8.00001H9.33337V9.33334H8.00004V10.6667H6.66671V12H5.33337V10.6667H4.00004V9.33334H5.33337V8.00001H6.66671V6.66668H8.00004V5.33334H9.33337V4.00001H10.6667V5.33334H12V6.66668ZM4.00004 10.6667H2.66671V13.3333H5.33337V12H4.00004V10.6667Z" /> | ||
| {% elif icon_name == "pixel-share" %} | ||
| <path d="M2.66671 4H7.33337V5.33333H2.66671V10.6667H7.33337V12H1.33337V4H2.66671ZM13.3334 4H8.66671V5.33333H13.3334V10.6667H8.66671V12H14.6667V4H13.3334ZM11.3334 7.33333H4.66671V8.66667H11.3334V7.33333Z" fill="#050816"/> |
| from . import tasks | ||
|
|
||
|
|
||
| from core.mock_data import SharedResources # noqa: F401 |
There was a problem hiding this comment.
I think this import is not being used anywhere
| padding-left:var(--space-medium); | ||
| padding-right:var(--space-medium); |
There was a problem hiding this comment.
There was a problem hiding this comment.
I agree that this padding does not match the design, but I hope that we can spin this off into its own ticket as I think that this is something of a global problem?
39b5d35 to
ebca0e0
Compare
…e conflict, remove extra argument in user_profile_page.html
…, badges go to one column on mobile
40889e7 to
bd44ea2
Compare


Issue: #2304
Summary & Context
Changes
_user_profile_bio_cardcomponent, which is a variation of a markdown card with space of library contributions_mailing_list_activitycomponent, which lists mailing list activity on a card component.summaryto_post_cardfor use with the empty statePlease list any potential risks or areas that need extra attention during review/testing
Screenshots
Empty:
Desktop:
Dark Mode:

Mobile:

Filled:
Desktop:
Mobile:

Self-review Checklist
Frontend