Repository navigation
feat(xmind): take over formatting, notes, labels, images and folded branches - #429
Merged
Merged
Conversation
XMind maps opened with only their titles, links and markers. Take over what the editor can show as well: - fill, text colour, font size, bold and italic, from the map's theme for the central, main and sub topics and from each topic's own style, read from styles.xml for XMind 8 and from content.json for XMind 2020 and later. Where a topic has a fill but no text colour, contrast the text with the fill as XMind does. - plain-text notes as notes, and labels as tags. - images attached to the map, embedded into the node, scaled to the editor's 200 px maximum. Links to attached files cannot be opened and are left out. Shapes, borders, line styles, boundaries, summaries and relationships have no counterpart in the editor and are still left out, as are font families, since XMind's theme fonts are rarely installed. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
XMind marks folded branches with branch="folded", in content.xml as well as in content.json, but they opened expanded. Collapse them, as the FreeMind import does with its folded nodes. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Member
Author
|
/backport to stable-0.1 |
Merged
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #423.
XMind maps opened with only their titles, links and priority/progress markers, so a styled map looked like a plain outline. This PR takes over everything from an XMind map that the editor has a place for, for XMind 8 (
content.xml+styles.xml) as well as XMind 2020 and later (content.json), which use the same property names (svg:fill,fo:color,fo:font-*):"inherited"for values it takes from the theme, and those fall back to the theme. Where a topic has a fill but no text colour, the text is black or white for contrast, as XMind does..xmindfile (xap:links, XMind 8 inline images, XMind 2020+ topic images) are embedded into the node asdata:URLs, scaled to the editor's 200 px maximum. Links to attached files can't be opened in Nextcloud, so they are left out instead of showing as dead links.branch="folded") open collapsed, as FreeMind's folded nodes already do.Left out, because the editor has nothing to show them with: shapes, borders, line colours and styles, boundaries, summaries, relationships and comments. Font families are left out as well, since XMind's theme fonts (Open Sans, Montserrat, NeverMind) are rarely installed and an unknown font falls back to the browser default.
Tested:
inheritedvalues fall back to the theme, and a folded branch opens collapsed.styles.xmland an attachment. Vitest (113), ESLint and the build pass.XMind 2020+ images, notes and labels are only covered by unit tests, as none of the sample maps had any.
🤖 AI (if applicable)