Skip to content

Conversation

rafrdz
Copy link
Contributor

@rafrdz rafrdz commented Aug 26, 2025

Summary

In this pull request we're adding a user selector dropdown to the templates page that allows an admin to select a user. The selected user will be used in the author:<username> filter to filter the templates list by a template author.

Closes: #19547

Changes

Admin View - Can view all users

Screenshot 2025-08-26 at 5 24 07 PM

Admin View - Using the user filter

templates-user-filter.mov

User view - Cannot view all users

Screenshot 2025-08-26 at 5 25 38 PM

Testing

  • Added storybook test for viewing the templates page with a user dropdown

Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

I think this is overall fine. I'm just a little concerned that we're slapping band-aids on some critical code, rather than tightening it up. At the same time, I don't think it's reasonable to shove a bunch of changes into this PR

I'm okay with approving most of this, but I'm wondering if @BrunoQuaresma has any extra context for some small wins we can sneak in to make the code a little cleaner


interface TemplatesFilterProps {
filter: ReturnType<typeof useFilter>;
filter: UseFilterResult;
Copy link
Member

Choose a reason for hiding this comment

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

Much better. Thank you!

@BrunoQuaresma
Copy link
Collaborator

BrunoQuaresma commented Aug 28, 2025

I'm good with the changes 👍 About the filter complexity, we def need to refactor it to make it simpler and easier to use. I think we talked about this sometime ago but no one was interested on moving this forward.

@rafrdz rafrdz requested a review from Parkreiner August 28, 2025 16:28
@Parkreiner
Copy link
Member

@rafrdz Yeah, I don't think the new widths are quite right. I'm going through the code now to figure out what caused the change

Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

I think we're pretty close and just need a few small changes

I'm going to approve to keep you unblocked, but if you need anyone to look over the stories, feel free to message me on Slack

Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Whoops, actually approving

@Parkreiner
Copy link
Member

Parkreiner commented Aug 28, 2025

@BrunoQuaresma Yeah, sometime today or tomorrow, I can try to open up an issue about refactoring the setup. I'm going to be working on Backstage stuff pretty soon, but once that's wrapped up, I should have some bandwidth to work on updating all this

@rafrdz rafrdz merged commit 95dccf3 into main Aug 28, 2025
32 checks passed
@rafrdz rafrdz deleted the rafrdz/template-author branch August 28, 2025 18:59
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve templates list to focus on template authors
3 participants