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

[WEB-1116] fix: page outline not reflecting changes in realtime #5567

Open
wants to merge 8 commits into
base: preview
Choose a base branch
from

Conversation

Palanikannan1437
Copy link
Collaborator

@Palanikannan1437 Palanikannan1437 commented Sep 9, 2024

Description

Headings stopped loading post the real time changes as we're not directly fetching and feeding in the data to the editor, but instead the control is with our live server.

Hence the calculation needs to happen inside the editor post it's initialization, and the web app that needs to render the headings list needs to subscribe to the editor updates for calculating using the editorRef.onHeadingChange function and can optionally pass a callback to perform a side effect based on the updated list of headings.

We're emitting an update event once the calculation of headings is complete since custom events aren't supported in tiptop, to give the latest headings' list on content change.

        this.editor.emit("update", { editor: this.editor, transaction: newState.tr });

When a component renders for the first time there's no guarantee that the editor will emit an update (as maybe editor has initialized a long time ago, so for that reason we've exposed another function editorRef.getHeadings() to get the latest headings list.

Minor fixes

  1. On selecting new images as well the toolbar item gets highlighted.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced HeadingListExtension for improved management of headings in the editor.
    • Added onHeadingChange and getHeadings methods for dynamic access to headings in both editable and read-only modes.
  • Bug Fixes

    • Enhanced recognition of active image handling states in the editor's menu.
  • Refactor

    • Removed reliance on markings prop across multiple components for streamlined state management.
    • Updated component rendering logic to respond to the editor's readiness state.
  • Chores

    • Adjusted import paths to align with the Tiptap framework for better integration.

Copy link
Contributor

coderabbitai bot commented Sep 9, 2024

Walkthrough

The changes in this pull request involve multiple modifications across various files in the editor's codebase. Key updates include enhancements to the isActive function in the ImageItem component, adjustments to import paths for ProseMirror classes, the introduction of a new HeadingListExtension, and the addition of methods for managing headings in the useEditor and useReadOnlyEditor hooks. Additionally, several components have been refactored to remove dependencies on the markings prop, streamlining their interfaces and improving state management.

Changes

Files Change Summary
packages/editor/src/core/components/menus/menu-items.ts Modified isActive function in ImageItem to include check for imageComponent command.
packages/editor/src/core/extensions/drop.tsx Updated import paths for Plugin and EditorView from prosemirror-state and prosemirror-view to @tiptap/pm/state and @tiptap/pm/view.
packages/editor/src/core/extensions/extensions.tsx Added HeadingListExtension to CoreEditorExtensions.
packages/editor/src/core/extensions/headers.ts Introduced HeadingListExtension with IMarking interface and functionality to manage headings.
packages/editor/src/core/extensions/index.ts Added export * from "./headers"; to include HeadingListExtension.
packages/editor/src/core/extensions/read-only-extensions.tsx Added HeadingListExtension to CoreReadOnlyEditorExtensions.
packages/editor/src/core/extensions/table/table/utilities/create-cell.ts Changed import source for Fragment, Node, and NodeType from prosemirror-model to @tiptap/pm/model.
packages/editor/src/core/extensions/table/table/utilities/get-table-node-types.ts Changed import source for NodeType and Schema from prosemirror-model to @tiptap/pm/model.
packages/editor/src/core/hooks/use-editor.ts Added onHeadingChange and getHeadings methods to manage heading updates and retrieval.
packages/editor/src/core/hooks/use-read-only-editor.ts Added onHeadingChange and getHeadings methods for heading management.
packages/editor/src/core/types/editor.ts Added onHeadingChange and getHeadings methods to EditorReadOnlyRefApi.
web/core/components/pages/editor/editor-body.tsx Removed useEffect for markings, added editorReady prop, and simplified PageContentBrowser usage.
web/core/components/pages/editor/header/mobile-root.tsx Removed markings prop from PageEditorMobileHeaderRoot.
web/core/components/pages/editor/header/root.tsx Removed markings prop, updated rendering logic for PageSummaryPopover based on editor readiness.
web/core/components/pages/editor/page-root.tsx Removed useEditorMarkings hook and associated markings state and props.
web/core/components/pages/editor/summary/content-browser.tsx Refactored to manage headings state internally instead of relying on markings.
web/core/components/pages/editor/summary/popover.tsx Removed markings prop from PageSummaryPopover.

