Skip to content

Conversation

@kagol
Copy link
Member

@kagol kagol commented Jan 23, 2026

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

Release Notes

  • New Features
    • In read-only mode, clicking on files now automatically triggers a download instead of displaying file options.

✏️ Tip: You can customize this high-level summary in your review settings.

@kagol kagol merged commit 8553175 into dev Jan 23, 2026
1 check passed
@github-actions github-actions bot added the enhancement New feature or request label Jan 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The FileModule now downloads files directly when clicked in read-only mode, replacing the previous file bar display behavior. A new downloadFile method programmatically creates a temporary anchor element with the file's download href and filename, triggers the download, and cleans up.

Changes

Cohort / File(s) Summary
File download in read-only mode
packages/fluent-editor/src/modules/file/modules/file-module.ts
Added downloadFile(fileDom) method to handle file downloads. Modified click handler to trigger download when Quill is disabled instead of displaying file bar.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A fluffy tale of files set free,
When read-only mode is all we see,
A click, a whoosh, the download flows,
No bars to show, just where it goes! 📥✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kagol/download-file-when-click-in-readonly-mode

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants