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

FEATURE: filter admin sidebar #25853

Merged
merged 12 commits into from Feb 28, 2024
Merged

FEATURE: filter admin sidebar #25853

merged 12 commits into from Feb 28, 2024

Conversation

lis2
Copy link
Contributor

@lis2 lis2 commented Feb 26, 2024

Ability to filter admin sidebar.
The filter can be cleared. In addition, it can be accessed with ctrl+/ shortcut

Desktop demo
https://github.com/discourse/discourse/assets/72780/e3f2d22f-fff0-4770-aefc-00348d539672

Mobile:
Screenshot 2024-02-26 at 11 20 27 am

Ability to filter admin sidebar. Filter can be cleared. In addition, it can be accessed with ctrl+/ shortcut
@github-actions github-actions bot added the i18n PRs which update English locale files or i18n related code label Feb 26, 2024
Copy link
Contributor

@martin-brennan martin-brennan left a comment

Choose a reason for hiding this comment

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

Working nicely, just needs a few tweaks. Very happy with the speed of filtering! Visual bug, the X goes off to the side:

image

I think also when you click the X we should just re-focus the search box.

On mobile, we need to align the search better:

image

Maybe we will not even show this on mobile...not sure yet but at the least it needs alignment.

app/assets/stylesheets/common/base/sidebar.scss Outdated Show resolved Hide resolved
{{#if this.shouldDisplay}}
Copy link
Contributor

Choose a reason for hiding this comment

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

It's super fast ATM doing this, so it's not necessary, but have you tried adding a css class that does display:none instead of adding/removing elements as David suggested? Just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, once it became fast enough, I stopped improving

Copy link
Contributor

@martin-brennan martin-brennan left a comment

Choose a reason for hiding this comment

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

Looking great, just a few more things to fix up. I really like the search taking into account the section headers now, and I love how fast this is 🔥

A minor visual bug with the filter -- it changes height by 1px once you enter text (34 to 35):

image

image

Copy link
Contributor

@martin-brennan martin-brennan left a comment

Choose a reason for hiding this comment

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

Amazing work 👏

@lis2 lis2 merged commit 8b52045 into discourse:main Feb 28, 2024
16 checks passed
@lis2 lis2 deleted the filter-sidebar branch April 1, 2024 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n PRs which update English locale files or i18n related code staff-experience
2 participants