-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature rearrange storage #853
Feature rearrange storage #853
Conversation
Please make sure to be pasted screenshots of all your changes. |
Firstly, could you fix the CI error? |
if (!_.isArray(rawStorages)) throw new Error('Target storage doesn\'t exist.') | ||
|
||
targetStorage = _.find(rawStorages, {key: storageKey}) | ||
if (targetStorage == null) throw new Error('Target storage doesn\'t exist.') |
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.
Can you use findStorage()
? https://github.com/BoostIO/Boostnote/blob/master/browser/lib/findStorage.js
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.
Why is findStorage
in browser/lib
and not in browser/main/lib/dataApi
?
Besides my reorderFolder
I also updated updateFolder
.
There was one more possible candidate renameStorage
, but I didn't want to touch it now in the scope of this issue.
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.
Because it just operates localStorage
, does not operate files.
@@ -0,0 1,48 @@ | |||
const test = require('ava') |
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 😄
Tests are failing randomly. I put log into This is log from the failed run:
And these are 2 logs from successful run:
You can see that order is always different. |
I know it. But The fixing cost >>>>>> Push the restart button. |
Hi guys, I am sorry, I don't know how the process works now. |
No, there's nothing to say about your PR. I left cross-OS checks for my review but I'm busy in these days so I could not take a time to do it. I'll work on this PR again in a week. |
Works fine! Thank you! |
Hi @PrimaMateria , I wrote about this PR in my article. Check it! https://medium.com/boostnote/thanks-to-your-contribution-boostnote-v0-8-16-has-been-released-783afea95ca3 |
Hi guys,
this is my first contribution to other github project and also first time I worked with react, so please be critical.
It is related to issue Rearrange storage #741.
Quick description:
From StorageItem extracted FolderList and FolderItem as separate components.
Wrapped them in the rect-sortable-hoc.
Implemented new data api method called reorderFolder.
I hope you will like it.
Cheers
Matus