-
Notifications
You must be signed in to change notification settings - Fork 6
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
CRISTAL-226: Breadcrumb for Nextcloud #336
base: main
Are you sure you want to change the base?
Conversation
* Add NextcloudPageHierarchyResolver
* Update lockfile
* Stop URL encoding page ids * Fix GitHub's backend `getImageURL`
This should be cleaner now. Note: I do not fully understand what the goal was with this process, but sometimes (only with the XWiki backend I believe) this Apparently, Manuel planned to deprecate |
Hi @pjeanjean , it's still not clear to me when should the page id be decoded / encoded and when not. Since you worked on this, maybe you can document somewhere, either in code, or on https://cristal.xwiki.org/ what is the page id for each backend we support (its format, encoding, examples). Then, the way I see it, the page id is specified in the Cristal page URL, so when accessing a Cristal page, we have to extract the page id from the URL and then pass this id to various API, such as the storage API to get the content of the page and its metadata. So there must be a way to encode and decode the page id in the Cristal URL, which is independent of the used backend. Ideally this should be encapsulated in a single component / API (resolve page id from URL and get page URL from page id). Do you know if we have this? Then, with the page id extracted from the URL, each backend is dealing with it differently, because:
But they shouldn't have to decode / encode the full page id. They may have to decode / encode some parts of it, depending on the id format, but not the entire page id. Am I right? |
Jira URL
https://jira.xwiki.org/browse/CRISTAL-226
Changes
Description
FileSystemPageHierarchyResolver
andNextcloudPageHierarchyResolver
throughgetPageHierarchyFromPath()
Clarifications
Considering the page ids with the Nextcloud backends are simple paths, we can reuse the same logic for the breadcrumb as for the FileSystem backend.
Screenshots & Video
Executed Tests
The breadcumb was tested manually with a local Nextcloud instance.
Expected merging strategy