Skip to content

Restoring ability to use custom css - #432

Merged
AndyScherzinger merged 3 commits into
nextcloud:mainfrom
fxmw11:main
Oct 23, 2026
Merged

AndyScherzinger merged 3 commits into
nextcloud:mainfrom
fxmw11:main

Conversation

@fxmw11

@fxmw11 fxmw11 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

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

@AndyScherzinger

Copy link
Copy Markdown
Member

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.
I did add 2 commits to ensure there aren't 404s in the logs given that most people nmight not have a customer theme to override things. So if you could check it / test it if possible that be great.

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:

fxmw11 and others added 3 commits October 23, 2026 23:35
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>
@fxmw11

fxmw11 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

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.

@AndyScherzinger

AndyScherzinger commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

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?

@AndyScherzinger AndyScherzinger added the AI assisted This PR contains AI-assisted commits label Oct 23, 2026
@fxmw11

fxmw11 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

I meant v35, sorry for the confusion...

@AndyScherzinger
AndyScherzinger merged commit 8468ab1 into nextcloud:main Oct 23, 2026
7 of 9 checks passed
@AndyScherzinger

Copy link
Copy Markdown
Member

/backport to stable-0.1

@AndyScherzinger

Copy link
Copy Markdown
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release AI assisted This PR contains AI-assisted commits bug Something isn't working regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants