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

profile: add archived projects section #17571

Merged
merged 10 commits into from
Feb 12, 2025

Conversation

woodruffw
Copy link
Member

This splits the project list in a user's public profile into two groups: "active" and "archived". Both are rendered as before, but archived projects are additionally given their own header (linked to a new help section) and each project is given a little "archived" badge that's identical to the badge elsewhere.

Example render:

Screenshot 2025-02-06 at 4 12 09 PM

CC @miketheman for feedback 🙂

Closes #17550.

Signed-off-by: William Woodruff <william@trailofbits.com>
@woodruffw woodruffw requested a review from a team as a code owner February 6, 2025 21:12
@woodruffw woodruffw added the HTML requires change to HTML files label Feb 6, 2025
@woodruffw woodruffw self-assigned this Feb 6, 2025
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@di di enabled auto-merge (squash) February 7, 2025 19:01
Comment on lines 78 to 79
{% if projects %}
{% if project_count %}
Copy link
Member

Choose a reason for hiding this comment

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

I dug through this, and realized what was bothering me.

After this change, we confirm that there's actual projects, but the way the HTML is structured we end up with two package-list entries, and nothing differentiates them. Could we/should we combine the logic so that there's one instance of a package-list or at least provide some context to the div class that these are active vs archived? Or is that overthinking it for classes that don't have any CSS specific to them right now? (Ignore for a second that the CSS for package-list was removed a long time ago.)

This is not a blocker, but I wanted to note it in case someone thinks it's important for later.

warehouse/accounts/views.py Outdated Show resolved Hide resolved
warehouse/accounts/views.py Show resolved Hide resolved
Signed-off-by: William Woodruff <william@trailofbits.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
auto-merge was automatically disabled February 10, 2025 22:24

Head branch was pushed to by a user without write access

…ofile

Signed-off-by: William Woodruff <william@trailofbits.com>
@di di requested a review from miketheman February 11, 2025 18:53
Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

Last two comments (hopefully)!

tests/unit/accounts/test_views.py Outdated Show resolved Hide resolved
warehouse/accounts/views.py Show resolved Hide resolved
woodruffw and others added 2 commits February 11, 2025 15:07
Co-authored-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: William Woodruff <william@trailofbits.com>
@miketheman miketheman enabled auto-merge (squash) February 11, 2025 20:56
…ofile

Signed-off-by: William Woodruff <william@trailofbits.com>
auto-merge was automatically disabled February 12, 2025 16:27

Head branch was pushed to by a user without write access

@woodruffw woodruffw requested a review from miketheman February 12, 2025 16:27
@miketheman miketheman enabled auto-merge (squash) February 12, 2025 16:28
@miketheman miketheman merged commit a8dd637 into pypi:main Feb 12, 2025
20 checks passed
@miketheman
Copy link
Member

Keep in mind: profile pages are cached for a day, so changes may not be immediately visible if the pages are not cached.

@woodruffw woodruffw deleted the ww/archived-user-profile branch February 12, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML requires change to HTML files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label archived projects as such in public user profiles
3 participants