-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
When dropping an unsupported file onto a notebook entry, tell the user it isnt supported #7115
When dropping an unsupported file onto a notebook entry, tell the user it isnt supported #7115
Conversation
Current Playwright Test Results Summary✅ 14 Passing Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 10/11/2023 07:17:59am UTC) Run DetailsRunning Workflow e2e-couchdb on Github Actions Commit: 391ea20 Started: 10/11/2023 07:16:04am UTC Current Playwright Test Results Summary✅ 143 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 10/11/2023 07:17:59am UTC)
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1 • Initial Attempt |
0% (0)0 / 57 runsfailed over last 7 days |
33.33% (19)19 / 57 runsflaked over last 7 days |
📄 functional/planning/timelist.e2e.spec.js • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Time List Create a Time List, add a single Plan to it and verify all the activities are displayed with no milliseconds
Retry 1 • Initial Attempt |
2.06% (2)2 / 97 runsfailed over last 7 days |
62.89% (61)61 / 97 runsflaked over last 7 days |
📄 functional/plugins/notebook/notebookSnapshots.e2e.spec.js • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Snapshot image tests Can drop an image onto a notebook and create a new entry
Retry 1 • Initial Attempt |
3.08% (2)2 / 65 runsfailed over last 7 days |
58.46% (38)38 / 65 runsflaked over last 7 days |
Codecov Report
@@ Coverage Diff @@
## master #7115 +/- ##
==========================================
- Coverage 55.77% 55.42% -0.36%
==========================================
Files 651 651
Lines 26114 26170 +56
Branches 2521 2535 +14
==========================================
- Hits 14566 14504 -62
- Misses 10847 10973 +126
+ Partials 701 693 -8
*This pull request uses carry forward flags. Click here to find out more.
... and 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far!
I found a few issues while testing:
- When creating an entry with an image embed (dragging the image onto the "create new entry" area), the "create new entry" button is disabled until we add text to the entry. I think this behavior is intended (we don't want entries w/ only embeds and no text), but we should probably focus the entry input after drag+drop is done. Also, we are still able to have entries with embeds and no text after clicking and confirming the entry. @charlesh88 that's a no-no, right?
- Dragging an image onto an existing entry with no embeds fails here due to
this.entry.embeds === null
.
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'push')
at eval (NotebookEntry.vue:488:33)
at async Promise.all (:8080/index 0)
at async Proxy.dropOnEntry (NotebookEntry.vue:479:9)
- For the life of me I cannot get image copy/paste into an entry to work. Nothing happens? I might be doing something wrong.
This recording covers cases 1 and 2:
Screen.Recording.2023-10-06.at.11.20.43.AM.mov
…o-a-notebook-entry-tell-the-user-it-isnt-supported
@ozyx I think I've addressed 1 (though not sure about empty text), and 2. For 3, you need to select an entry for paste to work, either the entry as a whole, or in the text. Here's a video of the fixes: Screen.Recording.2023-10-10.at.12.09.44.PM.mov |
…an-unsupported-file-onto-a-notebook-entry-tell-the-user-it-isnt-supported
…an-unsupported-file-onto-a-notebook-entry-tell-the-user-it-isnt-supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work here. Tested this (and stress tested with localStorage / CouchDB plugins) and this works well! LGTM
const localImageDropped = dropEvent.dataTransfer.files?.[0]?.type.includes('image'); | ||
const imageUrl = dropEvent.dataTransfer.getData('URL'); | ||
const dataTransferFiles = Array.from(dropEvent.dataTransfer.files); | ||
const localImageDropped = dataTransferFiles.some((file) => file.type.includes('image')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome refactor
dataTransferFiles.map(async (file) => { | ||
if (file.type.includes('image')) { | ||
const imageData = file; | ||
const imageEmbed = await createNewImageEmbed( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good candidate for a refactor with composables! foreshadowing intensifies
Closes #7097 #7119
Describe your changes:
I've added notifications & errors for:
I've also updated the README in the CouchDB plugin to describe how to up the documents limits. Basically:
as both the documents, and the HTTP server in front of CouchDB need to accept the new big limits.
I've also updated interaction with the entry to accept pasting of images, both in the text box, and if selecting the entry.
All Submissions:
Author Checklist
Reviewer Checklist