-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Pre-filter the 'Available' plugin manager tab, allow multiple terms #4580
Conversation
function applyFilter() { | ||
var filter = e.value.toLowerCase(); | ||
["TR.plugin","TR.plugin-category"].each(function(clz) { | ||
var encountered = {}; |
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.
encountered
and TR.plugin-category
have been obsolete since #4534.
@@ -10,7 +11,8 @@ time { | |||
|
|||
#filter-container { | |||
margin: 1em; | |||
text-align: right; | |||
text-align: center; | |||
font-size: 2em; |
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.
The search input doesn't seem to fit with the rest of the page to me, did its size need to be increased?
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 did these changes to make it more noticeable. Now there's no way to use the "Available" tab without it, after all. Also larger font size for the placeholder list item.
Whether these need to apply to other tabs too is more questionable.
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.
alternative design:
daniel-beck#2
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.
@fqueiruga PTAL
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'd just go with Tim's design, it's more consistent with the header one. We could also extract it into a searchbox widget in the future.
I don't seem to be able to search by the plugins artifact ID any more? So I used to sometimes search by ID instead, i.e. That seems broken with this change, unless I'm missing something? |
Good point, side effect of searching |
I don't know if this is a good idea. I think it may pose a problem if just one table behaves differently than the other 2. This kind of inconsistency is confusing and may lead to user errors. Thoughts on this? Maybe as an alternative we can have the search input with autofocus. Still does not solve the problem but at least the users are prompted to start searching |
One thing to keep in mind: users do not read. There's a good chance will instinctively think that there are no available plugins or have a bit of confusion. |
Hence giant fonts for everything and search field in the center rather than on the right. |
Still, I find it a bit confusing: empty updates tab means there is nothing to be checked. But the next tab means you need to start typing. TBH I'd find it more useful if we could have a way to filter by categories, now that we sort of have infrastructure for it. |
@fqueiruga Is it the overall design using tabs flowing into the table header row that gives the impression these should all behave alike? Would be help if we did that differently, e.g. as sidepanel items? |
@@ -10,7 +11,8 @@ time { | |||
|
|||
#filter-container { | |||
margin: 1em; | |||
text-align: right; | |||
text-align: center; | |||
font-size: 2em; |
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'd just go with Tim's design, it's more consistent with the header one. We could also extract it into a searchbox widget in the future.
@@ -2,6 +2,7 @@ | |||
background: white url('search.gif') no-repeat 2px center; | |||
padding-left: 20px; | |||
width: 15em; | |||
font-size: 1em; |
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 think this is a case for using the font-size in rems. ems should only be used when the element size depends on where they are (such as hyperlinks or inline monospaced elements)
Recommended font sizes are located on the font.less
file
function applyFilter() { | ||
var filter = e.value.toLowerCase().trim(); | ||
var filterParts = filter.split(/ +/).filter (word => word.length > 0); | ||
var items = document.getElementsBySelector("TR.plugin"); |
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.
getElementsBySelector
is a prototype.js function, and should be avoided. The alternatives are using querySelectorAll
(https://caniuse.com/#search=querySelectorAll). If the browser support is not good enough (especially due to Baidu-browser support, then I suggest using getElementsByClassName('plugin')
and filter out the elements that are not <tr>
within the function.
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.
Unchanged from before, just threw out the other, obsolete selector
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.
Looks like I didn't read the diff properly then 👍
I think that it is part of why they feel that they should behave the same, but also because they use rather similar tables. TBH I think they should still be tabbed, I think it would sort of hide the options if moved into the sidebar |
@daniel-beck what is the state of this PR? TBH I feel that showing nothing on the available tab by default is a degradation, maybe we can get some more comments on this (even raise it on a UX SIG meeting. The multi-term search is really interesting though, and the text copy changes are on point. I believe we should move forward with these. If we can include the filter bar changes that @timja created on daniel-beck#2 it would be even better. |
I think there should be a way to work around that feeling. I tried it by making the search more noticeable and adding the placeholder with large text, but clearly that wasn't received well.
|
TBH I don't think there are good options here that don't merit of a full page revamp. Adding this much used tab to the sidebar can be confusing, it's sort of hiding it. One thing I believe would improve the situation tough is to add an |
TBH I think the reaction was more due to styling than anything else (the search box looked a bit out of place like if that part of the page was zoomed in). Tim's proposal of a search box is noticeable enough and looks like the one on the navbar (helps with UI consistency). |
@fqueiruga Could you clarify whether a pre-filtered view is possible with timja's PR, or whether neither that nor this PR currently have are good enough to make pre-filtering work?
#4591 remains unmerged. I wonder whether we could rely on the "label linking" feature implemented there, and do something like:
|
From what I can tell this isn't fixed yet? Apart from that I think the autofocus has made it more usable along with the search input being made more prominent Possibly mentioning the filters above could help |
True.
Unclear, could you explain? |
I just meant this comment,
showing that you can filter by labels would be helpful imo |
Depends on another unmerged PR to work: #4591 Would see that as followup unless we consider it essential to make this PR work. |
👍 I'm happy with this PR except for the not being able to search by artifactId |
Will cause lots of 'false positives' for some search terms, but can always be cleaned up later through more fine-grained control what can be searched (e.g. textContent + artifactId)
I've updated the screenshots, any other feedback @jenkinsci/core-pr-reviewers ? |
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 think it is a great first step, the list of all plugins was not really usable anyway (and it was a long rendering time contributor). It also enables future additions to the view, e.g.
- Listing of categories and suggestions similarly to the Installation Wizard (reusing code is not trivial IIUC)
- Listing of labels based on installed plugins and ranking
- Cool UI features like Label cloud (similarly to Add a plugin tag cloud to the front page and search windows jenkins-infra/plugin-site#137 )
I plan to merge it tomorrow if no negative feedback |
FTR its still slow as it loads all the plugins but just hides them and then does filtering client side.
|
I read it as "embed plugins.jenkins.io frontend into Jenkins so that we have focus efforts on a single great UI/UX". Which would be a valiant goal indeed |
@daniel-beck @timja I resolved the merge conflict with #4580 . Would appreciate a second look before I merge it |
|
Tested locally after the last merge fixup ^^, good to go if the build passes |
This is breaking any Acceptance Test trying to install a plugin. |
Filed https://issues.jenkins-ci.org/browse/JENKINS-63326 about the text... |
fixup '%search' and '%filter' case sensitive in src/main/resources/hudson/PluginManager in table_xxx.properties and installed_xxx.properties files I found the "filter" startswith a capital letter, so I choose to the upper case. the "search" is not in any properties files, both upper and lower case are OK, in order to keep the style same I choose the upper case too. this PR is fixup for jenkinsci#4580
fixup '%search' and '%filter' case sensitive in src/main/resources/hudson/PluginManager in table_xxx.properties and installed_xxx.properties files I found the "filter" startswith a capital letter, so I choose to the upper case. the "search" is not in any properties files, both upper and lower case are OK, in order to keep the style same I choose the upper case too. this PR is fixup for jenkinsci#4580
There are three similar looking tabs in the plugin manager:
The first and third have a fairly limited number of list entries (typically at most dozens and very low hundreds, respectively), all of which are relevant to administrators in different ways (updates and installed), while the second has a very large number of list entries (almost more than 1000) with a very low average/median relevance to users.
This PR implements a change that hides all elements on the "Available" tab by default, and users are reminded to use the "Search" field to make plugins appear. Search expressions need to be two characters minimum (to support searching for "JS" – sorry R!).
Implementation is fairly hacky, since we're doing all the searching/filtering client-side, we just now hide all rows in the form by default (they're still loaded, but at least not rendered!). Didn't want to bother with a full rewrite here, I lack the mad design skillz to pull off an actually good plugin manager anyway!
Screenshots
Updates tab - unfiltered (largely unchanged)
Updates tab - slightly filtered, still supports 1 char filters (largely unchanged)
Available tab - unfiltered and empty except for a reminder to use the search field
Available tab - unfiltered with 1 character in search field
Available tab - filtered with 2 characters in search field
Available tab - we now support multiple individual search terms
Search vs. Filter
I left the "Filter" term on the UI for Updates and Installed, because there's a list that we filter.
"Search" is the new term for "Available" only, since we're starting out with nothing.
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate