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

fix: Fix regression issue with drag-drop in editor #192

Merged
merged 10 commits into from
Jun 26, 2023

Conversation

cguedes
Copy link
Collaborator

@cguedes cguedes commented Jun 23, 2023

The upload files feature broke the drag-drop of draggable elements in the TipTap editor!

  • We've had to deactivate Tauri's fileDropEnabled
  • Implement drag-and-drop with custom HTML events (only for PDF files)
  • Hover effect when drag-drop for user feedback
  • This PR adds initial UI for the application footer with ingestion status
  • This PR also adds a new app menu entry References -> Upload... to open the upload files dialog
refstudio-pr-192.mov

NOTE: This PR don't aim to improve the left references sidebar.

This will close #173

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #192 (8fa98c4) into main (30cd1b5) will increase coverage by 3.44%.
The diff coverage is 88.96%.

@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   66.91%   70.36%   +3.44%     
==========================================
  Files          87       91       +4     
  Lines        4498     4592      +94     
  Branches      331      370      +39     
==========================================
+ Hits         3010     3231     +221     
+ Misses       1471     1344     -127     
  Partials       17       17              
Impacted Files Coverage Δ
src/App.tsx 0.00% <0.00%> (ø)
src/filesystem.ts 17.98% <0.00%> (-0.49%) ⬇️
src/events.ts 80.00% <80.00%> (+2.72%) ⬆️
src/panels/references/ReferencesPanel.tsx 97.26% <95.45%> (+12.01%) ⬆️
src/panels/references/FilesDragDropZone.tsx 98.33% <98.33%> (ø)
src/components/footer/Footer.tsx 100.00% <100.00%> (ø)
src/components/footer/FooterItem.tsx 100.00% <100.00%> (ø)
src/hooks/useAsyncEffect.ts 100.00% <100.00%> (ø)
src/hooks/useListenEvent.ts 100.00% <100.00%> (ø)
src/panels/references/ReferencesDropZone.tsx 100.00% <100.00%> (+100.00%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cguedes cguedes marked this pull request as ready for review June 26, 2023 13:45
@cguedes cguedes requested a review from sehyod June 26, 2023 13:45
sehyod
sehyod previously approved these changes Jun 26, 2023
Copy link
Collaborator

@sehyod sehyod left a comment

Choose a reason for hiding this comment

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

Looks good! I let two comments, but nothing blocking.
While testing locally, I realised that you can still drag and drop a file on the title bar and it opens it with no way of getting out. It's very specific, I don't think it has to be fixed in this PR, but we should create a ticket for it to fix it later on.

src/panels/references/ReferencesDropZone.test.tsx Outdated Show resolved Hide resolved
@cguedes cguedes merged commit e652b7a into main Jun 26, 2023
11 checks passed
@cguedes cguedes deleted the 173-upload-files-regression branch June 26, 2023 16:11
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.

Improve upload target for references
2 participants