jenkins
jenkins copied to clipboard
Update appearance of keyboard shortcut tooltips
Small one in preparation for #7569. This PR adds a new component for showing keyboard shortcuts, it's currently used in the tooltip for search bars.
https://github.com/jenkinsci/jenkins/assets/43062514/24515d14-b996-4dda-8b9a-4cd27b798b55
This will be used for the Command Palette button too, where hovering over the Search icon will list what shortcuts activate it.
Testing done
- Shortcut and animation display as expected
Proposed changelog entries
- N/A
Proposed upgrade guidelines
N/A
### Submitter checklist
- [ ] The Jira issue, if it exists, is well-described.
- [ ] The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see [examples](https://github.com/jenkins-infra/jenkins.io/blob/master/content/_data/changelogs/weekly.yml)). Fill in the **Proposed upgrade guidelines** section only if there are breaking changes or changes that may require extra steps from users during upgrade.
- [ ] There is automated testing or an explanation as to why this change has no tests.
- [ ] New public classes, fields, and methods are annotated with `@Restricted` or have `@since TODO` Javadocs, as appropriate.
- [ ] New deprecations are annotated with `@Deprecated(since = "TODO")` or `@Deprecated(forRemoval = true, since = "TODO")`, if applicable.
- [ ] New or substantially changed JavaScript is not defined inline and does not call `eval` to ease future introduction of Content Security Policy (CSP) directives (see [documentation](https://www.jenkins.io/doc/developer/security/csp/)).
- [ ] For dependency updates, there are links to external changelogs and, if possible, full differentials.
- [ ] For new APIs and extension points, there is a link to at least one consumer.
Desired reviewers
@jenkinsci/sig-ux
Before the changes are marked as ready-for-merge
:
### Maintainer checklist
- [ ] There are at least two (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 is not blocking the change.
- [ ] Changelog entries in the pull request title and/or **Proposed changelog entries** are accurate, human-readable, and in the imperative mood.
- [ ] Proper changelog labels are set so that the changelog can be generated automatically.
- [ ] If the change needs additional upgrade steps from users, the `upgrade-guide-needed` label is set and there is a **Proposed upgrade guidelines** section in the pull request title (see [example](https://github.com/jenkinsci/jenkins/pull/4387)).
- [ ] 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](https://issues.jenkins.io/issues/?filter=12146)).
/label ready-for-merge
This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.
Thanks!
Subjective design feedback: The animation doesn't look good at the actual size. I first thought it was a bug, in particular on the default (non-dark) theme.
https://github.com/jenkinsci/jenkins/assets/1831569/9eadace4-adf3-4040-95f4-56ad5dac0dd8
Still doesn't work for me.
(The build claims to be 2.434-SNAPSHOT so I'm not running the old one.)
Did you test this before resubmitting for review? If you did, what does the localized file look like?
Works fine for me, there's a prefix and a suffix you need to update, I just fixed up a localisation (e.g. pl
) as an example.
Works fine for me, there's a prefix and a suffix you need to update, I just fixed up a localisation (e.g.
pl
) as an example.
The point is that it needs to be possible to have one of the values be empty (since the approach of two sentence fragments, rather than one sentence with placeholder, is used here). The part after "Press" is a complete sentence is German, starting with the key combination. Think of it as the equivalent of
{0} drücken um zu fokussieren
Specifying Press=
doesn't work.
What about https://github.com/jenkinsci/jenkins/pull/8435/commits/5551fc91f2ec11e3115249223f79b3b0d2bd8526 @daniel-beck?
Seems like a weird hack we should try not to do.
Best I could come up with myself is https://github.com/jenkinsci/jenkins/commit/4bd312d599a3127a536f0550f542ca284ffc3bae and that is only marginally better, as it requires escaping the placeholder (and requires leaving out the <span>
s, but at least those seem to exist for no real reason).
Looks like
Press=' '
would do it, by forcing a single space character. That seems cleaner than either of the above, except it would still produce an almost empty <span>
unless specifically handled.
@daniel-beck I like your single string approach, you happy with this?
@daniel-beck you able to check this please?
@daniel-beck @timja Updated this - big thanks to both of you for the comments and assistance.