facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
18.96k stars 1.6k forks source link

Bug: Figma Plugin Example in CodeSandbox #4476

Open gaurav-jo1 opened 1 year ago

gaurav-jo1 commented 1 year ago

Identified a bug on the Demos page of project website in the "Plugin examples > embed plugins > Figma plugin example in codeSandbox" section. Specifically, the issue occurs when clicking on the "Insert Figma File" button.

Normally, a warning message should pop up asking users to paste the link for their Figma file. However, we have found that the warning message is currently displaying an incorrect instruction. Instead of asking users to paste the link to their Figma file, it states to paste the link for a YouTube video. This can be confusing for users.

Lexical version: v0.10.0

Steps To Reproduce

  1. Go to the Demos page of the open-source project
  2. Navigate to the Plugin examples section and click on "embed plugins"
  3. Click on the Figma plugin example in CodeSandbox
  4. Click on the "Insert Figma file" button
  5. Note that a warning appears asking to paste a YouTube link instead of a Figma link.

Code example:

Link of the CodeSandbox

To fix for the issue. In the FigmaToolbar.tsx file located in the plugins folder of the CodeSandbox example, there is a line of code that is causing the issue.

const text = prompt("Enter the URL of the Youtube video:", "");

The corrected code should look like this:

const text = prompt("Enter the URL of the Figma file:", "");

The current behavior

ezgif com-crop

The expected behavior

ezgif com-crop (2)

ivailop7 commented 1 year ago

@Gaurav-jo1 are you interested in fixing this one?

gaurav-jo1 commented 1 year ago

The code containing the bug is embedded in the CodeSandbox and is not present in the repository. As a beginner in CodeSandbox, I am unsure of how to notify the owner that I have successfully resolved the bug in the CodeSandbox environment.

ivailop7 commented 1 year ago

Ah, got it. Fair.