Fix sidebar navigation for non-ASCII localized section headers#26068
Fix sidebar navigation for non-ASCII localized section headers#26068MarkEWaite merged 14 commits intojenkinsci:masterfrom
Conversation
src/main/js/util/dom.js
Outdated
| // If ASCII stripping produces something meaningful, keep old behavior | ||
| if (ascii && ascii !== "-") { | ||
| return ascii; | ||
| } |
There was a problem hiding this comment.
Why is this still here? This seems unnecessary and prone to problems. In particular, a similar problem would occur if there are sections with partially ASCII words.
Admittedly unlikely for the terminology we're using in the default sections, but plugins may add their own IIRC.
…6036) * Update README.md * Update README.md * Update README.md * Remove link to non-existent newsletter Also format with `yarn lint:fix` as noted in the contributing guide. * Update README.md * Update good first issues query * Fix race condition during initial admin account creation * Update core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java Co-authored-by: Copilot <[email protected]> * Use synchronized method for initial admin account creation --------- Co-authored-by: Mark Waite <[email protected]> Co-authored-by: Kris Stern <[email protected]> Co-authored-by: Copilot <[email protected]>
Reinstantiate telemetry for Java properties Signed-off-by: Alexander Brandes <[email protected]>
…ci#26041) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…2.vb_1833c1231d3 (jenkinsci#26042) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…jenkinsci#26043) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…sci#26046) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Update stapler.version to v2065 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…6054) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
|
Please take a moment and address the merge conflicts of your pull request. Thanks! |
|
Hi @daniel-beck This PR is hitting a failure in Security3630Test.testHashMap on Linux JDK 21. The failure seems to come from an unexpected update-center lookup (No download site found) rather than CLI logic touched by this change. Does this look like a known CI / initialization-order issue, or is there a recommended way to avoid triggering this path from UI-related changes? Happy to follow up with fixes once I understand what the test expects. Thanks! |
MarkEWaite
left a comment
There was a problem hiding this comment.
This has passed ATH and PCT testing and has been interactively tested by the submitter. Thanks!
MarkEWaite
left a comment
There was a problem hiding this comment.
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.
/label ready-for-merge
I am withdrawing my Is that intended @AmoghParmar ? Have you confirmed the safety of that change by testing and by code review? |
|
@MarkEWaite In the current UI, the page does not link to these as anchors (i.e., they do not show up in the URL), so there seems to be no negative side effects of encoding them like this. Could you clarify what your concerns are? If we ever want to link there from elsewhere, we'd probably need to switch to locale-independent IDs anyway. |
My concern was that there might be links that refer to these ID values as anchors. I had not considered that if there were links that refer to these ID values, those links would be broken by any localization of the text. Thanks for the clarification. |
|
@MarkEWaite IMO: The latest state only works for locales like English; even Spanish will have the majority of IDs as unreadable strings, so it's not much better than ignoring the "problem" entirely while having more complexity. A different encoding (with behavior perhaps similar to Punycode) would be needed to make partially ASCII strings readable, but I don't think it's worth the effort or complexity. |
Yes. I think that the most recent change should be reverted. |
56fe95f to
9d78384
Compare
|
Hi @MarkEWaite and @daniel-beck, I’ve reverted to the full encoding approach, as discussed. |
daniel-beck
left a comment
There was a problem hiding this comment.
Works well in my local testing, both with Spanish and Traditional Chinese locales. Unlike current releases, I can jump to the last section of a freestyle config in Traditional Chinese now (weekly gets stuck at the first translated entry).
|
@AmoghParmar Thanks for your patience and willingness to adapt, while we figure out how this should be fixed! |
Thanks @daniel-beck for testing and for the kind words. |
MarkEWaite
left a comment
There was a problem hiding this comment.
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.
/label ready-for-merge
|
Congratulations on getting your very first Jenkins core pull request merged 🎉🥳 |
…nsci#26068) * Fix sidebar navigation for non-ASCII localized section headers * Bump minimum supported remoting version (jenkinsci#26034) * Fix race condition during initial admin account creation (jenkinsci#26036) * Update README.md * Update README.md * Update README.md * Remove link to non-existent newsletter Also format with `yarn lint:fix` as noted in the contributing guide. * Update README.md * Update good first issues query * Fix race condition during initial admin account creation * Update core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java Co-authored-by: Copilot <[email protected]> * Use synchronized method for initial admin account creation --------- Co-authored-by: Mark Waite <[email protected]> Co-authored-by: Kris Stern <[email protected]> Co-authored-by: Copilot <[email protected]> * Collect telemetry for Java properties (jenkinsci#26038) Reinstantiate telemetry for Java properties Signed-off-by: Alexander Brandes <[email protected]> * Update dependency com.puppycrawl.tools:checkstyle to v12.3.1 (jenkinsci#26041) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency io.jenkins.plugins:jakarta-xml-bind-api to v4.0.6-12.vb_1833c1231d3 (jenkinsci#26042) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency io.jenkins.plugins:jaxb to v2.3.9-143.v5979df3304e6 (jenkinsci#26043) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency io.jenkins.plugins:checks-api to v402 (jenkinsci#26044) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci.plugins:credentials to v1460 (jenkinsci#26046) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update stapler.version to v2065 (major) (jenkinsci#26049) Update stapler.version to v2065 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.jenkins-ci:version-number to v1.14 (jenkinsci#26054) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Fix sidebar navigation for non-ASCII section headers * Resolve merge conflict with master --------- Signed-off-by: Alexander Brandes <[email protected]> Co-authored-by: strangelookingnerd <[email protected]> Co-authored-by: Pnkcaht <[email protected]> Co-authored-by: Mark Waite <[email protected]> Co-authored-by: Kris Stern <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Alexander Brandes <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Beck <[email protected]>

Fixes #23885
Testing done
This change was manually verified by running Jenkins locally from source with the Japanese locale enabled.
Steps:
fix-23885-sidebar-navigationbranch.This confirms that localized section headers now generate unique DOM IDs and sidebar navigation behaves correctly.
Screenshots (UI changes only)
Before
Clicking ビルド後の処理 scrolls to ソースコード管理 due to both sections resolving to the same DOM ID.
After
Clicking ビルド後の処理 scrolls to the correct section.
Proposed changelog entries
Proposed changelog category
/label bug, web-ui
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@sinceJavadocs, as appropriate.Desired reviewers
@jenkinsci/core-pr-reviewers