Skip to content
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

[IMP] Clipboard: support images in the clipboard #5098

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rrahir
Copy link
Collaborator

@rrahir rrahir commented Oct 15, 2024

Description:

This commit adds the support of images in the clipboard. Namely,

  • Pasting an image from the OS clipboard will automatically upload it to
    the filestore and dispatch a CREATE_IMAGE accordingly.
  • Copying a chart or an image from the spreadsheet will add it to the
    oOS clipboard. It can then be pasted somewhere else, like a discuss
    app, a text editor maybe?.

TODO

  • support multi type of images (not just png) It technically works
    because we never check agains the actual type of the file we upload
    but it's wrong. Maybe use a generic image/* mimetype instead of using
    png. We still need to purge out dangerous mimetypes like image/svg(+xml)
  • Currently uploads the image from the clipboard THEN only checks if the
    we are copy pasting from the same spreadsheet clipboard (potential
    useless upload)
  • Not supported by some apps like Office 365 online (word & powerpoint tested). Supposedly because our
    clipboard has some text/* types along the image/* so it ignores the
    later. for a fully integrated feature, we should probably decorrelate it
    from the standard copy paste and make a menu "copy image to os
    clipboard" ? tbd
  • works on discord at least
  • No test whatsoever
    Task: 4241877

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

@robodoo
Copy link
Collaborator

robodoo commented Oct 15, 2024

Pull request status dashboard

@rrahir rrahir changed the title Master handle images in clipboard rar [FIX] clipboard: Fix clipboard cross-browser coverage Oct 15, 2024
@rrahir rrahir changed the title [FIX] clipboard: Fix clipboard cross-browser coverage [IMP] Clipboard: support images in the clipboard Oct 15, 2024
@rrahir rrahir force-pushed the master-handle-images-in-clipboard-rar branch 6 times, most recently from 34b7ef8 to e833221 Compare November 22, 2024 07:31
@rrahir rrahir force-pushed the master-handle-images-in-clipboard-rar branch from 84d7788 to 662e42b Compare November 22, 2024 08:27
This commit adds the support of images in the clipboard. Namely,
- Pasting an image from the OS clipboard will automatically upload it to
  the filestore and dispatch a CREATE_IMAGE accordingly.
- Copying a chart or an image from the spreadsheet will add it to the
  oOS clipboard. It can then be pasted somewhere else, like a discuss
app, a text editor, etc. as long as they support this type of import.

Task: 4235104
@rrahir rrahir force-pushed the master-handle-images-in-clipboard-rar branch from 7d456b8 to 59252c2 Compare November 22, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants