Conversation
|
/backport to stable25 |
|
|
| </xs:simpleType> | ||
|
|
||
| <xs:simpleType name="route"> | ||
| <xs:restriction base="non-empty-string"> |
There was a problem hiding this comment.
Instead allowing empty, just allow no occurrences of the route tag?🤔
Sounds easier and more straight forward, but might require additional PHP fallbacks
There was a problem hiding this comment.
Was exactly the initial idea, but because this is needed for #36232 for NC25 accessibility, the minimally invasive solution here prevents the need to backport some potentially breaking changes to i.e. https://github.com/nextcloud/server/blob/ca3f53ab88b06c8ceea5d7991ff40641a9820728/lib/private/NavigationManager.php and https://github.com/nextcloud/server/blob/ca3f53ab88b06c8ceea5d7991ff40641a9820728/lib/private/App/InfoParser.php
There was a problem hiding this comment.
Here is the necessary PHP patch:
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php
index b78d9fa1ed8..f24a2f0ac25 100644
--- a/lib/private/NavigationManager.php
+++ b/lib/private/NavigationManager.php
@@ -315,7 +315,8 @@ class NavigationManager implements INavigationManager {
$id = $nav['id'] ?? $app . ($key === 0 ? '' : $key);
$order = isset($nav['order']) ? $nav['order'] : 100;
$type = isset($nav['type']) ? $nav['type'] : 'link';
- $route = $nav['route'] !== '' ? $this->urlGenerator->linkToRoute($nav['route']) : '';
+ $route = $nav['route'] ?? '';
+ $route = $route !== '' ? $this->urlGenerator->linkToRoute($route) : '';
$icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg';
foreach ([$icon, "$app.svg"] as $i) {
try {- For xmllint Signed-off-by: Christopher Ng <chrng8@gmail.com>
2703dd2 to
c8c010b
Compare
|
Superseded by #36508 |
Summary
Some apps register navigation entries with empty routes e.g.
server/apps/user_status/appinfo/info.xml
Line 18 in 9035be6
This allows these entries to pass
xmllintused in https://github.com/nextcloud/.github/blob/ff4a6f1eacb53e4d3b5721e57743eb64242178a7/workflow-templates/lint-info-xml.ymlChecklist