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

Refactor/neon/dialogs #998

Merged
merged 5 commits into from
Dec 30, 2023
Merged

Refactor/neon/dialogs #998

merged 5 commits into from
Dec 30, 2023

Conversation

Leptopoda
Copy link
Member

Fixes: #995
Fixes: #535

I moved the folder dialogs (create, rename, delete) into the framework as this can be reused in many clients.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

I do not agree with the move to put app implementation specific dialogs into the framework. If we want to support this then it should be done through the interface abstractions.
I'm sorry, but I think you will need to revert large parts of the PR.

@Leptopoda
Copy link
Member Author

I guess you mean the folder dialogs?
I agree that the framework shouldn't hold client specific code but I also argue that the concept of folders (or labels/categories as they are called on notes) is a concept many apps need. I think that they should be reused.
I can pick it apart again. And we can discuss this in a separate issue.

Can you please provide feedback to the design (as I think it changed for every dialog).
Similarly a rough review of packages/neon/neon/lib/src/widgets/dialog.dart would be great to know wether the widgets are good enough.

@Leptopoda Leptopoda force-pushed the refactor/neon/dialogs branch from fa1cacc to d432c7e Compare October 24, 2023 13:43
@Leptopoda Leptopoda mentioned this pull request Oct 28, 2023
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

I like the design a lot ❤️

I found some places that need to be improved:
image
image

I haven't tested all the dialogs yet, but most of them look very good!

packages/neon/neon/lib/src/utils/dialog.dart Outdated Show resolved Hide resolved
@Leptopoda
Copy link
Member Author

@provokateurin ping :)

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, although I still found some problems:
Opening the copy/move dialogs throws Bad state: Snapshot has neither data nor error and nothing is shown (this might already be the case on the main branch as well, I rebased this branch locally before testing).

packages/neon/neon_news/lib/widgets/feeds_view.dart Outdated Show resolved Hide resolved
@provokateurin
Copy link
Member

I checked the move/copy dialogs on the main branch and there they work, so it's definitely a regression of these changes.

@provokateurin
Copy link
Member

Btw can you maybe also fix #1220 since you are already touch that part of the code?

@Leptopoda
Copy link
Member Author

Btw can you maybe also fix #1220 since you are already touch that part of the code?

Sure. I'll take a look

@Leptopoda Leptopoda linked an issue Dec 27, 2023 that may be closed by this pull request
@Leptopoda Leptopoda force-pushed the refactor/neon/dialogs branch from 280c64e to 60cdf4a Compare December 27, 2023 09:22
@Leptopoda
Copy link
Member Author

just a rebase for now.

@Leptopoda Leptopoda force-pushed the refactor/neon/dialogs branch 2 times, most recently from 3373d66 to 1adb575 Compare December 27, 2023 11:42
packages/neon_framework/test/dialog_test.dart Outdated Show resolved Hide resolved
packages/neon_framework/test/dialog_test.dart Show resolved Hide resolved
packages/neon_framework/test/dialog_test.dart Outdated Show resolved Hide resolved
packages/neon_framework/test/dialog_test.dart Outdated Show resolved Hide resolved
@Leptopoda Leptopoda force-pushed the refactor/neon/dialogs branch from 64640f1 to 0307e80 Compare December 28, 2023 12:04
@Leptopoda Leptopoda force-pushed the refactor/neon/dialogs branch from 0307e80 to 8770601 Compare December 28, 2023 12:05
@provokateurin
Copy link
Member

Tests LGTM, I'll give it another round of tests to check that everything works correctly.

Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

From my testing:

  • Moving a file or folder has the file or folder set as the initial path. For folders this makes no sense and for files even less. The parent dir should be the initial path.
  • Instead of greying out the choose button when trying to move a directory into itself the whole entry should just be hidden in the listing. This completely avoids the problem.
  • Copying a folder into itself should still be possible (even though it is a weird use-case).

Everything else worked flawlessly ❤️

@Leptopoda
Copy link
Member Author

Copying a folder into itself should still be possible (even though it is a weird use-case).

Why? This sounds like it should just break

@provokateurin
Copy link
Member

It is not a problem because the original folder still exists. You are only creating new files, not moving which is deleting and re-adding them which requires the folder to still exist while it doesn't

@Leptopoda
Copy link
Member Author

Trying to copy a folder into itself returns in a 409 and an error message being shown
[13] [Fri Dec 29 18:23:03 2023] 172.17.0.1:49316 [409]: COPY /remote.php/webdav/Notizen
[13] [Fri Dec 29 18:23:03 2023] 172.17.0.1:49316 Closing

@provokateurin
Copy link
Member

Ok, then not special handling 👍

@Leptopoda Leptopoda force-pushed the refactor/neon/dialogs branch from 681529a to f46202f Compare December 29, 2023 22:28
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

LGTM, I think some of the logic for showing modals and bottom sheets could be moved from files into the framework so it can be reused, but that can be done later when needed.

@Leptopoda Leptopoda merged commit 67b11e5 into main Dec 30, 2023
8 checks passed
@Leptopoda Leptopoda deleted the refactor/neon/dialogs branch December 30, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants