Support drag-and-drop file publishing #4170

Merged
btzr-io merged 14 commits from drag-drop into master 2020-05-25 16:27:37 +02:00
btzr-io commented 2020-05-11 08:41:59 +02:00 (Migrated from github.com)

PR Checklist

Please check all that apply to this PR using "x":

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

  • Support drag-and-drop file publishing #350

What is the current behavior?

What is the new behavior?

Todo

  • Reduce fileDrop complexity.
  • Smooth transition to publish page
  • Add option to cancel publish navigation.
  • Use a modal for the file selector.
  • Rewrite file selection flow on publish page.
## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ ] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting) - [x] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes - Support drag-and-drop file publishing #350 ## What is the current behavior? ## What is the new behavior? ## Todo - [x] Reduce `fileDrop` complexity. - [x] Smooth transition to publish page - [x] Add option to cancel publish navigation. - [x] Use a modal for the file selector. - [x] Rewrite file selection flow on publish page.
btzr-io commented 2020-05-11 21:23:21 +02:00 (Migrated from github.com)

@seanyesmunt What do you think? https://github.com/lbryio/lbry-redux/pull/314

@seanyesmunt What do you think? https://github.com/lbryio/lbry-redux/pull/314
btzr-io commented 2020-05-13 05:59:03 +02:00 (Migrated from github.com)

Still work in progress, here is a preview:

drop

Still work in progress, here is a preview: ![drop](https://user-images.githubusercontent.com/14793624/81769704-efae9e80-94a3-11ea-8354-469c179a527a.gif)
btzr-io commented 2020-05-15 08:09:17 +02:00 (Migrated from github.com)

I think is ready for a review, before I continue to work on this.

I think is ready for a review, before I continue to work on this.
neb-b commented 2020-05-15 15:52:42 +02:00 (Migrated from github.com)

Great. Will give this a test/review today!

Great. Will give this a test/review today!
neb-b (Migrated from github.com) requested changes 2020-05-15 17:39:47 +02:00
neb-b (Migrated from github.com) left a comment

This is awesome. It seems to work good and feels super smooth. I just have one comment on the radio styles

This is awesome. It seems to work good and feels super smooth. I just have one comment on the radio styles
@ -0,0 +62,4 @@
return (
<div className={'file-list'}>
<RadioGroup {...radio} aria-label="files">
neb-b (Migrated from github.com) commented 2020-05-15 17:36:05 +02:00

I would like avoid creating another radio button style. Can you use the current radio buttons? Or update <FormField type="radio" /> (And maybe creating <FormFieldRadioGroup />)

I would like avoid creating another radio button style. Can you use the current radio buttons? Or update `<FormField type="radio" />` (And maybe creating `<FormFieldRadioGroup />`)
neb-b (Migrated from github.com) commented 2020-05-15 17:37:44 +02:00

Please wrap this in __()

Please wrap this in `__()`
@ -0,0 +51,4 @@
}, [history]);
// Delay hide and navigation for a smooth transition
const hideDropArea = () => {
neb-b (Migrated from github.com) commented 2020-05-15 17:37:14 +02:00

This feels really smooth 👍

This feels really smooth 👍
btzr-io (Migrated from github.com) reviewed 2020-05-17 22:54:51 +02:00
@ -0,0 +62,4 @@
return (
<div className={'file-list'}>
<RadioGroup {...radio} aria-label="files">
btzr-io (Migrated from github.com) commented 2020-05-17 22:54:51 +02:00

Where are the radio styles? I can't find it

Where are the radio styles? I can't find it
btzr-io (Migrated from github.com) reviewed 2020-05-18 01:18:50 +02:00
@ -0,0 +62,4 @@
return (
<div className={'file-list'}>
<RadioGroup {...radio} aria-label="files">
btzr-io (Migrated from github.com) commented 2020-05-18 01:18:50 +02:00

I can't use the current FormField component with reakit, but now it has the same styles

I can't use the current `FormField` component with `reakit`, but now it has the same styles
btzr-io (Migrated from github.com) reviewed 2020-05-18 01:19:54 +02:00
btzr-io (Migrated from github.com) commented 2020-05-18 01:19:54 +02:00

ok, done.

ok, done.
btzr-io commented 2020-05-18 01:21:47 +02:00 (Migrated from github.com)

Should I limit the drop area to the card ?

Right now it works if you drop on any place in the window. Maybe change the message to "Drop anywhere..." ?

Should I limit the drop area to the card ? Right now it works if you drop on any place in the window. Maybe change the message to "Drop anywhere..." ?
btzr-io commented 2020-05-18 05:26:08 +02:00 (Migrated from github.com)

I didn't like the new look when dropping one file and also it didn't make sense to have a radio input just for one choice, so I made it more simple. let me know what you think.

I didn't like the new look when dropping one file and also it didn't make sense to have a radio input just for one choice, so I made it more simple. let me know what you think.
neb-b commented 2020-05-18 23:05:23 +02:00 (Migrated from github.com)

@btzr-io I just tried running this branch again and nothing happened when I dropped a file on the page.

I think dropping should work for the entire window, not just the card.

@btzr-io I just tried running this branch again and nothing happened when I dropped a file on the page. I think dropping should work for the entire window, not just the card.
btzr-io commented 2020-05-18 23:19:49 +02:00 (Migrated from github.com)

@seanyesmunt is working for me, what file did you use ? any errors ? 🙃

Can you try a different file ?

@seanyesmunt is working for me, what file did you use ? any errors ? 🙃 Can you try a different file ?
btzr-io commented 2020-05-19 19:55:28 +02:00 (Migrated from github.com)

Also keep in mind folders are not scanned recursively.

Also keep in mind folders are not scanned recursively.
neb-b commented 2020-05-19 21:42:14 +02:00 (Migrated from github.com)

Sorry for the wait. Busy working with paid content on lbry.tv.

Testing again

Sorry for the wait. Busy working with paid content on lbry.tv. Testing again
neb-b commented 2020-05-19 21:45:28 +02:00 (Migrated from github.com)

Hm it is working for me now! I like the simplified look. Will give this another code review after I merge the big paid content PR!

Hm it is working for me now! I like the simplified look. Will give this another code review after I merge the big paid content PR!
neb-b (Migrated from github.com) approved these changes 2020-05-25 16:27:24 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#4170
No description provided.