Fix Display Issues re: TS#2324
Conversation
WalkthroughThe update restructures the HTML/PHP template for Tailscale key expiry and route approval warnings in the Docker manager plugin. The warning label is now consistently placed before the warning messages, and message texts are wrapped in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php (2)
1188-1193: Unify formatting & i18n for the key-expiry warningThe “expired” branch still outputs raw HTML while the “soon-to-expire” branch was updated to wrap the text in a
<span>.
For consistency (and easier theming), consider wrapping the first message as well and localising the label text while you’re touching this block.-: <b>Tailscale Key expired!</b> <a href="<?=$TS_MachinesLink?>" target='_blank'>Renew/Disable key expiry</a> for '<b><?=$TS_HostNameActual?></b>'. +: <span><b><?=_('Tailscale Key expired!')?></b> + <a href="<?=$TS_MachinesLink?>" target='_blank'><?=_('Renew / disable key expiry')?></a> + <?=sprintf(_("for '%s'."), '<b>'.$TS_HostNameActual.'</b>')?> </span>This keeps the two branches stylistically identical and makes the user-facing strings translatable.
1200-1202: Duplicate “:`” token – minor markdown DL artefactBoth the
<b>_(Warning)_</b>:line and the subsequent:line are part of the description-list syntax, but placing a literal colon inside the bold tag produces two consecutive colons in the rendered HTML (“Warning:: …”).
Dropping the inner one avoids the double punctuation:-<b>_(Warning)_</b>: +<b>_(Warning)_</b>(Existing blocks further up – e.g. Line 1136 – have the same issue; consider fixing globally when convenient.)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php(2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: Squidly271
PR: unraid/webgui#2293
File: emhttp/plugins/dynamix.docker.manager/include/Helpers.php:302-304
Timestamp: 2025-07-11T17:24:33.977Z
Learning: In the Unraid WebGUI Docker manager (emhttp/plugins/dynamix.docker.manager/include/Helpers.php), the xmlSecurity() function call is intentionally commented out to allow users to include < and > characters in their Docker template variables on their own servers. Default templates still explicitly disallow tags, but users can customize templates as needed in their self-hosted environment.
Learnt from: zackspear
PR: unraid/webgui#2230
File: emhttp/plugins/dynamix/include/Templates.php:63-74
Timestamp: 2025-06-03T21:27:15.912Z
Learning: In the Unraid WebGUI codebase (emhttp/plugins/dynamix/include/Templates.php), there are known duplicate ID issues in checkbox templates across multiple template instances that the maintainers are aware of but have chosen not to address due to the effort required for legacy code improvements.
Learnt from: zackspear
PR: unraid/webgui#2258
File: emhttp/plugins/dynamix/DashStats.page:0-0
Timestamp: 2025-06-21T00:10:40.789Z
Learning: In the Unraid webgui codebase (emhttp/plugins/dynamix), replacing `<i>` elements with `<button>` elements for accessibility would require extensive CSS refactoring due to legacy CSS having direct button styles that would conflict with icon-based toggles.
Learnt from: SimonFair
PR: unraid/webgui#1992
File: emhttp/plugins/dynamix/include/CPUset.php:0-0
Timestamp: 2025-02-01T15:12:16.914Z
Learning: In the unRAID WebGUI, button text should be wrapped in _() for translation support and htmlspecialchars() for security, with a preference for using ternary operators for simple conditional text assignments.
Learnt from: zackspear
PR: unraid/webgui#2211
File: emhttp/plugins/dynamix/Eth0.page:531-531
Timestamp: 2025-05-28T00:15:15.116Z
Learning: The Unraid webGUI is migrating from custom CSS classes to Tailwind CSS. The `hidden` class should be preferred over `hide` class as it matches Tailwind CSS conventions. This migration is being done incrementally as part of future-proofing the codebase.
Learnt from: Squidly271
PR: unraid/webgui#0
File: :0-0
Timestamp: 2025-05-31T05:10:13.120Z
Learning: Squidly271 prefers not to receive CodeRabbit reviews or feedback while PRs are in draft status. Only provide reviews after PRs are moved out of draft.
📚 Learning: in the unraid webgui docker manager (emhttp/plugins/dynamix.docker.manager/include/helpers.php), the...
Learnt from: Squidly271
PR: unraid/webgui#2293
File: emhttp/plugins/dynamix.docker.manager/include/Helpers.php:302-304
Timestamp: 2025-07-11T17:24:33.977Z
Learning: In the Unraid WebGUI Docker manager (emhttp/plugins/dynamix.docker.manager/include/Helpers.php), the xmlSecurity() function call is intentionally commented out to allow users to include < and > characters in their Docker template variables on their own servers. Default templates still explicitly disallow tags, but users can customize templates as needed in their self-hosted environment.
Applied to files:
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: the file `emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php` is synced from a ...
Learnt from: zackspear
PR: unraid/webgui#2099
File: emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php:58-74
Timestamp: 2025-03-27T22:04:00.594Z
Learning: The file `emhttp/plugins/dynamix.my.servers/include/activation-code-extractor.php` is synced from a different repository, and modifications should not be suggested in this repository's context. Changes should be proposed in the source repository instead.
Applied to files:
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: in the unraid webgui codebase (emhttp/plugins/dynamix/include/templates.php), there are known duplic...
Learnt from: zackspear
PR: unraid/webgui#2230
File: emhttp/plugins/dynamix/include/Templates.php:63-74
Timestamp: 2025-06-03T21:27:15.912Z
Learning: In the Unraid WebGUI codebase (emhttp/plugins/dynamix/include/Templates.php), there are known duplicate ID issues in checkbox templates across multiple template instances that the maintainers are aware of but have chosen not to address due to the effort required for legacy code improvements.
Applied to files:
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: in the unraid webgui, button text should be wrapped in _() for translation support and htmlspecialch...
Learnt from: SimonFair
PR: unraid/webgui#1992
File: emhttp/plugins/dynamix/include/CPUset.php:0-0
Timestamp: 2025-02-01T15:12:16.914Z
Learning: In the unRAID WebGUI, button text should be wrapped in _() for translation support and htmlspecialchars() for security, with a preference for using ternary operators for simple conditional text assignments.
Applied to files:
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: in the unraid webgui codebase (emhttp/plugins/dynamix), replacing `` elements with `` ele...
Learnt from: zackspear
PR: unraid/webgui#2258
File: emhttp/plugins/dynamix/DashStats.page:0-0
Timestamp: 2025-06-21T00:10:40.789Z
Learning: In the Unraid webgui codebase (emhttp/plugins/dynamix), replacing `<i>` elements with `<button>` elements for accessibility would require extensive CSS refactoring due to legacy CSS having direct button styles that would conflict with icon-based toggles.
Applied to files:
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
📚 Learning: the file emhttp/plugins/dynamix.my.servers/include/web-components-extractor.php is synced from anoth...
Learnt from: zackspear
PR: unraid/webgui#2099
File: emhttp/plugins/dynamix.my.servers/include/web-components-extractor.php:13-19
Timestamp: 2025-03-27T22:04:34.550Z
Learning: The file emhttp/plugins/dynamix.my.servers/include/web-components-extractor.php is synced from another repository and should not be modified directly in the webgui repository.
Applied to files:
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
Summary by CodeRabbit