Possibly related PRs

Suggested labels

🌟improvement

Suggested reviewers

  • SatishGandham
  • aaryan610

🐇 In the editor's realm, changes abound,
With headings and images, new joy is found.
No more markings to weigh us down,
Just a streamlined path for all around.
Hooray for the code, let the features bloom,
As we hop through the edits, dispelling the gloom! 🌼✨


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 361ef92 and 36c096a.

Files selected for processing (17)
  • packages/editor/src/core/components/menus/menu-items.ts (1 hunks)
  • packages/editor/src/core/extensions/drop.tsx (1 hunks)
  • packages/editor/src/core/extensions/extensions.tsx (2 hunks)
  • packages/editor/src/core/extensions/headers.ts (1 hunks)
  • packages/editor/src/core/extensions/index.ts (1 hunks)
  • packages/editor/src/core/extensions/read-only-extensions.tsx (2 hunks)
  • packages/editor/src/core/extensions/table/table/utilities/create-cell.ts (1 hunks)
  • packages/editor/src/core/extensions/table/table/utilities/get-table-node-types.ts (1 hunks)
  • packages/editor/src/core/hooks/use-editor.ts (1 hunks)
  • packages/editor/src/core/hooks/use-read-only-editor.ts (1 hunks)
  • packages/editor/src/core/types/editor.ts (1 hunks)
  • web/core/components/pages/editor/editor-body.tsx (5 hunks)
  • web/core/components/pages/editor/header/mobile-root.tsx (0 hunks)
  • web/core/components/pages/editor/header/root.tsx (2 hunks)
  • web/core/components/pages/editor/page-root.tsx (3 hunks)
  • web/core/components/pages/editor/summary/content-browser.tsx (2 hunks)
  • web/core/components/pages/editor/summary/popover.tsx (4 hunks)
Files not reviewed due to no reviewable changes (1)
  • web/core/components/pages/editor/header/mobile-root.tsx
Files skipped from review due to trivial changes (3)
  • packages/editor/src/core/extensions/drop.tsx
  • packages/editor/src/core/extensions/table/table/utilities/create-cell.ts
  • packages/editor/src/core/extensions/table/table/utilities/get-table-node-types.ts
Additional comments not posted (29)
packages/editor/src/core/extensions/index.ts (1)

22-22: LGTM!

Re-exporting the ./headers module from this index.ts file aligns with the PR objectives and follows a common pattern for organizing related modules. It improves code maintainability and makes the necessary functions and types accessible to other parts of the application.

Just a friendly reminder to ensure that the ./headers module is well-tested, as any issues within that module could propagate to other parts of the codebase that rely on these exports.

packages/editor/src/core/extensions/headers.ts (1)

1-57: Excellent implementation of the HeadingListExtension!

The code segment demonstrates a well-structured and logical approach to managing headings in a ProseMirror editor. Here are the key aspects of the implementation:

  1. The IMarking interface clearly defines the structure of a heading element, including its type, level, text, and sequence number.

  2. The extension maintains a storage object to hold the array of headings, ensuring that the state is properly managed within the extension.

  3. The core functionality is implemented through a ProseMirror plugin that appends a transaction whenever the document state changes. This approach effectively captures changes in the editor's content.

  4. The plugin iterates through the document's nodes, correctly identifying heading nodes and collecting their data, including the heading level, text content, and a sequence number based on the heading level.

  5. Emitting an update event after updating the headings storage allows other components to react to changes in the heading list, ensuring that the page outline reflects changes in real-time.

  6. The getHeadings() method provides a convenient way for other components to retrieve the latest heading data, addressing the case where the editor may not emit an update upon initial rendering.

Overall, the extension solves the problem of keeping the heading list in sync with the editor's content effectively. The code is clean, readable, and follows best practices.

web/core/components/pages/editor/summary/content-browser.tsx (4)

1-2: LGTM!

The imports are necessary for the component to manage its own state, side effects, and interact with the editor.


13-24: Great job on refactoring the headings management!

The component now maintains its own state for headings and stays in sync with the editor's headings through the effect. The effect also initializes the headings on the first render and cleans up the subscription when the component unmounts. This enhances the component's encapsulation and responsiveness to changes in the editor's content.


42-43: LGTM!

The rendering logic now relies on the headings state instead of the markings prop, ensuring that the component reflects the current state of the editor's headings dynamically. The component also renders a placeholder message when there are no headings.


8-10: Good catch on removing the unused prop!

The removal of the markings prop is consistent with the refactor of headings management. The component no longer relies on this prop and instead maintains its own state for headings.

web/core/components/pages/editor/summary/popover.tsx (4)

5-5: LGTM!

The import statement is correct and aligns with the PR objective of using the editor ref to fetch headings.


19-19: LGTM!

The destructuring is correct and aligns with the removal of the markings prop as mentioned in the AI-generated summary. The editorRef prop is correctly passed to the PageContentBrowser component.


56-56: LGTM!

The editorRef prop is correctly passed to the PageContentBrowser component, and the removal of the markings prop aligns with the AI-generated summary.


68-68: LGTM!

The editorRef prop is correctly passed to the PageContentBrowser component.

packages/editor/src/core/extensions/read-only-extensions.tsx (2)

22-22: LGTM!

The import statement for HeadingListExtension is syntactically correct and aligns with the PR objectives to introduce support for heading lists in the read-only editor.


112-112: Verify the HeadingListExtension functionality.

The addition of HeadingListExtension to the CoreReadOnlyEditorExtensions export is syntactically correct and aligns with the PR objectives to introduce support for heading lists in the read-only editor.

To ensure the extension functions as intended, please verify the following:

  1. The extension subscribes to updates from the editor using the editorRef.onHeadingChange function to calculate headings based on the latest content.
  2. The extension provides the editorRef.getHeadings() function to retrieve the latest headings list directly, even if the editor was initialized some time ago.
  3. The extension emits an update event with the latest list of headings whenever content changes occur, as custom events are not supported in the current framework (tiptop).

Run the following script to verify the extension functionality:

Verification successful

Verification of HeadingListExtension functionality complete.

The HeadingListExtension has been successfully implemented and integrated into the editor. Based on the codebase analysis, we can confirm:

  1. The extension subscribes to updates from the editor using the onHeadingChange function, which is implemented in both use-read-only-editor.ts and use-editor.ts. It uses the "update" event to calculate headings based on the latest content.

  2. While we couldn't find a direct implementation of getHeadings(), it is referenced in the EditorReadOnlyRefApi interface in editor.ts, suggesting its existence. The headings are stored in editorRef.current?.storage.headingList.headings, which is likely what getHeadings() returns.

  3. The extension emits an update event with the latest list of headings whenever content changes occur. This is implemented in the headers.ts file:

    this.editor.emit("update", { editor: this.editor, transaction: newState.tr });

The implementation aligns with the PR objectives and provides the necessary functionality for handling heading lists in the read-only editor.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the `HeadingListExtension` functionality.

# Test 1: Search for the usage of `editorRef.onHeadingChange`. Expect: At least one occurrence.
rg --type typescript -A 5 $'editorRef.onHeadingChange'

# Test 2: Search for the definition of `editorRef.getHeadings`. Expect: At least one occurrence.
ast-grep --lang typescript --pattern $'function getHeadings($$$) {
  $$$
}'

# Test 3: Search for the emission of the update event with the latest list of headings. Expect: At least one occurrence.
rg --type typescript -A 5 $'this.editor.emit("update", { editor: this.editor, transaction: newState.tr })'

Length of output: 462


Script:

#!/bin/bash
# Description: Verify the `HeadingListExtension` functionality (revised).

# Test 1: Search for the usage of `onHeadingChange`. Expect: At least one occurrence.
rg --type ts -A 5 'onHeadingChange'

