# Comments & Collaboration

## Overview

GoFigr's new Comments & Collaboration system transforms how research teams discuss and review scientific figures. Add comments directly on figures, mention colleagues, react with emojis, and receive email notifications—all without leaving your workflow. Whether you're conducting peer review, discussing methodology, or providing feedback on visualizations, collaboration has never been easier.

## Key Benefits for Users

### Streamlined Communication

* **Contextual Discussions**: Comments are attached directly to specific figures or assets, keeping discussions focused and organized
* **No More Email Chains**: Replace scattered email threads with persistent, searchable comment threads
* **Real-Time Collaboration**: Team members can see and respond to comments immediately

### Stay Informed Without Effort

* **Email Notifications**: Get notified when someone comments on your figures or replies to your comments
* **@Mention Alerts**: Tag colleagues with @username or @email to bring them into discussions with instant notifications
* **Activity Feed Integration**: See all comment activity in your workspace activity feed

### Rich Communication Tools

* **Markdown Support**: Format comments with bold, italic, code blocks, lists, and more
* **Emoji Reactions**: React to comments with 👍 👎 ❤️ 😂 🚀 and more
* **Threaded Replies**: Keep conversations organized with inline replies to specific comments
* **AI-Generated Comments**: Request AI assistance to generate analytical comments (with clear attribution)

## How It Works

### Adding Comments

#### On Figures

1. Navigate to any figure or figure revision
2. Scroll to the Comments section below the figure
3. Type your comment in the text box
4. Use markdown formatting for rich text (see formatting guide below)
5. Click "Post Comment" to submit

#### On Assets (Documents)

1. Open any asset or asset revision (notebooks, PDFs, etc.)
2. Find the Comments section
3. Add your comment with the same rich formatting options

### Formatting Your Comments

GoFigr comments support full GitHub-Flavored Markdown:

````markdown
**Bold text** for emphasis
*Italic text* for subtle emphasis
`inline code` for variable names or short code
```python
# Code blocks for longer snippets
def analyze_data(df):
    return df.describe()
```
- Bullet points for lists
1. Numbered lists for sequences
> Blockquotes for referencing others
````

### @Mentioning Colleagues

Bring specific people into a conversation:

* **By username**: Type `@johndoe` to mention a user by their username
* **By email**: Type `@jane.doe@university.edu` to mention by email address

When you mention someone:

1. They receive an email notification with a preview of your comment
2. The email includes a direct link to the comment
3. Their name is highlighted in the comment thread
4. They can click through to respond immediately

### Reacting to Comments

Express quick feedback without writing a full response:

| Reaction       | Meaning                        |
| -------------- | ------------------------------ |
| ✅ Verified     | Confirms accuracy or agreement |
| ❌ Incorrect    | Flags potential errors         |
| 👍 Thumbs Up   | General approval               |
| ❤️ Heart       | Appreciation                   |
| 😂 Laugh       | Humor or levity                |
| 👎 Thumbs Down | Disagreement                   |
| 🚀 Rocket      | Excitement or great work       |

Click any reaction to toggle it on/off. Multiple users can add the same reaction, and counts are displayed.

### Threaded Replies

Keep conversations organized:

1. Click "Reply" on any comment
2. Your response appears nested under the original
3. Both the original commenter and mentioned users are notified
4. Threads can go multiple levels deep for complex discussions

### Editing and Deleting

* **Edit Your Comments**: Click the edit icon on any comment you authored to make changes
* **Edited Indicator**: Edited comments show "(edited)" to maintain transparency
* **Delete Your Comments**: Remove comments you no longer want visible

## Email Notifications

### When You're Notified

1. **Someone comments on your figure**: The figure's author receives a notification
2. **Someone replies to your comment**: The original comment author is notified
3. **Someone @mentions you**: Direct mentions trigger immediate notifications

### What's in the Email

* **Commenter's Name**: Who posted the comment
* **Comment Preview**: First 200 characters of the comment content
* **Figure/Asset Context**: Name of the figure or asset being discussed
* **Workspace Context**: Which workspace the discussion is in
* **Direct Link**: Click through to jump directly to the comment

### Managing Notifications

Notifications are designed to be helpful, not overwhelming:

* You won't be notified about your own comments
* Duplicate notifications are prevented (if you're mentioned AND you're the author, you only get one email)
* Emails include unsubscribe options (coming soon)

## AI-Generated Comments

For AI-analyzed figures, you can request AI-generated analytical comments:

1. Click "Generate AI Comment" (available when viewing an AI analysis)
2. The AI generates a detailed analytical comment based on the figure
3. AI comments are clearly marked with an "AI Generated" badge
4. Other users can verify or flag AI comments using the reaction system

### AI Comment Verification

* **✅ Verified**: Click to indicate the AI comment is accurate
* **❌ Incorrect**: Click to flag potential inaccuracies (hides comment content with option to view)

## Activity Feed Integration

All comment activity appears in your workspace activity feed:

* **New Comments**: See when team members add comments
* **Replies**: Track conversation threads
* **Filter Options**: Focus on comment activity or view all workspace activity
* **Exclude Deleted**: Option to hide activity for deleted items

## How to Access

### Viewing Comments

* Navigate to any figure, figure revision, asset, or asset revision
* Scroll to the Comments section
* All existing comments are displayed with newest first

### Adding Comments

* Click in the comment text box
* Type your comment
* Click "Post Comment"

### From Notifications

* Click the link in your email notification
* You'll be taken directly to the specific comment with automatic scrolling

## Permission-Based Access

Comments respect GoFigr's permission system:

* You can only comment on figures/assets you have view access to
* Your comments are visible to anyone who can view the target object
* Workspace administrators can moderate all comments in their workspace

## Best Practices

1. **Be Specific**: Reference specific aspects of the figure in your comments
2. **Use Formatting**: Code blocks for code, bullet points for multiple points
3. **@Mention Sparingly**: Only tag people who need to see the comment
4. **React Before Replying**: A quick 👍 can be more efficient than "I agree"
5. **Keep Threads Focused**: Start new top-level comments for different topics
6. **Review AI Comments**: Always verify AI-generated content before acting on it

## Technical Details

* **Supported Targets**: Figures, Figure Revisions, Assets, Asset Revisions
* **Markdown Parser**: GitHub-Flavored Markdown (GFM) with syntax highlighting
* **Email Delivery**: Real-time email notifications via templated HTML emails
* **Data Model**: Comments use GenericForeignKey for extensibility to future entity types
* **Indexing**: Comments are indexed for fast retrieval and search


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gofigr.io/features/comments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
