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

Allow linking to pre-filtered plugin manager pages, link from labels/… #4591

Merged
merged 8 commits into from
Apr 19, 2020

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Mar 17, 2020

I think I got some feedback on #4534 somewhere that said the tags/labels should be clickable. Now they are.

This has an interaction with #4580: That PR would show more plugins for a given nontrivial expression, as spaces are separators there, rather than part of a single search term.

Additionally, it might be confusing for users who expect a click on a label to only show plugins with the label to also get results that match the label as a search expression, because that's what this does. Thoughts?

Screenshot

See URL and filter field:

Screenshot

(Note that this is my update center test data from #4588, so only has plugins whose name starts with "a" or "b".)

Proposed changelog entries

  • Allow linking to plugin manager URLs with pre-filled filter field
  • Link labels in the plugin manager to pre-filtered lists

Proposed upgrade guidelines

N/A

Submitter checklist

  • [n/a] JIRA issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • [n/a] For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a JIRA issue should exist and be labeled as lts-candidate

@daniel-beck daniel-beck added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Mar 17, 2020
@@ -77,7 +77,9 @@ THE SOFTWARE.
<div class="plugin-manager__categories">
<j:forEach var="label" items="${p.categories}">
<span class="plugin-manager__category-label">
${app.updateCenter.getCategoryDisplayName(label)}
<a href="?filter=${app.updateCenter.getCategoryDisplayName(label)}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, love that these can be made into hyperlinks. I'd say to inspire us in bootstrap pill buttons (https://getbootstrap.com/docs/4.4/components/badge/#links) and maybe style the background and remove the text underline. I can get some styles going on if you want.

Copy link
Member Author

Choose a reason for hiding this comment

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

I already expected something like that, but it's a waste of time for me to start on before any feedback 😆 Go for it 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Will do, may take a few days if that's OK

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the on-hold label on this one, now that my changes are merged in?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, thanks for the reminder @fqueiruga

@daniel-beck daniel-beck added the on-hold This pull request depends on another event/release, and it cannot be merged right now label Mar 17, 2020
@oleg-nenashev oleg-nenashev added the web-ui The PR includes WebUI changes which may need special expertise label Mar 17, 2020
@daniel-beck daniel-beck removed the on-hold This pull request depends on another event/release, and it cannot be merged right now label Mar 22, 2020
@timja
Copy link
Member

timja commented Mar 28, 2020

This seems to cause a page refresh and all plugins are shown for a couple of seconds and then the filter is applied,

a couple of possible fixs:

  1. no page refresh?
  2. possibly not an issue after Pre-filter the 'Available' plugin manager tab, allow multiple terms #4580 is merged?

@daniel-beck
Copy link
Member Author

This seems to cause a page refresh and all plugins are shown for a couple of seconds and then the filter is applied

Right. Someone else can figure out how to do this via JS. Only ever a problem on the "Available" tab, and only if we reject #4580, as the others will have far fewer entries.

@timja
Copy link
Member

timja commented Mar 28, 2020

This seems to cause a page refresh and all plugins are shown for a couple of seconds and then the filter is applied

Right. Someone else can figure out how to do this via JS. Only ever a problem on the "Available" tab, and only if we reject #4580, as the others will have far fewer entries.

Ok +1 once #4580 is merged

@fqueiruga
Copy link
Contributor

I'm assuming this one is ready to go once the conflicts are resolved right?

@timja
Copy link
Member

timja commented Apr 13, 2020

I'm assuming this one is ready to go once the conflicts are resolved right?

Pretty much, I would like to test it out locally though.

@varyvol varyvol added the unresolved-merge-conflict There is a merge conflict with the target branch. label Apr 16, 2020
@daniel-beck daniel-beck self-assigned this Apr 16, 2020
@daniel-beck daniel-beck removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Apr 16, 2020
@daniel-beck
Copy link
Member Author

New PR comment addition:

Additionally, it might be confusing for users who expect a click on a label to only show plugins with the label to also get results that match the label as a search expression, because that's what this does. Thoughts?

@timja
Copy link
Member

timja commented Apr 16, 2020

This doesn't seem to be working right for me on the available tab, if I click a label it puts the query in the input and focuses it but doesn't do anything till I move the cursor or press the arrow key one to the right.

The available tab seems to be working fine

@daniel-beck
Copy link
Member Author

This doesn't seem to be working right for me on the available tab, …

The available tab seems to be working fine

Where does it work and where doesn't it?

@timja
Copy link
Member

timja commented Apr 16, 2020

Doesn't work properly (the input is focused, and my cursor is blinking there):
image

Available tab is fine

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

LGTM

@timja timja requested a review from a team April 16, 2020 19:49
@daniel-beck daniel-beck removed their assignment Apr 17, 2020
@timja timja added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Apr 17, 2020
@timja
Copy link
Member

timja commented Apr 17, 2020

Thanks for the PR, nice improvement

Let’s merge this in 24 hours if no negative feedback

@timja timja merged commit 7b654b2 into jenkinsci:master Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
5 participants