fix: OS integrations for quick file import#1691
Merged
Conversation
jessicaschilling
approved these changes
Oct 9, 2020
Contributor
jessicaschilling
left a comment
There was a problem hiding this comment.
Successfully dropped onto the menubar icon to import:
- One file
- Multiple files
- A file plus a directory
The JS API changed the way template is selected, and we patched untyped object instead of unixfs-dir one. Context: https://github.com/ipfs/js-ipfs/blob/8cb8c73037e44894d756b70f344b3282463206f9/packages/interface-ipfs-core/src/object/new.js#L33-L40 License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
4c9f497 to
28879eb
Compare
Member
Author
|
@jessicaschilling mind re-testing? I tested on Windows and works as expected, but noticed that when a single file is imported its filename was lost in the shareable link copied to clipboard. |
Contributor
|
Looks great! Thanks for picking up from my first bug fix 😄 🚢 itttttttt |
jessicaschilling
approved these changes
Oct 9, 2020
Contributor
jessicaschilling
left a comment
There was a problem hiding this comment.
Confirmed import worked and clipboard link displayed successfully for:
- One file
- Two files
- A file plus a directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors code to fix bugs caused by js api changes.
The sneaky one: the way we pass template changed in a way that failed silently:
https://github.com/ipfs/js-ipfs/blob/8cb8c73037e44894d756b70f344b3282463206f9/packages/interface-ipfs-core/src/object/new.js#L33-L40
so instead of unixfs, we were patching untyped object, which gateway was unable to render.
@rafaelramalho19
I've pushed 1 line fix to your branch and created this PR to include our fixes.
How to test
Same code is used for different variant on each OS, so we need to test both.
macOS
Windows
Closes #1684