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

Added Drag And Drop Support For The Desktop Application #41

Merged
merged 14 commits into from
Feb 16, 2023
Merged

Added Drag And Drop Support For The Desktop Application #41

merged 14 commits into from
Feb 16, 2023

Conversation

manoj1749
Copy link
Contributor

Working Video

dnd_working.mp4

@techno-disaster
Copy link
Member

Can you make the whole windows the drop target and keep the button labelled "Add files"?

@manoj1749
Copy link
Contributor Author

Can you make the whole windows the drop target and keep the button labelled "Add files"?

Yeah I can do that

@manoj1749
Copy link
Contributor Author

  • Heyy @techno-disaster , as you asked I had deleted the changes made on AddFilesButton.
  • Added the drag and drop feature for the whole window.

Working Video

updated_dnd.mp4

@techno-disaster
Copy link
Member

LGTM, one small change, upon hover can you change the drop area to "drop files here" or something similar?

@techno-disaster
Copy link
Member

also formatting and stuff, ci fails atm

@manoj1749
Copy link
Contributor Author

I think it was due to the flutter format command as if you check the log in line 37 it states " [!] The "format" command is deprecated and will be removed in a future version of Flutter. Please use the "dart format" sub-command instead, which takes all of the same command-line arguments as "flutter format". 37 "

@manoj1749
Copy link
Contributor Author

LGTM, one small change, upon hover can you change the drop area to "drop files here" or something similar?

ok will try to do that

@manoj1749
Copy link
Contributor Author

Heyy, @techno-disaster , I've tried to do what you said and basically the text in the drop area is a seperate widget and it's state can't be updated whenever we move files into the window to drop.
And also look into the thing about the flutter format test, if it fails again I will update the workflows folder and check if the same error is given or not.

@techno-disaster
Copy link
Member

techno-disaster commented Feb 8, 2023

Heyy, @techno-disaster , I've tried to do what you said and basically the text in the drop area is a seperate widget and it's state can't be updated whenever we move files into the window to drop. And also look into the thing about the flutter format test, if it fails again I will update the workflows folder and check if the same error is given or not.

Why not? maybe you can try listening to onDragEntered and onDragExited to update that state? lift up a variable? The formatting workflow is correct, just run the required commands #37 (comment)

@manoj1749
Copy link
Contributor Author

Heyy, @techno-disaster , I've tried to do what you said and basically the text in the drop area is a seperate widget and it's state can't be updated whenever we move files into the window to drop. And also look into the thing about the flutter format test, if it fails again I will update the workflows folder and check if the same error is given or not.

Why not? maybe you can try listening to onDragEntered and onDragExited to update that state? lift up a variable? The formatting workflow is correct, just run the required commands #37 (comment)

Ohk, Thanks for suggesting it, I will work on it and update you soon

@manoj1749
Copy link
Contributor Author

  • Now Dashboard updates its state everytime based on the onDragEntered and onDragExited as the user interacts with the files on the dashboard as shown in the video below
dnd_updated.mp4

@manoj1749
Copy link
Contributor Author

Xnip2023-02-11_19-54-58

  • should I need to test it in windows?

@techno-disaster
Copy link
Member

Strange, they should work in the ci too. Looks like something is wrong with bloc_test.dart? Can you confirm if it works on flutter 3.7.3?

@manoj1749
Copy link
Contributor Author

manoj1749 commented Feb 11, 2023

Strange, they should work in the ci too. Looks like something is wrong with bloc_test.dart? Can you confirm if it works on flutter 3.7.3?

You mean the flutter version I am using?

@techno-disaster
Copy link
Member

yep, if yes maybe look into why ci tests are failing too :D

@manoj1749
Copy link
Contributor Author

yep, if yes maybe look into why ci tests are failing too :D

The version I had is 3.3.9, I had tried googling about the error but what I can find is problem with the bloc_test.dart
but I am not able to figure out what is wrong in it, can you help me out?

@techno-disaster
Copy link
Member

Try upgrading to 3.7.3, the bloc test probably shows some analyzer warnings and breaks locally then too.

@manoj1749
Copy link
Contributor Author

Try upgrading to 3.7.3, the bloc test probably shows some analyzer warnings and breaks locally then too.

Yeah I had upgraded to 3.7.3, it's showing an error same as the one which we are getting in the CI tests

@manoj1749
Copy link
Contributor Author

As from what I had seen, the error is due to the package called file, as you can see it from the error

./../../.pub-cache/hosted/pub.dev/file-6.1.0/lib/src/forwarding/forwarding_file.dart:18:16: Error: The
method 'ForwardingFile.create' has fewer named arguments than those of overridden method 'File.create'.
  Future<File> create({bool recursive = false}) async =>
               ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method
('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../../../.pub-cache/hosted/pub.dev/file-6.1.0/lib/src/forwarding/forwarding_file.dart:18:16: Error: The
method 'ForwardingFile.create' doesn't have the named parameter 'exclusive' of overridden method
'File.create'.
  Future<File> create({bool recursive = false}) async =>
               ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:232:16: Context: This is the overridden method
('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../../../.pub-cache/hosted/pub.dev/file-6.1.0/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method
'ForwardingFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) =>
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method
('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
../../../.pub-cache/hosted/pub.dev/file-6.1.0/lib/src/forwarding/forwarding_file.dart:22:8: Error: The method
'ForwardingFile.createSync' doesn't have the named parameter 'exclusive' of overridden method
'File.createSync'.
  void createSync({bool recursive = false}) =>
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/io/file.dart:248:8: Context: This is the overridden method
('createSync').
  void createSync({bool recursive = false, bool exclusive = false});

upgraded file to newer version and added it in yaml file
@manoj1749
Copy link
Contributor Author

manoj1749 commented Feb 15, 2023

Solved the issues, ci tests are not failing, @techno-disaster now the tests are not failing in anything

@techno-disaster techno-disaster merged commit 3b1f2b3 into CCExtractor:master Feb 16, 2023
@techno-disaster
Copy link
Member

LGTM, nice work!

@manoj1749
Copy link
Contributor Author

Thanks😁

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