community-platform icon indicating copy to clipboard operation
community-platform copied to clipboard

[feature request] Add file download to research

Open davehakkens opened this issue 2 years ago • 12 comments

Is your feature request related to a problem? Please describe. We can't add files to research topics to download. (besides an external link)

Describe the solution you'd like Would be nice to be able to upload files to a research, like we made in how-to's. https://github.com/ONEARMY/community-platform/pull/1664 This keeps track of the downloads and makes sure the file stays online. The button can be added per step

Describe alternatives you've considered Continue using Gdrive to store files.

What it would look like

download

Features:

  • [ ] Add the option to upload files/links in a research update
  • [ ] Add the counter for downloads for files in updates
  • [ ] Refactor and implement firebase incrementation functions

davehakkens avatar Apr 24 '23 11:04 davehakkens

The logic for incrementing howto download count can be seen here, and is incorporated into the HowtoDescription through a handleClick method that is passed to the DownloadFiles component.

The more I think about this, the more I realize that I first introduced this for HowTo's so maybe it's best I take this on since I've been meaning to refactor the whole process and introduce incrementation using the firebase increment functionality. This whole process has to be cleaned up and I've been putting it off for a while... 🥲

AlfonsoGhislieri avatar Apr 24 '23 13:04 AlfonsoGhislieri

Thanks for the extra info @AlfonsoGhislieri Feel free to take it on of you want. But only do if you have the capacity for it, since you mentioned things will get more busy on your end 🙃

davehakkens avatar Apr 24 '23 18:04 davehakkens

I don't think it should take too long, will keep you updated if I can't get this done!

AlfonsoGhislieri avatar Apr 24 '23 20:04 AlfonsoGhislieri

@davehakkens there is no way to currently add a download link directly when creating/editing like there is for a Howto. I assume right now this is done just by adding a link in the description? We would need to include the option to upload files/links to the form, is this the approach you wanted?

AlfonsoGhislieri avatar Apr 25 '23 12:04 AlfonsoGhislieri

Yes indeed the method would be the same as for how-tos. File upload in the form. (It could also copy the same functionality as how-to that adds the possibility to use an external link. To keep things coherent, and track downloads. But not sure if this would be an additional issue for later.) sorry for not making this more clear in the original issue

davehakkens avatar Apr 25 '23 14:04 davehakkens

7jgjhm

thisislawatts avatar Apr 25 '23 18:04 thisislawatts

This really does continue to highlight what you said @thisislawatts, we really need to combine both of these into one. It's really not efficient and sustainable to keep having to change both separately. Worth discussing again at the next maintainer call, I do think it should be something to prioritize moving forward and it will save lots of future developing efforts.

AlfonsoGhislieri avatar Apr 25 '23 20:04 AlfonsoGhislieri

Right so @davehakkens now that all the issues should have been solved with the HowTo file downloads hopefully, this brings me back to this. Considering a lot of the work done in #2245 is now stale and needing to be reworked to match the changes made with the HowTo. I was thinking of scrapping this old PR and starting new, breaking it down like this:

  1. Add the option to upload files/links in a research update
  2. Add the counter for downloads for files in updates (is this something we actually want to have though?)
  3. Add files to research description (here I am also not sure we actually wanted this functionality right?)
  4. Refactor and implement firebase incrementation functions if we include 2 and 3

Let me know!

AlfonsoGhislieri avatar May 10 '23 08:05 AlfonsoGhislieri

  1. Thats sounds good to me.
  2. Yes download stats would be very nice. Where each upload has its own count
  3. Dont think it will be really needed but wouldnt hurt to for consistency. (but might not be worth it for maintaince?)
  4. This I don't know (:

Note: I mainly look at this from a user perspective, for that upload/download per step is most clear However i'm not sure if this goes against the potential future plan of aligning the datasets of how-to and research.

davehakkens avatar May 10 '23 14:05 davehakkens

Alright so I think then for now let's stick to adding it to the research updates with each having it's only download stats :-) I'll update the tasks!

AlfonsoGhislieri avatar May 11 '23 13:05 AlfonsoGhislieri

@AlfonsoGhislieri want to stay assigned to this or shall I put it back to the main pool for anyone to pick up?

iSCJT avatar Jun 22 '23 14:06 iSCJT

@iSCJT yes I’m slowly working back through this, a lot changed so I had to restart

AlfonsoGhislieri avatar Jun 22 '23 15:06 AlfonsoGhislieri

Hello everyone, going to start working on this feature.

balhelhas avatar Aug 08 '23 14:08 balhelhas

:tada: This issue has been resolved in version 1.88.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

onearmy-bot avatar Aug 25 '23 13:08 onearmy-bot