Skip to content
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

Markmap diagrams: various improvements #1365

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

deining
Copy link
Collaborator

@deining deining commented Jan 24, 2023

This PR brings various improvements for users of markmap mindmaps:

Scope:

@deining deining requested a review from geriom January 24, 2023 15:55
@deining deining force-pushed the markmap-autoactivate branch 2 times, most recently from 8c9342d to b13460d Compare January 24, 2023 16:47
@deining deining force-pushed the markmap-autoactivate branch 4 times, most recently from 14cbd94 to 3cffd89 Compare March 3, 2023 08:55
@huanlin
Copy link
Contributor

huanlin commented Jul 26, 2024

Hello,
Has anyone succeeded setting custom width and height for a markmap? and how?

The only way I found is to modify the scripts.html file:

<style>
.markmap > svg {
  width: 100%;
  height: 300px;
}
</style>

But it is a global setting. It would be great if I can specify the width and height for a specific markmap. I've tried the following syntax but it doesn't work:

```markmap {height: 600}
...
```

Any suggestions?

deining and others added 4 commits July 26, 2024 09:09
@deining
Copy link
Collaborator Author

deining commented Jul 26, 2024

I just worked on this PR again:

  • resolved merge conflicts
  • dropped support for hugo versions < 0.93.0, to make the code base cleaner
  • Reflect adaptions in user guide
    ** dropped content on how to support hugo versions < 0.93.0
    ** bumped markmap to latest version 0.17.0 (when version is manually pinned)

5 checkers are green, the failure of the remaining test is unrelated to the changes introduced with this PR.

This PR enables adjustment of width and height on a per diagram basis, which users ask for.
Can anyone please review this PR so that we can get it merged soon? Thanks.

@deining deining requested review from chalin and LisaFC July 26, 2024 08:12
@deining
Copy link
Collaborator Author

deining commented Jul 26, 2024

Hello, Has anyone succeeded setting custom width and height for a markmap?

I was confronted with the same problem and authored this PR, which addresses and solves that issue.

and how?

This is documented in the preview of the userguide for this PR:

XXX CITATION XXX
If needed, you can define the desired width and/or height of an individual mindmap via code block attributes:

```markmap { height="300px" width="700px" }
# ...
```

XXX END CITATION XXX

Any suggestions?

Kindly ask maintainers/community for review and eventual merge of this PR.

@chalin chalin added this to the 24Q3 milestone Jul 28, 2024
Copy link
Collaborator

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, and updating it. Overall these are good changes, but I noted that the MindMap doesn't seem to render properly anymore. See inline comments for details about this and other things.

/cc @emckean

layouts/partials/scripts.html Outdated Show resolved Hide resolved
assets/scss/markmap.scss Show resolved Hide resolved
userguide/hugo.yaml Outdated Show resolved Hide resolved
userguide/hugo.yaml Outdated Show resolved Hide resolved
layouts/partials/scripts/markmap.html Outdated Show resolved Hide resolved
layouts/partials/scripts/markmap.html Show resolved Hide resolved
layouts/partials/scripts/markmap.html Outdated Show resolved Hide resolved
assets/js/markmap.js Outdated Show resolved Hide resolved
layouts/partials/scripts.html Outdated Show resolved Hide resolved
@deining deining requested a review from chalin July 28, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move markmap script into markmap.js? Is it possible to adjust the height of a rendered markmap?
3 participants