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

[Lexical][Meta] Add meta intern static docs config #32

Open
wants to merge 2 commits into
base: cloned_main_93d81
Choose a base branch
from

Conversation

local-dev-korbit-ai-mentor[bot]
Copy link

@local-dev-korbit-ai-mentor local-dev-korbit-ai-mentor bot commented Aug 15, 2024

WHAT

  • Add meta intern static docs config
  • Fix broken JSX rendering in MD files caused due to preprocessor added for markdown validations

WHY

  • needed to sync and build intern static docs in meta for lexical

Description by Korbit AI

What change is being made?

Add meta intern static docs configuration and update various documentation files to fix formatting issues and improve clarity.

Why are these changes being made?

These changes are necessary to ensure the documentation is correctly formatted and up-to-date, improving readability and usability for developers. The updates also include configuration adjustments to better support internal documentation processes.

Summary by CodeRabbit

  • Documentation

    • Improved clarity in documentation comments for functions related to style patching and MIME type handling.
    • Introduced a new documentation page for error codes, enhancing user access management.
    • Updated HTML syntax in the developer tools documentation to comply with standards.
    • Revised error code page layout for improved clarity and streamlined structure.
    • Updated serialization documentation for better formatting of JSON and HTML representation.
  • Chores

    • Updated the Docusaurus plugin version for enhanced functionality and potential improvements.
    • Reconfigured Docusaurus settings to simplify markdown processing and enhance internal documentation capabilities.

Copy link
Author

Clone of the PR facebook/lexical#6302

Copy link

korbit-ai bot commented Aug 15, 2024

My review is in progress 📖 - I will have feedback for you in a few minutes!

Copy link

coderabbitai bot commented Aug 15, 2024

Walkthrough

The recent updates encompass documentation enhancements, formatting adjustments for clarity, and structural changes in Docusaurus configurations. Key modifications include improved comment syntax in utility functions, streamlined error code documentation, and a transition to a more specialized preset for the website. These changes aim to enhance clarity, maintain compliance with standards, and optimize the overall organization of the project without altering its core functionality.

Changes

Files Change Summary
packages/lexical-selection/src/...lexical-node.ts
packages/lexical-utils/src/index.ts
Minor documentation changes to escape curly braces for clarity in comments.
packages/lexical-website/docs/...serialization.md Textual modification to enhance clarity regarding HTML and JSON formatting in documentation.
packages/lexical-website/docs/error.md New documentation file for error codes, featuring an OssOnly component for restricted access.
packages/lexical-website/docs/getting-started/...devtools.md HTML syntax updates for self-closing <img> tags to improve compliance with XHTML standards.
packages/lexical-website/docusaurus.config.js Removed markdown processing configuration and updated to a new preset for internal documentation.
packages/lexical-website/package.json Updated docusaurus-plugin-internaldocs-fb version from 1.9.1 to 1.18.2.
packages/lexical-website/src/components/...ErrorCodePage.js Restructured component layout and simplified error code import path; removed Layout component.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ErrorCodePage
    participant OssOnly
    
    User->>OssOnly: Request error code information
    OssOnly->>ErrorCodePage: Render content for authorized user
    ErrorCodePage-->>User: Display error code details
Loading

🐰 In the code and the docs,
Changes abound, like joyful clocks!
With clearer paths and tags to close,
Our rabbit hop brings smiles, I suppose!
So let’s cheer for a tidy space,
Where code and words find their place! 🐇✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I have reviewed your code and did not find any issues!


Please note that I can make mistakes, and you should still encourage your team to review your code as well.

@furwellness
Copy link
Owner

/review

Copy link

codiumai-pr-agent-free bot commented Aug 16, 2024

PR Reviewer Guide 🔍

(Review updated until commit 6bb94a9)

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

Code Clarity
The use of escaped curly braces in the documentation comments (e.g., \\{ and \\}) might not be necessary and could potentially confuse developers or documentation parsers. Consider using standard curly braces { and } unless there's a specific reason for escaping them.

Code Clarity
Similar to the previous issue, escaped curly braces in the documentation comments might not be necessary. This could potentially confuse developers or documentation parsers. Consider using standard curly braces unless there's a specific reason for escaping them.

Code Clarity
The use of escaped curly braces in the documentation comments might not be necessary and could potentially confuse developers or documentation parsers. Consider using standard curly braces unless there's a specific reason for escaping them.

Simplification
The refactoring of ErrorCodePage component removed several elements including layout and headers which might affect the page structure and SEO. Ensure that these changes align with the intended design and functionality.

Configuration Change
The preset configuration has been changed from 'classic' to a custom internal docs preset. This could affect how the site is built and its features. Verify that all intended functionalities are preserved and that the new preset integrates well with the existing setup.

Copy link

Persistent review updated to latest commit 6bb94a9

@furwellness
Copy link
Owner

@coderabbitai review

Copy link

coderabbitai bot commented Aug 16, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@furwellness
Copy link
Owner

@coderabbitai review

Copy link

coderabbitai bot commented Aug 17, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 3

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 93d81e8 and 6bb94a9.

Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing (8)
  • packages/lexical-selection/src/lexical-node.ts (1 hunks)
  • packages/lexical-utils/src/index.ts (2 hunks)
  • packages/lexical-website/docs/concepts/serialization.md (1 hunks)
  • packages/lexical-website/docs/error.md (1 hunks)
  • packages/lexical-website/docs/getting-started/devtools.md (1 hunks)
  • packages/lexical-website/docusaurus.config.js (3 hunks)
  • packages/lexical-website/package.json (1 hunks)
  • packages/lexical-website/src/components/ErrorCodePage.js (1 hunks)
Files skipped from review due to trivial changes (5)
  • packages/lexical-selection/src/lexical-node.ts
  • packages/lexical-utils/src/index.ts
  • packages/lexical-website/docs/concepts/serialization.md
  • packages/lexical-website/docs/error.md
  • packages/lexical-website/src/components/ErrorCodePage.js
Additional context used
Markdownlint
packages/lexical-website/docs/getting-started/devtools.md

17-17: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


20-20: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


22-22: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


24-24: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

Additional comments not posted (3)
packages/lexical-website/package.json (1)

31-31: Verify compatibility with the updated plugin version.

The docusaurus-plugin-internaldocs-fb has been updated from 1.9.1 to 1.18.2. Ensure that the new version is compatible with your current setup and does not introduce any breaking changes.

packages/lexical-website/docs/getting-started/devtools.md (1)

24-24: Add alt text to the image.

The <img> tag is missing alt text, which is important for accessibility.

- [<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/safari/safari.svg" width="48" alt="Safari logo" valign="middle"/>][link-safari]
+ [<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/safari/safari.svg" width="48" alt="Safari logo" valign="middle"/>][link-safari]

Likely invalid or redundant comment.

Tools
Markdownlint

24-24: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

packages/lexical-website/docusaurus.config.js (1)

Line range hint 267-288:
Verify the new preset's configuration and impact.

The preset has been changed to require.resolve('docusaurus-plugin-internaldocs-fb/docusaurus-preset'). Ensure that this new configuration aligns with your documentation needs and check for any potential issues.

Verification successful

Verification Successful: New Preset Configuration is Correct

The docusaurus-plugin-internaldocs-fb package is installed and configured correctly in the docusaurus.config.js file. No issues or misconfigurations were found in the setup. Ensure to test the documentation site to confirm the expected behavior.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new preset configuration and its impact on the documentation setup.

# Test: Check if the new preset is correctly configured and does not introduce any issues.
# Expect: No errors or misconfigurations.
grep -A 10 'docusaurus-plugin-internaldocs-fb/docusaurus-preset' packages/lexical-website/docusaurus.config.js

Length of output: 620


Script:

#!/bin/bash
# Check if the 'docusaurus-plugin-internaldocs-fb' package is installed in the project.
grep -r 'docusaurus-plugin-internaldocs-fb' package.json

# Search for any documentation or compatibility issues related to 'docusaurus-plugin-internaldocs-fb'.
rg 'docusaurus-plugin-internaldocs-fb' -A 5

Length of output: 52104

@@ -14,18 +14,18 @@ The easiest way to debug websites built with Lexical is to install the Lexical D
[link-firefox]: https://addons.mozilla.org/en-US/firefox/addon/lexical-developer-tools/ 'Version published on Mozilla Add-ons'
[link-safari]: https://apps.apple.com/us/app/lexical-developer-tools/id6502753400 'Version published on Mac App Store'

[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome.svg" width="48" alt="Chrome" valign="middle">][link-chrome] [<img valign="middle" src="https://img.shields.io/chrome-web-store/v/kgljmdocanfjckcgfpcpdoklodllfdpc?style=flat&label=%20
">][link-chrome]
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome.svg" width="48" alt="Chrome" valign="middle"/>][link-chrome] [<img valign="middle" src="https://img.shields.io/chrome-web-store/v/kgljmdocanfjckcgfpcpdoklodllfdpc?style=flat&label=%20
Copy link

Choose a reason for hiding this comment

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

Add alt text to the image.

The <img> tag is missing alt text, which is important for accessibility.

- [<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome.svg" width="48" alt="Chrome" valign="middle"/>][link-chrome]
+ [<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome.svg" width="48" alt="Chrome logo" valign="middle"/>][link-chrome]
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome.svg" width="48" alt="Chrome" valign="middle"/>][link-chrome] [<img valign="middle" src="https://img.shields.io/chrome-web-store/v/kgljmdocanfjckcgfpcpdoklodllfdpc?style=flat&label=%20
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/chrome/chrome.svg" width="48" alt="Chrome logo" valign="middle"/>][link-chrome] [<img valign="middle" src="https://img.shields.io/chrome-web-store/v/kgljmdocanfjckcgfpcpdoklodllfdpc?style=flat&label=%20
Tools
Markdownlint

17-17: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/firefox/firefox.svg" width="48" alt="Firefox" valign="middle">][link-firefox] [<img valign="middle" src="https://img.shields.io/amo/v/lexical-developer-tools.svg?label=%20">][link-firefox]
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/firefox/firefox.svg" width="48" alt="Firefox" valign="middle"/>][link-firefox] [<img valign="middle" src="https://img.shields.io/amo/v/lexical-developer-tools.svg?label=%20"/>][link-firefox]
Copy link

Choose a reason for hiding this comment

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

Add alt text to the image.

The <img> tag is missing alt text, which is important for accessibility.

- [<img valign="middle" src="https://img.shields.io/amo/v/lexical-developer-tools.svg?label=%20"/>][link-firefox]
+ [<img valign="middle" src="https://img.shields.io/amo/v/lexical-developer-tools.svg?label=%20" alt="Firefox version badge"/>][link-firefox]
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/firefox/firefox.svg" width="48" alt="Firefox" valign="middle"/>][link-firefox] [<img valign="middle" src="https://img.shields.io/amo/v/lexical-developer-tools.svg?label=%20"/>][link-firefox]
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/firefox/firefox.svg" width="48" alt="Firefox" valign="middle"/>][link-firefox] [<img valign="middle" src="https://img.shields.io/amo/v/lexical-developer-tools.svg?label=%20" alt="Firefox version badge"/>][link-firefox]
Tools
Markdownlint

22-22: null
Images should have alternate text (alt text)

(MD045, no-alt-text)


[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/edge/edge.svg" width="48" alt="Edge" valign="middle">][link-edge] [<img valign="middle" src="https://img.shields.io/badge/dynamic/json?label=%20&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fpclbkaofdgafcfhlnimcdhhkkhcabpcb">][link-edge]
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/edge/edge.svg" width="48" alt="Edge" valign="middle"/>][link-edge] [<img valign="middle" src="https://img.shields.io/badge/dynamic/json?label=%20&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fpclbkaofdgafcfhlnimcdhhkkhcabpcb"/>][link-edge]
Copy link

Choose a reason for hiding this comment

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

Add alt text to the image.

The <img> tag is missing alt text, which is important for accessibility.

- [<img valign="middle" src="https://img.shields.io/badge/dynamic/json?label=%20&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fpclbkaofdgafcfhlnimcdhhkkhcabpcb"/>][link-edge]
+ [<img valign="middle" src="https://img.shields.io/badge/dynamic/json?label=%20&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fpclbkaofdgafcfhlnimcdhhkkhcabpcb" alt="Edge version badge"/>][link-edge]
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/edge/edge.svg" width="48" alt="Edge" valign="middle"/>][link-edge] [<img valign="middle" src="https://img.shields.io/badge/dynamic/json?label=%20&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fpclbkaofdgafcfhlnimcdhhkkhcabpcb"/>][link-edge]
[<img src="https://cdnjs.cloudflare.com/ajax/libs/browser-logos/74.1.0/edge/edge.svg" width="48" alt="Edge" valign="middle"/>][link-edge] [<img valign="middle" src="https://img.shields.io/badge/dynamic/json?label=%20&query=%24.version&url=https%3A%2F%2Fmicrosoftedge.microsoft.com%2Faddons%2Fgetproductdetailsbycrxid%2Fpclbkaofdgafcfhlnimcdhhkkhcabpcb" alt="Edge version badge"/>][link-edge]
Tools
Markdownlint

20-20: null
Images should have alternate text (alt text)

(MD045, no-alt-text)

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

Successfully merging this pull request may close these issues.

2 participants