-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Query Field: Separates query field from the pagination part #3766
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3766 +/- ##
==========================================
+ Coverage 91.64% 91.68% +0.03%
==========================================
Files 633 636 +3
Lines 37802 37970 +168
Branches 3985 3994 +9
==========================================
+ Hits 34644 34812 +168
- Misses 2124 2125 +1
+ Partials 1034 1033 -1
|
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.
There are accessibility issues in these changes.
Ah nice. AccessLint is a good addition. I will add the fixes for them. |
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.
@nijel My reason for submit button is showing a button makes it clear that it needs some user action (click or enter) for the search results to come up. Without a button, users might expect the search results to show up as they type which is not what happens. So I think a submit button makes the intent clear that you need to |
The reason I ask is that I'd never use it - when typing the query on keyboard, it is more natural to just press enter. It also seems to be common pattern these days: Looking at it, I like way GitLab does sorting - the ordering is shown in the text and next to it there is an icon indicating and toggling direction - the icon also makes it clear that the dropdown controls ordering. Try it at https://gitlab.com/mailman/mailman/-/issues?sort=created_date |
@nijel we do have an icon, though it's not the best sorting icon given that it kind of indicates ordering by alphabet. I will try and replace it for something better and also add the display of the current ordering.
Agreed. Cool, I will remove it for now. Can always add it back if users find it unintuitive. |
Did some more testing:
|
@nijel on it. |
Separates the query search field from the pagination part and adds filters and sorting options in UI
- add delay before screenshots to avoid capturing transitions - revert to original search for other tests
Looks good now. Some minor issues I see:
|
Will get this fixed
Since when we go to the translate page in the beginning, there is no sorting selected (only the default sort is applied). So it just shows Sort By (as default) for users to select a sorting order.
Should add this. Should I just name this as
I have noticed this as well. The reason why this happens is, if the url has a GET parameter like
So you mean not to autosubmit in site wide search but only on the translate pages? |
It should always show the current ordering to be consistent. Even if it is the default one.
Maybe "Priority and position"
This should be addressed by abe6e59d6f881814c8d4220ec2da8ec0dd72800b (I didn't yet test it together with your changes).
I think it makes sense whenever showing the search results (for example here: https://hosted.weblate.org/search/?q=+has%3Asuggestion+&checksum=&offset=), but not when creating the query for the first time (for example here: https://hosted.weblate.org/#search). |
weblate/static/style-bootstrap.css
Outdated
display: none; | ||
} | ||
#query-sort-dropdown { | ||
width: 200px; |
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.
Hard-coding width will probably go wrong in some translation. Can this be dynamic?
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.
It can be dynamic, but it will constantly resize based on the width of the test in the button. I checks in all different device widths and seems to work fine. I am okay with just keeping it dynamically change to fit the width of the text.
@nijel Just pushed some bootstrap changes. Please check if things look better. Also made the copy change. |
Not sure because I am not adding any custom CSS. Need to test and check. Might need to add some custom CSS by adding another class
Will take a look. |
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.
We're getting closer :-).
Thanks, now it seems to work fine. I'd like to address some additional issues:
|
I'm now getting js errors on search entry page:
|
Merged, thanks for your contribution! |
Separates the query search field from the pagination part and adds filters
and sorting options in UI
Before submitting pull request, please ensure that: