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

Modernize build status and weather icons #5065

Merged
merged 37 commits into from
Mar 9, 2021
Merged

Conversation

timja
Copy link
Member

@timja timja commented Nov 20, 2020

See JENKINS-XXXXX.

Try me out with:

docker run --rm -ti -p 8080:8080 -e ID=5065 -e MERGE_WITH=master jenkins/core-pr-tester

image

image

image

image

image

image

Proposed changelog entries

  • Entry 1: Add modern icons: build status, weather
  • Entry 2: Developer: Add support for plugins to use external SVG sprites in their icons, see github-branch-source-plugin/pull/393 for an example
  • ...

Proposed upgrade guidelines

Green Balls Plugin is no longer compatible with the new icons. If you use the plugin on your instances, it can be disabled or removed.

Submitter checklist

  • (If applicable) 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
  • 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 must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@timja timja changed the title Add support for svg icons in actions Add support for svg icons in l:icon and update management links Nov 20, 2020
@fqueiruga
Copy link
Contributor

Looks great! I've got some quick feedback before being able to take a deeper look into it:

  • I think it would be best to separate the inlining of the icon-set library from the actual changes, in different PRs. That way it would be cleaner to see the modifications. The first one could also go through quicker.
  • I have some ideas in mind regarding how to support the action icons in a backwards-compatible way, just modifying IconSet to avoid needing to modify calls to l:icon that pass icon classes. I also think the way to go is make use of svg sprites and the l:svgIcon tag within the l:icon template. I could try to flesh this out more but I think it would be easier on a different branch / PR than the library inlining.

Amazing PR anyway 🎉

@timja timja mentioned this pull request Nov 23, 2020
10 tasks
@fqueiruga
Copy link
Contributor

I'm running the PR locally. I have noticed that the credentials icon under the /manage page are missing. I think it has to do with them being set on the credentials-plugin using IconSet. the l:icon helper is setting the proper IRC. Can this be a possibility?

Captura de pantalla 2020-11-23 a las 13 03 39

@timja
Copy link
Member Author

timja commented Nov 23, 2020

I'm running the PR locally. I have noticed that the credentials icon under the /manage page are missing. I think it has to do with them being set on the credentials-plugin using IconSet. the l:icon helper is setting the proper IRC. Can this be a possibility?

Captura de pantalla 2020-11-23 a las 13 03 39

using this approach the plugin would need to be updated to provide an SVG and use that instead of the image it's currently using, (it could check the jenkins version to decide which one to use)

@fqueiruga
Copy link
Contributor

fqueiruga commented Nov 23, 2020

Is there no way we can make it backwards compatible and not require changes plugin-side? There are quite a few Plugins that do use IconSet

@timja
Copy link
Member Author

timja commented Nov 23, 2020

Is there no way we can make it backwards compatible and not require changes plugin-side? There are quite a few Plugins that do use IconSet

yeah I haven't really worked on the /manage side yet, that was just a quick 5 minute job.
I mostly worked on the icons in the sidebar

It can definitely be fixed just a POC atm.

I expect changes on plugin side will still be needed to start using svgs, but it'll be backwards compatible, as in they can keep using pngs / gifs if they want

@fqueiruga
Copy link
Contributor

Got it 🎉

@timja timja changed the title Add support for svg icons in l:icon and update management links Add support for svg icons in l:icon Nov 28, 2020
@timja
Copy link
Member Author

timja commented Nov 28, 2020

the diff of just this PR can be seen at: timja#29

Copy link
Member

@daniel-beck daniel-beck left a comment

Choose a reason for hiding this comment

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

The current state is a reasonable start that doesn't look unfinished more than it needs to.

Everything that's currently slightly off (see previous comment) should be straightforward enough to amend without requiring any expensive drawing of new icons, so 👍 from me.

@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 Mar 8, 2021
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Looks good in the PR tester. Note that the status icons are also used in Job type logos. Would be nice to eventually update them.

image

Compatibility notes

The change makes the Green Balls plugin defunct because of the filter implementation in https://github.com/jenkinsci/greenballs-plugin/blob/master/src/main/java/hudson/plugins/greenballs/GreenBallFilter.java . It is not a blocker in any means, but it worth documenting the impact in the upgrade guidelines (that the plugin can be disabled, unless it is adapted to the new format). CC @nfalco79

@oleg-nenashev oleg-nenashev added the upgrade-guide-needed This changes might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed label Mar 8, 2021
@timja
Copy link
Member Author

timja commented Mar 8, 2021

Green balls is no longer needed after this change really, this implements what the plugin does in core at least for the 'balls'

@nfalco79
Copy link
Member

nfalco79 commented Mar 8, 2021

I see from screenshot the plugin provides green checks for passed build so the "Green Balls" plugin became useless

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Mar 8, 2021 via email

@timja timja merged commit 037e137 into jenkinsci:master Mar 9, 2021
@timja timja deleted the svg-icons branch March 9, 2021 08:09
@timja timja changed the title Initial new icons Modernize build status and weather icons Mar 9, 2021
icons.addIcon(new Icon("icon-secure icon-lg", "32x32/secure.png", Icon.ICON_LARGE_STYLE));
icons.addIcon(new Icon("icon-setting icon-lg", "32x32/setting.png", Icon.ICON_LARGE_STYLE));
icons.addIcon(new Icon("icon-star-gold icon-lg", "32x32/star-gold.png", Icon.ICON_LARGE_STYLE));
icons.addIcon(new Icon("icon-star icon-lg", "32x32/star.png", Icon.ICON_LARGE_STYLE));
icons.addIcon(new Icon("icon-user icon-lg", "32x32/user.png", Icon.ICON_LARGE_STYLE));
icons.addIcon(new Icon("icon-yellow icon-lg", "32x32/yellow.png", Icon.ICON_LARGE_STYLE));
icons.addIcon(new Icon("icon-user icon-lg", "32x32/user.gif", Icon.ICON_LARGE_STYLE));
Copy link
Member Author

Choose a reason for hiding this comment

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

icons.addIcon(new Icon("icon-installer icon-xlg", "48x48/installer.png", Icon.ICON_XLARGE_STYLE));
icons.addIcon(new Icon("icon-lock icon-xlg", "48x48/lock.png", Icon.ICON_XLARGE_STYLE));
icons.addIcon(new Icon("icon-monitor icon-xlg", "48x48/monitor.png", Icon.ICON_XLARGE_STYLE));
icons.addIcon(new Icon("icon-network icon-xlg", "48x48/network.png", Icon.ICON_XLARGE_STYLE));
icons.addIcon(new Icon("icon-nobuilt icon-xlg", "48x48/nobuilt.png", Icon.ICON_XLARGE_STYLE));
icons.addIcon(new Icon("icon-notepad icon-xlg", "48x48/notepad.png", Icon.ICON_XLARGE_STYLE));
icons.addIcon(new Icon("icon-notepad icon-xlg", "48x48/notepad.gif", Icon.ICON_XLARGE_STYLE));
Copy link
Member Author

Choose a reason for hiding this comment

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

@uhafner
Copy link
Member

uhafner commented Mar 11, 2021

I have just seen that we forgot to change BallColor as well.

@timja
Copy link
Member Author

timja commented Mar 11, 2021

I have just seen that we forgot to change BallColor as well.

What would get changed there? I think I remember you mentioning in a ux-sig meeting at some point that it was used to build a palette somewhere.

@uhafner
Copy link
Member

uhafner commented Mar 11, 2021

It provides the build status images as Java API. Example output of Jenkins 2.283:

Bildschirmfoto 2021-03-11 um 17 51 37

They should map to the new images as well.

@jglick
Copy link
Member

jglick commented Mar 11, 2021

At least

return Stapler.getCurrentRequest().getContextPath()+ Jenkins.RESOURCE_PATH+"/images/"+size+'/'+image;

@timja
Copy link
Member Author

timja commented Mar 11, 2021

The new ones aren't images though they are styled svgs, possibly the old APIs need deprecating and new ones created, should be tracked in Jira as a follow up enhancement I think

@chinhodado
Copy link

chinhodado commented Mar 12, 2021

I just upgraded Jenkins to 2.283 and I can't say I'm a fan of this change.

Before, I can easily tell the icons from each other at a glance since they have different colors:

image

Now it's just the same shade of blue:

image

Can we make these icons have different colors please? Or add an option to have the old icons back. There are serious usability issue with the new icons when they're all the same color.

@apottere
Copy link

apottere commented Mar 15, 2021

Agree with @chinhodado, I love the new build status icons but the weather ones need some color variation, even just a little.

Edit: Maybe just make the clouds gray and increasingly darker gray as they get worse? They are storm clouds after all 🌧️

@daniel-beck
Copy link
Member

Please provide feedback for changes through the issue tracker.

@apottere
Copy link

@daniel-beck the ticket linked in the PR is https://issues.jenkins.io/browse/JENKINS-XXXXX, which doesn't seem to exist (understandably). Did you mean I should instead open a new issue for this feedback?

@daniel-beck
Copy link
Member

daniel-beck commented Mar 15, 2021

@apottere Yes, please, if there isn't one already.

@apottere
Copy link

@Hedede
Copy link

Hedede commented Mar 23, 2021

Please let me have the old icons back.

@jenkinsci jenkinsci locked as off-topic and limited conversation to collaborators Mar 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
major-rfe For changelog: Major enhancement. Will be highlighted on the top plugin-api-changes Changes the API of Jenkins available for use in plugins. ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback upgrade-guide-needed This changes might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
Development

Successfully merging this pull request may close these issues.