Skip to content

Conversation

@arshinsikka
Copy link

@arshinsikka arshinsikka commented Aug 3, 2025

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:

  • Adds a new test site under packages/core/test/tricky-site/
  • Contains individual .md pages for testing rendering of:
    • <table> elements with/without <tbody>
    • <mermaid> flowchart rendering
    • <puml> plugin rendering (inline, named, and external)
    • Shorthand syntax conversion (<span heading><span slot="header" ...>)
    • <tree> plugin rendering directory-like structures
    • Auto-anchor injection into heading elements
  • Includes a clean index.md for navigation and a complete _site.json
  • Test site is self-contained, buildable, and does not interfere with main docs/tests

Anything you'd like to highlight/discuss:

  • Let me know if you'd prefer the site be renamed (e.g. render-corner-cases) or placed under a different path.
  • This can be extended in future PRs to include more edge cases.

Testing instructions:

To test the site locally:
npx markbind serve packages/core/test/tricky-site
Navigate to each page and confirm that the rendering reflects expectations.

Proposed commit message: (wrap lines at 72 characters)

feat(test-site): add tricky rendering cases for table, diagrams, plugins

Adds a reusable test site under packages/core/test/tricky-site
to visualize rendering of tricky or previously buggy scenarios.
Includes pages for <table>, <mermaid>, <puml>, shorthand syntax,
tree plugin, and auto-anchors. Helps contributors manually test
and verify rendering behavior when working on plugins or layout.


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the [SEMVER](https://semver.org/) impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):
Not applicable

Copy link
Contributor

@AgentHagu AgentHagu left a comment

Choose a reason for hiding this comment

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

Hi @arshinsikka, thanks for adding the new site. However, there are a few issues regarding the new site.

  1. Test sites should be added under packages\cli\test\functional and the testSites.js file should be updated to include the new site
  2. The test site you added doesn't seem to be a valid MarkBind site folder, remember to run markbind init to set it up properly

You can refer to the developer guide for more details. Once the following issues are addressed, I can take a closer look at the test site content you've added.

Copy link
Contributor

@gerteck gerteck left a comment

Choose a reason for hiding this comment

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

Good work exploring the different features of MarkBind and coming up with some sample syntax.

Some comments:

To test the site locally:
npx markbind serve packages/core/test/tricky-site

Running this on your branch, I get:

npx markbind serve packages/core/test/tricky-site
  __  __                  _      ____    _               _ 
 |  \/  |   __ _   _ __  | | __ | __ )  (_)  _ __     __| |
 | |\/| |  / _` | | '__| | |/ / |  _ \  | | | '_ \   / _` |
 | |  | | | (_| | | |    |   <  | |_) | | | | | | | | (_| |
 |_|  |_|  \__,_| |_|    |_|\_\ |____/  |_| |_| |_|  \__,_|

 v6.0.2
error: Config file not found at user specified root C:\......\markbind\packages\core\test\tricky-site
error: This directory does not appear to contain a valid MarkBind site. Check that you are running the command in the correct directory!

Edit, noticed your path is missing unit as well, i.e. packages\core\test\unit\tricky-site.

As per @AgentHagu ^ on this.

Additionally, I am not sure if you are aware / have done so, but try loading the test jumbotron by doing, :

markbind serve packages\cli\test\functional\test_site

There are some existing functional testcases such as plantuml diagrams, mermaid diagrams, auto-anchors which this PR seeks to add that you can take a look at!

Additionally, I think you could reconsider if these added sites fall under the scope of unit tests. Perhaps it could be more effective and helpful to implement any additional tricky rendering cases as automated tests that catch for regressions as well.

While considering these aspects, if you have any suggestions to make the testing more modular, simpler, easier to understand, more documentation, do feel free to check out existing issues, comment on them your findings, or open a unique issue!

@arshinsikka
Copy link
Author

Update
• Moved the test site to packages/cli/test/functional/tricky-site and registered it in testSites.
• Converted it into a valid MarkBind site (site.json) with plugins: anchors, mermaid, plantuml, tree; listed all pages.
• Added the missing activity.puml referenced by plantuml-diagrams.md.
• Removed the earlier folder under packages/core/test/unit.
• Added one-line notes clarifying intentional edge cases (headers inside , duplicate tree entries).
Happy to split any parts into unit tests or rename the site if you prefer.

@gerteck
Copy link
Contributor

gerteck commented Sep 14, 2025

Hi @arshinsikka thanks for continuing the dev effort! We appreciate new devs working on this project! However, I couldn't see the changes you mentioned reflected in the PR

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.

3 participants