Skip to content

✨(front) Allow to pick files from drive if set up. #133

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

Merged
merged 4 commits into from
Jul 30, 2025

Conversation

jbpenrath
Copy link
Contributor

Purpose

#Hackdays2025

@jbpenrath jbpenrath force-pushed the feat/drive-interop branch 3 times, most recently from 1533243 to a1c3b8e Compare June 20, 2025 10:17
@jbpenrath jbpenrath force-pushed the feat/drive-interop branch from a1c3b8e to 670231c Compare July 16, 2025 12:57
@jbpenrath jbpenrath force-pushed the feat/drive-interop branch from 670231c to e592d15 Compare July 30, 2025 09:49
Only allow to upload blob of 25MB as attachment
@jbpenrath jbpenrath force-pushed the feat/drive-interop branch from e592d15 to aeedea0 Compare July 30, 2025 09:51
@jbpenrath jbpenrath changed the title 💩(frontend) pick & save attachments in Drive ✨(front) Allow to pick files from drive if set up. Jul 30, 2025
@jbpenrath jbpenrath force-pushed the feat/drive-interop branch from aeedea0 to d36c233 Compare July 30, 2025 09:53
@jbpenrath jbpenrath self-assigned this Jul 30, 2025
@jbpenrath jbpenrath requested a review from Copilot July 30, 2025 09:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements drive file attachment functionality by allowing users to pick and attach files from an external Drive service when configured. It includes comprehensive support for serializing, extracting, and displaying drive attachments throughout the mail workflow.

  • Adds a feature flag system for toggling external service integrations including Drive
  • Implements complete drive attachment handling in drafts, text bodies, and HTML bodies with extraction utilities
  • Integrates a Drive file picker component with the message form's attachment uploader

Reviewed Changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/frontend/src/hooks/use-feature.ts New feature flag system to manage external service availability
src/frontend/src/features/utils/mail-helper.tsx Core utilities for serializing/extracting drive attachments in different formats
src/frontend/src/features/forms/components/message-form/drive-attachment-picker.tsx Drive file picker component using external SDK
src/frontend/src/features/forms/components/message-form/attachment-uploader.tsx Enhanced attachment uploader supporting both local and drive files
src/frontend/src/features/layouts/components/thread-view/components/thread-message/index.tsx Thread message view updated to display drive attachments
src/backend/core/api/viewsets/config.py Backend configuration endpoint extended to include Drive service URLs
Files not reviewed (1)
  • src/frontend/package-lock.json: Language not supported

We want to add ability to Messages to interop with our Drive application.
First, we want to be able to set the Drive base url through environment
variable then pass down Drive configuration to frontend through the config
api endpoint.

https://github.com/suitenumerique/drive
Add a hook to know if a feature is enabled or not
(AI Features, Interop Features, etc.)
@jbpenrath jbpenrath force-pushed the feat/drive-interop branch from d36c233 to 0153e35 Compare July 30, 2025 11:41
Use the drive-sdk package to allow user to pick a file from its drive workspace
if one drive instance has been set up through envvars.

https://github.com/suitenumerique/drive
@jbpenrath jbpenrath force-pushed the feat/drive-interop branch from 0153e35 to e7758c1 Compare July 30, 2025 11:49
@jbpenrath jbpenrath merged commit 7248400 into main Jul 30, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant