Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add a comment in Figma.
Figma
figma.currentPage.selection[0].[1] = 'Great design!'
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'note' or 'feedback' instead of 'comment'.
Trying to add comments to the page instead of the selected object.
✗ Incorrect
In Figma, you add comments using the comment property on selected objects.
2fill in blank
mediumComplete the code to retrieve all comments on the current page.
Figma
const comments = figma.currentPage.[1]; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'notes' or 'messages' which are not valid properties.
Trying to access comments from the document instead of the current page.
✗ Incorrect
The comments property holds all comments on the current page in Figma.
3fill in blank
hardFix the error in the code to post a comment at position (100, 200).
Figma
figma.currentPage.[1]({ x: 100, y: 200 }, 'Looks good!')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-existent methods like 'addNote' or 'sendFeedback'.
Confusing method names that sound similar.
✗ Incorrect
The correct method to add a comment at a position is createComment.
4fill in blank
hardFill both blanks to filter comments by author and get their messages.
Figma
const authorComments = figma.currentPage.comments.filter(c => c.[1] === 'Alice').map(c => c.[2]);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'user' or 'content' which are not valid comment properties.
Mixing up author and message properties.
✗ Incorrect
Comments have an author property and their text is in message.
5fill in blank
hardFill all three blanks to add a reply to a comment and then resolve it.
Figma
const reply = comment.[1]('I agree!'); comment.[2] = true; figma.notify('[3] resolved');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'resolved' as a property instead of a string message.
Confusing 'comment' with method names.
✗ Incorrect
Use addReply to reply, set isResolved to true to resolve, and notify with 'resolved'.