-
Notifications
You must be signed in to change notification settings - Fork 8.6k
UX: display search input and open modal on click #32508
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
Conversation
82b50dc
to
500cd40
Compare
@@ -57,6 +58,10 @@ export default class AdminSidebarStateManager extends Service { | |||
this.sidebarState.isForcingSidebar = false; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need it because importing when I import admin/components/modal/admin-search
in admin-sidebar.js
it was failing for non admin users.
@icon="magnifying-glass" | ||
class="btn-transparent sidebar-search__icon" | ||
/> | ||
{{! template-lint-disable no-pointer-down-event-binding }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need mousedown because mouseup is too late. I want to prevent input to get focus, so when modal is closed, the user cannot type anything into this fake input.
app/assets/javascripts/discourse/app/components/sidebar/panel-header.gjs
Outdated
Show resolved
Hide resolved
app/assets/javascripts/discourse/app/components/sidebar/search.gjs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments but nothing blocking.
In this PR we hide search input. #32485 However, search input is much more intuitive. Therefore, input was brought back and opens modal on click. In addition, search link was removed.
…header.gjs Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
0292973
to
1e58818
Compare
In this PR we hide search input.
#32485
However, search input is much more intuitive. Therefore, input was brought back and opens modal on click. In addition, search link was removed.
Demo:
https://github.com/user-attachments/assets/5b193fab-918e-4a4d-9fdd-97c92c534850
Mobile:
