datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Extend mixin API with helper for drag&drop event handling #275

Closed mih closed 2 years ago

mih commented 2 years ago

This generalizes the previous implementation, and extends it to MultiValueInputWidget. This meta widget will not pass drop events onto an underlying editor widget, if that supports an event.

For unsupported events that comprise of URLs (e.g. file:// URLs like one would get from a file manager), it passes them on, one-by-one, to the editor, and then builds new items from the editor representation of that URL (e.g. a path).

Drag and drop also works from the FS browser onto any Path input widget, including multi-value input of paths.

Closes #190 Closes #234

https://user-images.githubusercontent.com/136479/193039102-66327c71-6bb8-43ef-8f79-58d5303ee1d4.mp4

codecov-commenter commented 2 years ago

Codecov Report

Base: 70.59% // Head: 69.94% // Decreases project coverage by -0.65% :warning:

Coverage data is based on head (823e98c) compared to base (82392a5). Patch coverage: 41.55% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #275 +/- ## ========================================== - Coverage 70.59% 69.94% -0.66% ========================================== Files 37 37 Lines 1986 2046 +60 ========================================== + Hits 1402 1431 +29 - Misses 584 615 +31 ``` | [Impacted Files](https://codecov.io/gh/datalad/datalad-gooey/pull/275?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad) | Coverage Δ | | |---|---|---| | [datalad\_gooey/fsbrowser.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9mc2Jyb3dzZXIucHk=) | `26.58% <0.00%> (-0.54%)` | :arrow_down: | | [datalad\_gooey/param\_multival\_widget.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV9tdWx0aXZhbF93aWRnZXQucHk=) | `76.80% <22.72%> (-11.55%)` | :arrow_down: | | [datalad\_gooey/param\_widgets.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV93aWRnZXRzLnB5) | `58.16% <25.00%> (-0.56%)` | :arrow_down: | | [datalad\_gooey/api\_utils.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9hcGlfdXRpbHMucHk=) | `92.00% <77.77%> (-8.00%)` | :arrow_down: | | [datalad\_gooey/app.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9hcHAucHk=) | `57.33% <100.00%> (+0.38%)` | :arrow_up: | | [datalad\_gooey/dataladcmd\_ui.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9kYXRhbGFkY21kX3VpLnB5) | `92.50% <100.00%> (+0.83%)` | :arrow_up: | | [datalad\_gooey/gooey.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9nb29leS5weQ==) | `63.33% <100.00%> (+1.26%)` | :arrow_up: | | [datalad\_gooey/param\_form\_utils.py](https://codecov.io/gh/datalad/datalad-gooey/pull/275/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV9mb3JtX3V0aWxzLnB5) | `86.73% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.