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

[resource] Upload or Link Chooser #18

Closed
4 of 5 tasks
mariorodeghiero opened this issue Sep 1, 2020 · 15 comments
Closed
4 of 5 tasks

[resource] Upload or Link Chooser #18

mariorodeghiero opened this issue Sep 1, 2020 · 15 comments
Assignees

Comments

@mariorodeghiero
Copy link
Contributor

mariorodeghiero commented Sep 1, 2020

When the user uploads an open upload app, the user wants to choose it is a file or link.

Acceptance

  • The user can choose what type of upload

* [ ] The metadata will infer the user to choose a link (?)

Tasks

  • UI - Create a new input to be able to choose to upload a link
  • JS/UI - Show both the drag and drop area and the input link
  • JS/UI - After the user chooses an upload link.
    • Does the drag and drop area should be hidden?

* [ ] JS/UI - After the user chooses an upload link and insert a link.
- Does the metadata should be auto-populate like already happens with the upload a file?

Bonus:

  • Refactor
    • Upload component
    • state structure
    • add more test
mariorodeghiero added a commit that referenced this issue Sep 1, 2020
- add tests
- update readme
- refactor the upload component
- refactor to create InputFile component
- refactor to create InputUrl component
- add stories in the storybook for InpuFile and InputUrl component
- edit css to add the chooser upload method
@mariorodeghiero
Copy link
Contributor Author

@kmanaseryan I did some improvements adding:

  • more tests
  • refactor
  • split the upload area in two different components
  • created the stories in the storybook for Inputs components(file and Url)

@rufuspollock
Copy link
Member

@mariorodeghiero I suggest we use figma to illustrate flow here if poss at the start so we get clear.

  • Once you've chosen you only show the option for that item e.g. just show the upload stuff if we are doing upload or just link item if chose that one (btw i assume this should run off state in a sensible way)
  • I don't get what " The metadata will infer the user to choose a link (?)" means in the acceptance criteria

@mariorodeghiero
Copy link
Contributor Author

@rufuspollock is a question.
Should be infer something in metadataEditor or keep it empty(by default) when the user chooses link to upload.

@kmanaseryan
Copy link
Contributor

Guys maybe this sounds odd question, but is it possible for the users to do both? I mean upload file and also add link to file

@mariorodeghiero
Copy link
Contributor Author

I'm creating a Figma to illustrate it as Rufus' idea. I will share it here...

@rufuspollock
Copy link
Member

Guys maybe this sounds odd question, but is it possible for the users to do both? I mean upload file and also add link to file

No.

@kmanaseryan
Copy link
Contributor

I'm creating a Figma to illustrate it as Rufus' idea. I will share it here...

Sounds good. I meant if technically it is possible then maybe it's better to show both fields, but make required to pick at least one.

@mariorodeghiero
Copy link
Contributor Author

@rufuspollock To extract the information(title and format) from the URL. Do we will use some specific library or can I do this using Regex?

@rufuspollock
Copy link
Member

@mariorodeghiero you should use data.js - that's the plan ...

@rufuspollock
Copy link
Member

@mariorodeghiero remember this issue is just about the chooser - not about implementing the link option ... (that should be a separate issue and is likely dependent on data.js ...)

@mariorodeghiero
Copy link
Contributor Author

great!

mariorodeghiero added a commit that referenced this issue Sep 2, 2020
- add choose componet
- add stories for each component Choose, InputFile, InputUrl
- change Utils test file name
mariorodeghiero added a commit that referenced this issue Sep 2, 2020
- add choose componet
- add stories for each component Choose, InputFile, InputUrl
- change Utils test file name
- fix estlint
@mariorodeghiero
Copy link
Contributor Author

@rufuspollock @kmanaseryan I created a simple choose component. Now the user can choose what type of upload. If the type is an URL when the user left the focus or click enter, will send an event with the value.
In the gif below I show how it works sending a console.log with the input URL value.

url

@rufuspollock
Copy link
Member

rufuspollock commented Sep 3, 2020 via email

@rufuspollock rufuspollock changed the title Upload or Link Chooser [resource] Upload or Link Chooser Sep 4, 2020
@rufuspollock
Copy link
Member

@mariorodeghiero can we now close this?

@mariorodeghiero
Copy link
Contributor Author

FIXED. Now the user can choose what type of upload. If the type is an URL when the user left the focus or click enter, will send an event with the value.

  • UI - Create a new input to be able to choose to upload a link
  • JS/UI - Show both the drag and drop area and the input link

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

No branches or pull requests

3 participants