Repository navigation
Restoring ability to use custom css - #432
Conversation
|
Hi @fxmw11 sorry for breaking the feature, didn't have this in mind with the last commit that completely removed it which had been due to the fact that the app itself didn't need the css file any longer. Another thing (I can sign it as an alternative) woudl be if you coudl sign your commit: To add your Signed-off-by line to every commit in this branch:
|
Signed-off-by: Felix <felix.nz@hotmail.de>
The editor linked themes/<theme>/apps/files_mindmap/css/style.css on every instance, and without a theme as /themes//apps/..., so most instances requested a missing file each time a mind map opened. It also read the theme through the private OC_Util. Work out the stylesheet in the controller instead: read the theme from the system config, fall back to the default theme as the server does, and pass the URL to the template only if the file exists, with its modification time so changes to it are not cached. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de> Signed-off-by: Felix <felix.nz@hotmail.de>
The theme stylesheet came before the template's inline styles, so for rules of equal specificity, such as #menu-header .btn, the inline styles won and the theme could not override them. Link it last. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de> Signed-off-by: Felix <felix.nz@hotmail.de>
|
Well, customizing the editor styles is not an essential feature of the app. So no big issue that it was broken temporarily. However, as Custom CSS cannot be applied to the editor due to its iframe structure, I think it would be helpful to have such a styling option implemented natively within the app. I have no idea if this is the preferred way to implement custom styling. But in NC 25, it works as expected. |
|
Justi asking to be sure, you mentioned it v25. Is that a typo and you mean v35? Aksing because I the latest releases support 32-35 and 25 is end of life since some years. Or did you test this on 25? |
|
I meant v35, sorry for the confusion... |
|
/backport to stable-0.1 |
|
@fxmw11 thanks again for the PR, merged, backported and released with the pre-release 0.1.5-beta.1 https://github.com/nextcloud-releases/files_mindmap/releases/tag/v0.1.5-beta.1 Should pop up in the app store within 1 hour. |
Adding custom CSS to the iframe was introduced in #120 to allow styling the editor without failing the integrity check (e.g. to hide the auto-save feature from users to prevent them from disabling it and losing data)
Custom styling was removed in e832d95 and 92f5388
This commit restores the ability of custom styling that is persistant across updates