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

add media capabilities #3

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

phryneas
Copy link

@phryneas phryneas commented Jan 10, 2020

So I'm still working on this, but to make things as transparent as possible I'm already opening a draft PR :)

This would in the end allow for media attachments of scheduled tweets.

As I said on twitter, I'd not add an upload but the ability to specify an external url that will be used as the source for the upload. That way you won't have to pay for storage.

Things to note: I refactored the useScheduledTweet hook to internally use use-local-slice which is a convenient wrapper around useReducer and immer, as with all the extra methods I had to add there it became quite unweildy. I hope that is okay.

My current TODO list:

  • handle the correct order for multiple media attachments
  • add the actual upload to the job
  • maybe validate the url from the frontend for existence
  • somehow manage a database migration? I guess that will be up to you as I cannot see any migrations there?

If you already have any feedback, I'd love to hear it!

@phryneas phryneas changed the title add media capabilities to db, server and ui add media capabilities Jan 10, 2020
@phryneas
Copy link
Author

Okay, I have to ask: what is up with that tweetsOrder? It seems to be only used in the server part, but not in the job.
Does this have any relevance at all?

@phryneas
Copy link
Author

And we have a successful first thread with images: https://twitter.com/phry/status/1215767864134840320

Images in the first post are out of order, but that shouldn't be too hard to figure out I guess.
For now I'll leave it at this and await your review :)

@alexluong
Copy link
Owner

@phryneas Sorry for the late response. Awesome job on the PR so far. Thank you for taking the time to check out my project. I feel so guilty for my lack of documentation 😅

I've only read through the source code but have not tried to run it yet. Everything looks great so far. Interesting package you have there (use-local-slice)!

Can you wrap up the PR with the last few polishing features/work out the kink (correct image upload order and maybe validate the image URL)? After that, I can put everything together and figure out the migration and deployment.

Please let me know if you run into any issues or have any questions. I'd be much more responsive. I was just taking an extended sabbatical from code since the holidays. Ready to get back into it now!

@phryneas
Copy link
Author

@phryneas Sorry for the late response. Awesome job on the PR so far. Thank you for taking the time to check out my project. I feel so guilty for my lack of documentation sweat_smile

Phew, I feared this was too much at once, so I wanted to wait for a first feedback 👍

I've only read through the source code but have not tried to run it yet. Everything looks great so far. Interesting package you have there (use-local-slice)!

The original API is from @reduxjs/toolkit - I liked it so much I recreated it for pure useReducer (and nowadays I'm a collaborator of RTK, that's how these things happen 😄)

Can you wrap up the PR with the last few polishing features/work out the kink (correct image upload order and maybe validate the image URL)? After that, I can put everything together and figure out the migration and deployment.

Will do. I also noticed some more little things like a maximum length for alt text and a maximum number of 4 image medias per tweet. Will add those restriction, too.

Please let me know if you run into any issues or have any questions. I'd be much more responsive. I was just taking an extended sabbatical from code since the holidays. Ready to get back into it now!

Everyone needs a timeout sometimes 😃

As I'm going to look into that image order - it might help me to understand the tweetsOrder if it has any relevance here - can you elaborate?

Okay, I have to ask: what is up with that tweetsOrder? It seems to be only used in the server part, but not in the job.
Does this have any relevance at all?

@deadcoder0904
Copy link

Any progress on this one?

@phryneas
Copy link
Author

phryneas commented May 11, 2020

To my complete shame, no. I got sick and as I had recovered, I was completely sidetracked with other things and had forgotten about this one. I can try to finish this up sometime next week.

@deadcoder0904
Copy link

deadcoder0904 commented May 11, 2020

Cool, no worries. Glad you've recovered. Was curious if it had media capabilities while reading the blog post :)

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.

None yet

3 participants