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

Feature/sync #600

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Feature/sync #600

wants to merge 3 commits into from

Conversation

provokateurin
Copy link
Member

@provokateurin provokateurin commented Aug 24, 2023

Closes #21

Still missing

  • Settings for mappings: Auto sync, decide for each upload/download etc.
  • Auto sync (not just auto status update)
  • Better conflict UI/UX

Follow ups:

  • Native file watching (Android background)
  • Display sync status in the files browser
  • Rename detection

@Leptopoda early review would be nice if you have the time.
Probably contains a bunch of stuff that should be done in separate PRs, let me know where I should split out stuff (I'll try to do that myself already).

Copy link
Member

@Leptopoda Leptopoda left a comment

Choose a reason for hiding this comment

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

A few initial structure nitpicks (leftovers of our old code).

I like the general code structure/style but haven't looked ad the logic of everything.

packages/synchronize/pubspec.yaml Outdated Show resolved Hide resolved
packages/synchronize/mono_pkg.yaml Outdated Show resolved Hide resolved
packages/synchronize/lib/synchronize.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/action.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/blocs/apps.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/blocs/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/sync/mapping.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sync.dart Outdated Show resolved Hide resolved
Copy link
Member

@Leptopoda Leptopoda 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 overall. I'll take a closer look and test this later.

packages/synchronize/lib/src/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon_files/lib/sync/sources.dart Outdated Show resolved Hide resolved
@provokateurin
Copy link
Member Author

@Leptopoda if you have better names for the new types please let me know. I feel I'm not good at choosing/inventing new names

@provokateurin provokateurin force-pushed the feature/sync branch 2 times, most recently from 7d9a617 to d07e049 Compare August 29, 2023 20:56
@provokateurin provokateurin marked this pull request as ready for review August 29, 2023 20:57
@provokateurin
Copy link
Member Author

I've put the optional items as follow ups to tackle them later after the basic functionality is done.

@provokateurin
Copy link
Member Author

@Leptopoda Would it make sense to move the webdav<->io sync implementation to the nextcloud package? I don't like that it adds another dependency, but people might want to use it without depending on the whole neon package. Maybe a nextcloud_sync package would be more fitting? OTOH when we add other sync things that depend on platform specific stuff (not just io) then they can't be in the nextcloud package.

@Leptopoda
Copy link
Member

I like the current way :)

Copy link
Member

@Leptopoda Leptopoda left a comment

Choose a reason for hiding this comment

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

Only tested the basics yet and didn't check all the doc comments for style/correctness.

I also think that a lot of interfaces can still be improved with more doc comments and it would be great to add unit tests to the syncBloc (I'll also need to check the coverage).

Overall just a "few" smaller cleanups and I really love the UI in the settings. It's just beautiful

packages/neon/neon/lib/src/blocs/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/blocs/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/blocs/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/blocs/sync.dart Outdated Show resolved Hide resolved
packages/neon/neon/lib/src/blocs/sync.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Show resolved Hide resolved
packages/synchronize/lib/src/sources.dart Show resolved Hide resolved
packages/synchronize/lib/src/sync.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/journal.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/sync.dart Outdated Show resolved Hide resolved
@provokateurin
Copy link
Member Author

@Leptopoda thanks for the review. I picked up all the easy changes and will do the more complex ones in the next days.

packages/synchronize/lib/src/sync.dart Outdated Show resolved Hide resolved
packages/synchronize/lib/src/journal.dart Outdated Show resolved Hide resolved
@provokateurin
Copy link
Member Author

Based on #698

@provokateurin
Copy link
Member Author

@Leptopoda it would be great to have the notes from the meeting :)

I think we should introduce a "sync" entry in the drawer like the android app does as it is currently hidden in the depths of the settings. That entry could lead to a new page that shows the current queue and has the ability to add new sync mappings and remove them as well.
I can't remember much, but we might have discussed this idea already at the meeting 🤷‍♀️

@provokateurin
Copy link
Member Author

Fixed the long lists of conflicts so it is now up-to-date again. I didn't give it any testing.

@provokateurin
Copy link
Member Author

Unit tests for the webdav/io sync source need to be added.

@Leptopoda
Copy link
Member

@Leptopoda it would be great to have the notes from the meeting :)

#946

@provokateurin
Copy link
Member Author

Ah I forgot about that and it wasn't linked here.

I llike the direct integration into the files app, but what do you think about my idea with the separate section for sync? I like that there is a centralized place to check for there current queue (regardless of which app is syncing something, but only files for now) and to add new sync mappings. Instead of burying it in the app settings it would be pretty visible. I fear some people would never find out about sync support if they don't check through all the settings.

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.

Implement proper file and directory sync
2 participants