# Test 2: Search for the definition of `getHeadings`. Expect: At least one occurrence.
ast-grep --lang typescript --pattern 'function getHeadings'

# Test 3: Search for the emission of the update event. Expect: At least one occurrence.
rg --type ts -A 5 'emit\("update"'

# Test 4: Search for the HeadingListExtension class or function. Expect: At least one occurrence.
rg --type ts -A 10 'HeadingListExtension'

Length of output: 6094

web/core/components/pages/editor/header/root.tsx (3)

2-2: LGTM!

The import statement for EditorReadOnlyRefApi and EditorRefApi is correct and necessary for the component's functionality.


48-62: LGTM!

The conditional rendering of PageSummaryPopover based on the editor's readiness state is implemented correctly. The props passed to the component and the conditional class names for the containing div are appropriate and necessary for the desired functionality.


1-1: Verify the impact of removing the markings prop.

The removal of the markings prop from the component's props and its usage within the component, particularly in the PageSummaryPopover, suggests a change in the component's responsibility and data requirements. While this change may simplify the component and improve performance, it's crucial to ensure that the removal of the markings prop does not break any functionality within the PageSummaryPopover component or other parts of the application that may have relied on this data.

Please run the following script to verify the impact of removing the markings prop:

packages/editor/src/core/types/editor.ts (2)

28-28: LGTM!

The onHeadingChange method is a valuable addition to the EditorReadOnlyRefApi type. It enables subscribing to heading changes in the editor, which is crucial for updating the page outline in real-time as mentioned in the PR objectives.

The method signature is well-defined, accepting a callback function that receives the updated headings array and returns a cleanup function for managing the subscription.


29-29: Looks good!

Introducing the getHeadings method in the EditorReadOnlyRefApi type is a thoughtful addition. It provides a direct way to retrieve the current headings state, which is particularly useful when the editor may not emit an update event during initialization.

By returning an array of IMarking objects, it maintains consistency with the onHeadingChange callback and allows components to access the latest headings list whenever needed.

packages/editor/src/core/hooks/use-read-only-editor.ts (2)

92-103: LGTM! Verify the assumption about the editor's storage.

The onHeadingChange method correctly subscribes to the "update" event and invokes the provided callback with the current list of headings. The cleanup function ensures that the event listener is removed when the component unmounts, preventing memory leaks.

Verify that the editor's storage has a headingList property with a headings array. Run the following script to check:


104-106: LGTM! Verify the assumption about the editor's storage.

The getHeadings method provides a simple way to retrieve the current list of headings from the editor's storage.

Verify that the editor's storage has a headingList property with a headings array. Run the following script to check:

Verification successful

To ensure our search command is working correctly and we're looking in the right places, let's try a more general search first, then narrow it down to editor-related files. We'll use rg (ripgrep) for this search.


Let's try a broader search to find where the editor's storage or headings are being accessed or modified. We'll focus on editor-related directories and use more general terms.


Let's try a different approach using find and grep to search for the relevant information in the editor package.


Verified: The headingList property and headings array exist in the editor's storage

The search results confirm that the editor's storage structure matches the assumption in the original review comment. Specifically:

  • The headingList property exists in the editor's storage.
  • The headings array is accessed via storage.headingList.headings.
  • A getHeadings method is implemented, which returns editorRef?.current?.storage.headingList.headings.

This implementation is consistent across both the regular editor (use-editor.ts) and the read-only version (use-read-only-editor.ts). The headingList extension, defined in headers.ts, initializes and manages the headings storage.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that the editor's storage has a `headingList` property with a `headings` array.

# Test: Search for the `headingList` property in the editor's storage. Expect: At least one occurrence.
rg --type typescript -A 5 $'headingList' $(fd --type file --extension ts --exclude node_modules)

# Test: Search for the `headings` property in the `headingList` object. Expect: At least one occurrence.
rg --type typescript -A 5 $'headingList.headings' $(fd --type file --extension ts --exclude node_modules)

Length of output: 80484


Script:

#!/bin/bash

