Skip to content

Implement drag and drop based order in sidebar for local space#1

Merged
Rokt33r merged 3 commits intomasterfrom
feature/implement-nav-dnd-order
Aug 6, 2021
Merged

Implement drag and drop based order in sidebar for local space#1
Rokt33r merged 3 commits intomasterfrom
feature/implement-nav-dnd-order

Conversation

@Komediruzecki
Copy link
Copy Markdown
Collaborator

This PR also introduces few key changes and bugfixes:

  1. Storage loading is handled differently (all storages loaded nevertheless of errors, error ones stored for futher loading, any error is logged properly)
  2. Fixes a bug with regex being global and thus in particular situations creates wrong list of subfolders of a parent (not all)
  3. Fixes a bug with hide sidebar items, wrong keys used in SidebarContainer
  4. Implements drag and drop (with ordered IDs, real Folder IDs, few createStore and FSNote DB refactors, few minor bugfixes)

Add array move lib
Implemented orderedIds and DnD handling
Add logic for moving note or doc into note target
Add basic Database updates and API for orderedIds changes
Implement ordered IDs initialization in storages
Implement ordered IDs initializatio only in FSNote
Remove excess function from createStore

Updated handling of pouch DB in createStore
Add create note update for parent folder ordered IDs

Fix direct subfolders rather than all for create subfolders function
Add implementation of trash/untrash note workspace orderedIds

Update rename folder to update ordered IDs as well
Implement createNote update of ordered IDs (workspace)
Implement createFolder update of ordered IDs (workspace and parent folders)
Implement folder reordering
Implement moving of folders across different folder
Refactor folder IDs to use real IDs
Initialize real IDs (only FSNoteDB)
Update rename folder so that it handles realIDs updates (previous and new parent folders ordered IDs update)
Refactor code to use root folder instead of workspace ordered Ids
Refactor and update for loading of storages
Some improvements on loading multiple storages and some fails
Add folder realID changing instead of reusing (also previous ordered IDs should be persisted on folder rename)
Add handling of trash/untrash regarding ordered Ids

Some ordered IDs bugfixes

Remove console logs (most of them)
Fix bug with parallel execution and parent folder creation on rename folder upsert folder calls

Remove note id set from local space

Fix bug with hiding items in sidebar (invalid key provided on callback)
Assess some todos

Update storages list data key

Add order ID removal in purge note
Fix sidebar tree ordered IDs handling

Rename realId to orderId

Add array move lib
Implemented orderedIds and DnD handling
Add logic for moving note or doc into note target
Add basic Database updates and API for orderedIds changes
Implement ordered IDs initialization in storages
Implement ordered IDs initializatio only in FSNote
Remove excess function from createStore

Updated handling of pouch DB in createStore
Add create note update for parent folder ordered IDs

Fix direct subfolders rather than all for create subfolders function
Add implementation of trash/untrash note workspace orderedIds

Update rename folder to update ordered IDs as well
Implement createNote update of ordered IDs (workspace)
Implement createFolder update of ordered IDs (workspace and parent folders)
Implement folder reordering
Implement moving of folders across different folder
Refactor folder IDs to use real IDs
Initialize real IDs (only FSNoteDB)
Update rename folder so that it handles realIDs updates (previous and new parent folders ordered IDs update)
Refactor code to use root folder instead of workspace ordered Ids
Refactor and update for loading of storages
Some improvements on loading multiple storages and some fails
Add folder realID changing instead of reusing (also previous ordered IDs should be persisted on folder rename)
Add handling of trash/untrash regarding ordered Ids

Some ordered IDs bugfixes

Remove console logs (most of them)
Fix bug with parallel execution and parent folder creation on rename folder upsert folder calls

Remove note id set from local space

Fix bug with hiding items in sidebar (invalid key provided on callback)
Assess some todos

Update storages list data key

Add order ID removal in purge note
Fix sidebar tree ordered IDs handling
@@ -1,5 +1,5 @@
export const preferencesKey = 'note.boostio.co:preferences'
export const storageDataListKey = 'note.boostio.co:storageDataList'
export const storageDataListKey = 'note.boostio.co:localStorageDataList'
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@Rokt33r anything to be careful about with this change? Users need to load all storages again. We should probably Unsupported storage page was already discarded, so maybe some message or similar to tell user that the loaded storage is not supported?

@Komediruzecki Komediruzecki changed the title Feature/implement nav dnd order Implement drag and drop based order in sidebar for local space Aug 4, 2021
@Rokt33r Rokt33r merged commit f495cf5 into master Aug 6, 2021
@Rokt33r Rokt33r deleted the feature/implement-nav-dnd-order branch August 6, 2021 09:09
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.

2 participants