Skip to content

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Dec 17, 2024

The content of the new page is an extract of the main README file.
In the the main README file, also fix a few typos, enhance readability and structure.

Screenshots

initial proposal final
image image

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced a new documentation file for demos and examples related to the maxGraph library.
  • Bug Fixes

    • Corrected typographical errors in the README.md file for improved clarity.
  • Documentation

    • Enhanced readability and structure of the README.md.
    • Expanded examples section to include integration notes and requirements.
    • Updated the content of the demo-and-examples documentation for better organization and clarity.
  • Chores

    • Adjusted the sidebar positions in various documentation files for better navigation.

Its content is close to that of the main README file.
Also fix a few typos in the main README file.
@tbouffard tbouffard added the documentation Improvements or additions to documentation label Dec 17, 2024
@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2024

Walkthrough

This pull request focuses on documentation improvements for the maxGraph library. The changes primarily involve updating the README.md, creating a new demo-and-examples.md file, and adjusting the positioning of various documentation categories. The modifications enhance clarity, correct typographical errors, and provide more comprehensive examples and guidance for users of the library.

Changes

File Change Summary
README.md - Corrected typographical errors (e.g., "webiste" to "website")
- Refined language for clarity
- Expanded examples section and added a note on CSS/images requirements
packages/website/docs/demo-and-examples.md - New documentation file added
- Provides overview of demos and examples
- Includes links to Storybook, TypeScript, and JavaScript examples
packages/website/docs/development/_category_.json - Updated category position from 3 to 13
packages/website/docs/known-issues.md - Changed sidebar_position from 10 to 20
packages/website/docs/manual/_category_.json - Updated category position from 1 to 11
packages/website/docs/usage/_category_.json - Updated category position from 2 to 12

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e3c9480 and daea63a.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
README.md (2)

146-146: Fix typo in webpack name

The word "Webapck" is misspelled. It should be "Webpack".


Line range hint 142-155: Consider improving the examples section structure

The examples section could be better organized by grouping related examples together. Consider using subsections:

  1. Interactive Demos (Storybook)
  2. TypeScript Examples
  3. JavaScript Examples
  4. Framework Integration Examples

Here's a suggested structure:

 For more complete examples than the "Getting started" example, please have a look at:
 
+## Interactive Demos
 - the [storybook stories](packages/html/stories) which demonstrates various features of maxGraph.
   - The stories are currently written in `JavaScript` and will be progressively migrated to `TypeScript`.
   - A live instance is available on the [maxGraph website](https://maxgraph.github.io/maxGraph/demo).
 
+## TypeScript Examples
 - the [ts-example](packages/ts-example) project/application that demonstrates how to define and use custom `Shapes` with `maxGraph`. It is a vanilla TypeScript application built by [Vite](https://vitejs.dev/).
 - the [ts-example-without-defaults](packages/ts-example-without-defaults) project/application that demonstrates how to not use defaults plugins and style defaults (shapes, perimeters, ...). It is a vanilla TypeScript application built by [Vite](https://vitejs.dev/).
 
+## JavaScript Examples
 - the [js-example](packages/js-example) project/application that demonstrates how import and export the `maxGraph` model with XML data. It is a vanilla JavaScript application built by [Webpack](https://webpack.js.org/).
 - the [js-example-without-defaults](packages/js-example-without-defaults) project/application that demonstrates how to not use defaults plugins and style defaults (shapes, perimeters, ...). It is a vanilla JavaScript application built by [Webpack](https://webpack.js.org/).
 
+## Framework Integration
 - the https://github.com/maxGraph/maxgraph-integration-examples repository which shows how to integrate `maxGraph` with different frameworks and build tools.
🧰 Tools
🪛 LanguageTool

[locale-violation] ~142-~142: In American English, “take a look” is more commonly used.
Context: ...n the “Getting started” example, please have a look at: - the [storybook stories](packages...

(HAVE_A_LOOK)


[uncategorized] ~149-~149: Possible missing preposition found.
Context: ...oject/application that demonstrates how import and export the maxGraph model with XM...

(AI_HYDRA_LEO_MISSING_TO)

packages/website/docs/demo-and-examples.md (4)

9-11: Fix markdown list indentation

The nested list items under storybook stories are using 4 spaces for indentation. According to markdown best practices, nested lists should use 2 spaces.

 - the [storybook stories](https://github.com/maxGraph/maxGraph/tree/main/packages/html/stories) which demonstrates various features of maxGraph.
-    - The stories are currently written in `JavaScript` and will be progressively migrated to `TypeScript`.
-    - A live instance is available on the [maxGraph website](https://maxgraph.github.io/maxGraph/demo).
+  - The stories are currently written in `JavaScript` and will be progressively migrated to `TypeScript`.
+  - A live instance is available on the [maxGraph website](https://maxgraph.github.io/maxGraph/demo).
🧰 Tools
🪛 Markdownlint (0.37.0)

10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


14-15: Fix grammatical issues and typos

There are a few issues to address:

  1. Missing preposition "to" in "demonstrates how import"
  2. "Webapck" is misspelled (should be "Webpack")
-the [js-example](https://github.com/maxGraph/maxGraph/tree/main/packages/js-example) project/application that demonstrates how import and export the `maxGraph` model with XML data. It is a vanilla JavaScript application built by [Webapck](https://webpack.js.org/).
-the [js-example-without-defaults](https://github.com/maxGraph/maxGraph/tree/main/packages/js-example-without-defaults) project/application that demonstrates how to not use defaults plugins and style defaults (shapes, perimeters, ...). It is a vanilla JavaScript application built by [Webapck](https://webpack.js.org/).
+the [js-example](https://github.com/maxGraph/maxGraph/tree/main/packages/js-example) project/application that demonstrates how to import and export the `maxGraph` model with XML data. It is a vanilla JavaScript application built by [Webpack](https://webpack.js.org/).
+the [js-example-without-defaults](https://github.com/maxGraph/maxGraph/tree/main/packages/js-example-without-defaults) project/application that demonstrates how to not use defaults plugins and style defaults (shapes, perimeters, ...). It is a vanilla JavaScript application built by [Webpack](https://webpack.js.org/).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~14-~14: Possible missing preposition found.
Context: ...oject/application that demonstrates how import and export the maxGraph model with XM...

(AI_HYDRA_LEO_MISSING_TO)


16-16: Format bare URL as markdown link

The bare URL should be formatted as a proper markdown link for consistency.

-the https://github.com/maxGraph/maxgraph-integration-examples repository which shows how to integrate `maxGraph` with different frameworks and build tools.
+the [maxgraph-integration-examples](https://github.com/maxGraph/maxgraph-integration-examples) repository which shows how to integrate `maxGraph` with different frameworks and build tools.
🧰 Tools
🪛 Markdownlint (0.37.0)

16-16: null
Bare URL used

(MD034, no-bare-urls)


19-19: Improve grammar in notice section

The sentence structure could be improved for better clarity.

-Notice that some elements produced by `maxGraph` require to use [CSS and images](./usage/css-and-images.md) provided in the npm package.
+Notice that some elements produced by `maxGraph` require [CSS and images](./usage/css-and-images.md) provided in the npm package.
🧰 Tools
🪛 LanguageTool

[grammar] ~19-~19: Did you mean “using”? Or maybe you should add a pronoun? In active voice, ‘require’ + ‘to’ takes an object, usually a pronoun.
Context: ...elements produced by maxGraph require to use [CSS and images](./usage/css-and-images...

(ALLOW_TO)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a8afc4 and 64ff8c7.

📒 Files selected for processing (6)
  • README.md (2 hunks)
  • packages/website/docs/demo-and-examples.md (1 hunks)
  • packages/website/docs/development/_category_.json (1 hunks)
  • packages/website/docs/known-issues.md (1 hunks)
  • packages/website/docs/manual/_category_.json (1 hunks)
  • packages/website/docs/usage/_category_.json (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • packages/website/docs/usage/category.json
  • packages/website/docs/manual/category.json
  • packages/website/docs/development/category.json
  • packages/website/docs/known-issues.md
🧰 Additional context used
🪛 LanguageTool
README.md

[locale-violation] ~142-~142: In American English, “take a look” is more commonly used.
Context: ...n the “Getting started” example, please have a look at: - the [storybook stories](packages...

(HAVE_A_LOOK)

packages/website/docs/demo-and-examples.md

[locale-violation] ~7-~7: In American English, “take a look” is more commonly used.
Context: ...e](./manual/getting-started.md), please have a look at: - the [storybook stories](https://...

(HAVE_A_LOOK)


[uncategorized] ~14-~14: Possible missing preposition found.
Context: ...oject/application that demonstrates how import and export the maxGraph model with XM...

(AI_HYDRA_LEO_MISSING_TO)


[grammar] ~19-~19: Did you mean “using”? Or maybe you should add a pronoun? In active voice, ‘require’ + ‘to’ takes an object, usually a pronoun.
Context: ...elements produced by maxGraph require to use [CSS and images](./usage/css-and-images...

(ALLOW_TO)

🪛 Markdownlint (0.37.0)
packages/website/docs/demo-and-examples.md

10-10: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


11-11: Expected: 2; Actual: 4
Unordered list indentation

(MD007, ul-indent)


16-16: null
Bare URL used

(MD034, no-bare-urls)

Improve wording and grammar
Fix typos
Use links instead of bare url
Add a comment in the documentation about content duplicated with the main README
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
README.md (1)

153-153: Add missing comma before "which"

Add a comma before "which" to improve readability.

-the [maxgraph-integration-examples](https://github.com/maxGraph/maxgraph-integration-examples) repository which shows how to integrate `maxGraph` with different frameworks and build tools.
+the [maxgraph-integration-examples](https://github.com/maxGraph/maxgraph-integration-examples) repository, which shows how to integrate `maxGraph` with different frameworks and build tools.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~153-~153: Possible missing comma found.
Context: ...maxGraph/maxgraph-integration-examples) repository which shows how to integrate maxGraph...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 64ff8c7 and e3c9480.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • packages/website/docs/demo-and-examples.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/website/docs/demo-and-examples.md
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~153-~153: Possible missing comma found.
Context: ...maxGraph/maxgraph-integration-examples) repository which shows how to integrate maxGraph...

(AI_HYDRA_LEO_MISSING_COMMA)

🔇 Additional comments (1)
README.md (1)

140-155: Documentation improvements look great!

The changes effectively enhance the Examples section by:

  • Improving clarity and readability
  • Providing comprehensive information about available demos
  • Adding clear descriptions for each example
  • Including proper references to both TypeScript and JavaScript implementations
🧰 Tools
🪛 LanguageTool

[uncategorized] ~153-~153: Possible missing comma found.
Context: ...maxGraph/maxgraph-integration-examples) repository which shows how to integrate maxGraph...

(AI_HYDRA_LEO_MISSING_COMMA)

@tbouffard tbouffard merged commit e0f54ed into main Dec 18, 2024
3 checks passed
@tbouffard tbouffard deleted the docs/add_page_demos&examples branch December 18, 2024 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant