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

enable importing file to empty folder #1064

Merged
merged 2 commits into from
Nov 7, 2017

Conversation

yosmoc
Copy link
Member

@yosmoc yosmoc commented Nov 4, 2017

fix #1057

Current implementation is fetching the import destination storageKey and folderkey from a file in the folder. If no files are in the folder, it cannot fetch these keys. Use prop.params.storageKey / folderKey instead.

@yosmoc yosmoc closed this Nov 4, 2017
@yosmoc
Copy link
Member Author

yosmoc commented Nov 4, 2017

Sorry I closed this PR by mistake. I reopen again.

@yosmoc yosmoc reopened this Nov 4, 2017
const storageKey = this.notes[targetIndex].storage
const folderKey = this.notes[targetIndex].folder
const storageKey = this.props.params.storageKey
const folderKey = this.props.params.folderKey
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is better.

const { dispatch, location, params } = this.props
const { storageKey, folderKey } = params

Copy link
Contributor

@asmsuechan asmsuechan left a comment

Choose a reason for hiding this comment

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

This emits an error when I try to import to All Notes.

Uncaught (in promise) Error: Target storage doesn't exist.(…)

So, please make some conditions.

https://gyazo.com/34e0762b8de3217ea8eb14225a2205a6

Copy link
Contributor

@asmsuechan asmsuechan left a comment

Choose a reason for hiding this comment

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

And when I'm on the storage. (My focus is on Unnamed)

https://gyazo.com/1777425624d70cc82564bf4a40e407ff

Current implementation is fetching the import destination storageKey and folderkey from a file in the folder. If no files are in the folder, it cannot fetch these keys. Use prop.params.storageKey / folderKey instead.
…ating new note

It makes less confusing for user.
@yosmoc
Copy link
Member Author

yosmoc commented Nov 5, 2017

Thanks for reviewing. I use the same storage/folder resolve way as creating a new note. I think this makes less confusing for user.

Would you please review it again?

@kazup01 kazup01 added the awaiting review ❇️ Pull request is awaiting a review. label Nov 7, 2017
Copy link
Contributor

@asmsuechan asmsuechan left a comment

Choose a reason for hiding this comment

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

Works, thank you!

@asmsuechan asmsuechan merged commit e94b45a into BoostIO:master Nov 7, 2017
@kazup01 kazup01 removed the awaiting review ❇️ Pull request is awaiting a review. label Nov 10, 2017
@kohei-takata kohei-takata mentioned this pull request Nov 25, 2017
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.

Cannot import into a specific folder
4 participants