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

Pulling feat/editor-links into develop #771

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

No description provided.

ktun95 added 16 commits May 12, 2024 18:15
…inking feature

The AutoLinkNode import was added to the editorConfig.ts file to support the automatic linking feature in the editor. This allows for easier and more convenient linking within the editor without the need for manual input of link nodes.
The InsertLinkButton component has been added to the project to provide a button with an insert link icon for use in the editor toolbar. This new component enhances the functionality of the editor toolbar by allowing users to easily insert links into the editor content.
…Toolbar

The InsertLinkButton component has been added to the DictybaseToolbar, enhancing the functionality of the toolbar by providing users with the ability to insert links into the editor content.
…tton with InsertLinkIcon

The incorrect component name was used in the IconButton component, which was causing a rendering issue. By replacing it with the correct component name, InsertLinkIcon, the button now displays the intended icon correctly.
… editor when the InsertLinkButton is clicked

The InsertLinkButton component now includes functionality to insert a link in the editor when the button is clicked. This is achieved by updating the editor state on click to toggle a link and insert the specified link text. This enhancement improves the user experience by providing a convenient way to add links within the editor.
The ts-pattern package has been added as a dependency to the editor-toolbar package to introduce pattern matching capabilities in the codebase. This addition enhances the functionality and flexibility of the editor-toolbar package by leveraging the features provided by the ts-pattern library.
…anage link properties in the editor toolbar

The useLinkProperties custom hook is added to handle link properties in the editor toolbar. It utilizes Jotai for state management and provides a function to determine if a selected text contains a link node parent. This hook enhances the functionality of the editor toolbar by enabling link-related operations.
…tor toolbar

The isLinkAtom is added to the editor toolbar context to manage the state of whether a selected text should be formatted as a link. This new atom allows for better control and management of link formatting within the editor toolbar.
…he toolbar

The useUpdateToolbar hook now includes a new function call to updateLinkProperties, which allows for updating link properties in the toolbar. This enhancement provides additional functionality to the toolbar by enabling users to modify link properties seamlessly.
…editor

The LinkPlugin is added to the Editor component to provide support for adding hyperlinks within the editor. This enhancement allows users to easily insert and manage hyperlinks in the content being edited.
… based on isLink state

The code now includes functionality to toggle link creation based on the isLink state. When the isLink state is true, the editor will dispatch the TOGGLE_LINK_COMMAND with a null value. When the isLink state is false, the editor will dispatch the TOGGLE_LINK_COMMAND with an empty string. This change enhances the InsertLinkButton component's behavior by dynamically handling link creation based on the isLink state.
…LinkButton for editing link functionality

The changes in this commit focus on improving the code style by organizing imports and formatting the code for better readability. Additionally, a new EditingLinkPopper component is added to the InsertLinkButton component to provide functionality for editing links within the editor toolbar.
… handle link editing functionality

The EditingLinkPopper component is added to the project to handle link editing functionality within the editor toolbar. It utilizes various libraries and functions from fp-ts and lexical to manage the anchor element for the popper, determine if a link is present, and control its appearance based on certain conditions. The component listens for editor state updates and dynamically sets the anchor element for the popper to display a TextField for editing links.
… consistency

The variable shouldAppear has been renamed to isOpen for better clarity and consistency with the purpose of the variable. Additionally, comments have been added to explain the necessity of setting the anchorElement before opening the Popper component.
…te and useEffect

The code has been refactored to remove the unused state and useEffect related to setting the anchorElement. This optimization simplifies the component logic and improves code readability by eliminating unnecessary complexity.
…the IconButton element

The useRef hook is added to manage a reference to the IconButton element in the InsertLinkButton component. This allows for more control over the element, such as accessing its properties or methods.
Copy link

coderabbitai bot commented May 21, 2024

Important

Review Skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

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

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

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.

None yet

1 participant