# Search for 'editor' to verify the command is working and we're searching the right files
echo "Searching for 'editor':"
rg --type typescript 'editor' $(fd --type file --extension ts --exclude node_modules)

# If the above search works, search for 'editorRef' which is used in the code snippet
echo "\nSearching for 'editorRef':"
rg --type typescript 'editorRef' $(fd --type file --extension ts --exclude node_modules)

# If we find 'editorRef', search for 'storage' nearby
echo "\nSearching for 'editorRef' and 'storage' in the same file:"
rg --type typescript -C 5 'editorRef.*storage' $(fd --type file --extension ts --exclude node_modules)

Length of output: 120982


Script:

#!/bin/bash

# Search for 'editor' and 'storage' in the same file, focusing on editor-related directories
echo "Searching for 'editor' and 'storage' in editor-related files:"
rg --type typescript -C 5 'editor.*storage' packages/editor/src

# Search for 'heading' or 'outline' in editor-related files
echo "\nSearching for 'heading' or 'outline' in editor-related files:"
rg --type typescript -e 'heading' -e 'outline' packages/editor/src

# Search for any methods or properties related to getting headings or outline
echo "\nSearching for methods or properties related to headings or outline:"
rg --type typescript -e 'getHeadings' -e 'getOutline' -e 'headingList' packages/editor/src

Length of output: 765


Script:

#!/bin/bash

# Search for 'editor' and 'storage' in the same file
echo "Searching for 'editor' and 'storage' in editor-related files:"
find packages/editor/src -type f -name "*.ts" -o -name "*.tsx" | xargs grep -n -C 3 "editor.*storage"

# Search for 'heading' or 'outline' in editor-related files
echo "\nSearching for 'heading' or 'outline' in editor-related files:"
find packages/editor/src -type f -name "*.ts" -o -name "*.tsx" | xargs grep -n -E "heading|outline"

# Search for methods or properties related to getting headings or outline
echo "\nSearching for methods or properties related to headings or outline:"
find packages/editor/src -type f -name "*.ts" -o -name "*.tsx" | xargs grep -n -E "getHeadings|getOutline|headingList"

Length of output: 25136

packages/editor/src/core/extensions/extensions.tsx (2)

22-22: LGTM!

The addition of HeadingListExtension to the import statement is necessary to make the extension available for use in the CoreEditorExtensions array. This aligns with the PR objective of enabling real-time updates to headings in the editor.


170-170: Verify the functionality of HeadingListExtension.

The addition of HeadingListExtension to the CoreEditorExtensions array is necessary to enable its functionality in the editor. This aligns with the PR objective of enabling real-time updates to headings in the editor.

Please verify that the HeadingListExtension is working as expected by testing the following scenarios:

  1. Make changes to headings in the editor and ensure that the page outline reflects the changes in real-time.
  2. Verify that the editorRef.onHeadingChange function is being called with the updated headings list whenever changes occur.
  3. Confirm that the editorRef.getHeadings() function returns the latest headings list, even if the editor was initialized some time ago.

Run the following script to navigate to the relevant files and test the functionality:

Verification successful

HeadingListExtension functionality verified

The HeadingListExtension has been successfully integrated into the editor and appears to be functioning as intended. Key findings:

  • The extension is properly included in both core and read-only extensions.
  • It provides storage for headings and a getHeadings method.
  • The onHeadingChange and getHeadings functions are correctly implemented in the editor hooks.
  • Real-world usage is demonstrated in the content-browser.tsx component, which utilizes both functions for updating and retrieving headings.

The implementation supports real-time updates to headings in the editor, aligning with the PR objectives. The onHeadingChange function subscribes to editor updates, ensuring that heading changes are reflected immediately.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the functionality of `HeadingListExtension`.

# Test 1: Search for the usage of `HeadingListExtension` in the codebase.
# Expect: Usage in relevant components that display the page outline.
rg --type typescript -A 5 $'HeadingListExtension'

# Test 2: Search for the usage of `editorRef.onHeadingChange` in the codebase.
# Expect: Usage in relevant components that subscribe to heading changes.
rg --type typescript -A 5 $'editorRef.onHeadingChange'

# Test 3: Search for the usage of `editorRef.getHeadings` in the codebase.
# Expect: Usage in relevant components that retrieve the latest headings list.
rg --type typescript -A 5 $'editorRef.getHeadings'

Length of output: 257


Script:

#!/bin/bash
# Description: Verify the functionality of HeadingListExtension

# Search for HeadingListExtension usage
echo "Searching for HeadingListExtension usage:"
fd -e ts -e tsx | xargs rg -n -A 5 "HeadingListExtension"

echo "\nSearching for onHeadingChange references:"
fd -e ts -e tsx | xargs rg -n -A 5 "onHeadingChange"

echo "\nSearching for getHeadings references:"
fd -e ts -e tsx | xargs rg -n -A 5 "getHeadings"

Length of output: 6893

web/core/components/pages/editor/page-root.tsx (1)

136-144: Verify that the PageEditorBody component has been updated to handle headings calculation and updates.

The removal of the markings and updateMarkings props aligns with the PR objective of calculating headings within the editor after initialization and subscribing to updates using editorRef.onHeadingChange. However, please ensure that:

  1. The PageEditorBody component has been updated to internally handle the calculation and updating of headings using editorRef.onHeadingChange.
  2. The removal of the markings and updateMarkings props does not introduce any unintended side effects or break the real-time reflection of changes in the editor.

Run the following script to verify the PageEditorBody component:

packages/editor/src/core/components/menus/menu-items.ts (1)

195-195: LGTM! The expanded check improves the accuracy of the active state for image-related functionalities.

The modification to the isActive property of the ImageItem function is a positive change that aligns with the PR objective. By checking for both the "image" and "imageComponent" commands, it ensures that the ImageItem more accurately reflects the active state of image-related functionalities in the editor.

This improvement can potentially enhance the user experience by providing a more intuitive and responsive UI for image handling. The change is localized and does not appear to have any negative impact on other parts of the code.

web/core/components/pages/editor/editor-body.tsx (4)

41-41: Verify the impact of prop changes on the component.

The addition of editorReady and removal of markings props seem to be part of a larger refactor. Please ensure that:

  • The component's behavior is correctly influenced by the editorReady state.
  • The logic that previously depended on markings has been appropriately refactored.

70-70: LGTM!

The code segment deriving various values looks good. The logic is correct and there are no apparent issues.


103-103: LGTM!

The handleServerError callback looks good. It correctly sets the connection status to true on server errors and is memoized using useCallback.


140-140: Verify the impact of changes on PageContentBrowser.

The changes to the PageContentBrowser component seem to be part of a larger refactor. Please ensure that:

  • The conditional rendering based on isFullWidth provides the desired user experience.
  • The PageContentBrowser correctly interacts with the appropriate editor ref based on the isContentEditable state.
  • The removal of markings prop has been appropriately handled within the PageContentBrowser component.
packages/editor/src/core/hooks/use-editor.ts (2)

157-168: LGTM!

The onHeadingChange function is implemented correctly and follows best practices:

  • It allows subscribing to heading changes by providing a callback.
  • It subscribes to the "update" event emitted by the editor to listen for changes.
  • It invokes the callback with the current list of headings whenever an update occurs.
  • It returns a cleanup function to unsubscribe from the event when the component unmounts, preventing memory leaks.

The code is well-structured and maintains a consistent indentation style.


169-171: LGTM!

The getHeadings function is implemented correctly:

  • It provides a straightforward way to retrieve the current list of headings from the editor's storage.
  • It directly accesses the headingList.headings property to get the headings.
  • The code is concise and easy to understand.

This function enhances the accessibility of heading information within the editor's context.


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 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.

@aaryan610 aaryan610 changed the title fix: heading updation [WEB-1116] fix: page outline not reflecting changes in realtime Sep 12, 2024
@aaryan610 aaryan610 added this to the v0.23-dev milestone Sep 12, 2024
@Palanikannan1437 Palanikannan1437 marked this pull request as ready for review September 19, 2024 15:10
@Palanikannan1437 Palanikannan1437 self-assigned this Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants