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

Things to complete #9

Open
16 of 18 tasks
derrxb opened this issue Dec 27, 2020 · 21 comments
Open
16 of 18 tasks

Things to complete #9

derrxb opened this issue Dec 27, 2020 · 21 comments

Comments

@derrxb
Copy link
Contributor

derrxb commented Dec 27, 2020

Here's a few things we can do:

Front-End

  • Add create inbox form
  • Enable Guest Inbox
  • Add favorites page
  • Add subscriptions pages
  • Add create a subscription form
  • Allow user to delete a suggestion
  • Allow user to save a suggestion

Back-End

  • Add mnemonics API
  • Create favorites table (DB)
  • Create Subscriptions table (DB)
  • Add GET api/v1/inboxes/:inbox_url/documents => All inbox saved suggestions (this is the favorites)
  • Add POST api/v1/inboxes/:inbox_url/suggestion/:suggestion_id to save a suggestion
  • Add DELETE api/v1/inboxes/:inbox_url/suggestion/:suggestion_id to delete a suggestion
  • Add GET api/v1/inboxes/:inbox_url/subscriptions => List of subscriptions
  • Add POST api/v1/inboxes/:inbox_url/subscriptions => Create a subscription
  • Add DELETE api/v1/inboxes/:inbox_url/subscriptions/:subscription_id => List of subscriptions

Data Sources

We need to add various other API sources for our data.

  • Add Wikimedia support
  • Add news Api support

Edits:

  • Rename inbox_id => inbox_url
  • Add subscriptions api endpoints tasks
  • Remove references to favorites API
  • Added the guest inbox task
  • Remove delete subscription option

@Kyeg @eslywadan

@derrxb
Copy link
Contributor Author

derrxb commented Jan 2, 2021

Hi! I will work on these today:

  1. Create Inbox form (front-end): This will just be one the front-end since we already have the backend working.
  2. Create Favorites table (API): I think this can be linked to an inbox. I.e. an inbox has a favourite table and a favourites table belong to an inbox.
  3. Create Subscriptions table (API): This is the same as the favourite. i.e. an inbox has subscriptions and a subscription belong to an inbox.
  4. Allow users to save or delete a suggestion: API endpoints

@derrxb
Copy link
Contributor Author

derrxb commented Jan 3, 2021

I'm still working on the tasks above. Will try to get them done today.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 3, 2021

I worked on creating the favourites table today. However, after playing around with it for a bit, it seemed a bit off. So I implemented this by creating a join table called inboxes_documents that should link and inbox with documents. And whenever a record is added to this table, you establish a saved_document or favourite. @Kyeg @eslywadan What do you guys think?

Also, I feel like something similar can be done for topics and subscriptions. We currently have a document => topics link and so I plan to add an inbox => topics link. In which this relationship is stored in a inboxes_topics table. With this, adding/removing a topic is pretty much just removing or adding a topic.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 11, 2021

I'm working on the API endpoint for subscriptions in an inbox. I'm thinking this would be the useful API endpoints:

  • GET api/v1/inboxes/:inbox_id/subscriptions => List of subscriptions
  • POST api/v1/inboxes/:inbox_id/subscriptions => Create a subscription
  • DELETE api/v1/inboxes/:inbox_id/subscriptions/:subscription_id => List of subscriptions

@Kyeg @eslywadan

@Kyeg
Copy link
Contributor

Kyeg commented Jan 11, 2021

Ok, it seems reasonable

@derrxb
Copy link
Contributor Author

derrxb commented Jan 11, 2021

I've completed the tasks I mentioned I would be working on here: #13

@derrxb
Copy link
Contributor Author

derrxb commented Jan 11, 2021

I opened another PR here: #14 that makes some changes to the controller by adding the front-end. I'm planning on implementing these front-end parts now:

  • Allow user to delete a suggestion
  • Allow user to save a suggestion

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

I opened two PRs to completed the tasks mentioned in the above comment: API PR #17 & APP PR KED-2020/app-mind-map#4

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

I'm going to work on the two following tasks on the front-end:

  • Subscriptions page
  • Create a new subscription

Thankfully, the back-end is already created for these. So I'll add any additional required changes to the backend while working on this.

@Kyeg
Copy link
Contributor

Kyeg commented Jan 12, 2021

Ok, I have tested API PR #17 &APP PR KED-2020/app-mind-map#4.
You can merge them.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

Here's an update on my progress. I've updated two PRs to complete the tasks mentioned in comment above: APP PR KED-2020/app-mind-map#5 & API PR #18

Also, how's your part coming along @Kyeg. I'm really hoping it's possible to get that done before tomorrow afternoon since it's one of the most important parts of the project. In the meantime, I'll make sure to finish as many features as I can.

@eslywadan How is it coming along with adding the additional API gateway? I've added Subscriptions above that allows users to specify some keywords they'd to take into account when gathering suggestions. This can help you test that the API gateway actually works or is useful.

P.S I'm taking a break right now. But I'll merge in the branches in about 15-20 mins. Not sure if you guys would be able to look into in that short time though.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

Hey, I'm going to work on the following tasks on the front-end & back-end:

  • Front-end: Add the favourites page
  • Back-end: Add any additional work that needs to be done to complete the favourites page.

Hopefully, I can get that done before I sleep. We also need to start to work on our Google Slide's presentation. I will see if I can add some stuff to it before I go to bed.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

Here's another update on my progress. I've updated two PRs to complete the tasks mentioned in the comment above => API PR #19 & APP PR KED-2020/app-mind-map#6

The API PR is broken right now due to a change I made recently. However, I will try to fix this asap. Or maybe tomorrow. I'm not sure. It's a bit late rn and I don't have really have that much more time to commit to this. I've had the flu and sore throat for the past few days and really need to get sleep.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

So I fixed the broken PR. I'll merge them in the main now. All tests are passing :)

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

The last task I'll work on before I get some sleep will be to enable the guest inbox feature. For guest inbox, the user shouldn't care about manually creating an inbox. We simply store the inbox ID in a cookie for them. And then all the features work as normal

@derrxb
Copy link
Contributor Author

derrxb commented Jan 12, 2021

The guest inbox was completed and merged here: KED-2020/app-mind-map#7

@Kyeg
Copy link
Contributor

Kyeg commented Jan 13, 2021

Ok, I have tested the API PR #19 & the APP PR KED-2020/app-mind-map#7.
It looks great! Thanks!

As we have subscription page, I think the following hard-code part can be replace by our real api.

Mapper::GithubSuggestions.new(@gh_token).suggestions('tensorflow')

And another little error is when we try to find a non-existed inbox url, the ERR_TOO_MANY_REDIRECTS will pop up.
I guess the router is broken here, but I think it's just a little problem for our demo.

@Kyeg
Copy link
Contributor

Kyeg commented Jan 13, 2021

By the way, @derrxb are you using cookie/session in our front-end?

I think it looks excellent!
It just like a simplified account system, no matter the guest (random id) or a user-defined account looks smooth.
Because it's maybe a different architecture between we and other teams, I think we can emphasize this in our presentation.

I will try to deploy it on the Heroku, checking whether it has no problem.

@derrxb
Copy link
Contributor Author

derrxb commented Jan 13, 2021

We basically use the cookie to store the inbox_id. So the user doesn't have to worry about creating an inbox. I want to add a button that upgrades the inbox to a regular inbox.

@Kyeg
Copy link
Contributor

Kyeg commented Jan 13, 2021

I have deployed the latest branch, and open 2 PR about the production env:
API: #20
APP: KED-2020/app-mind-map#8

@Kyeg Kyeg closed this as completed Jan 13, 2021
@Kyeg Kyeg reopened this Jan 13, 2021
@derrxb
Copy link
Contributor Author

derrxb commented Jan 13, 2021

I know. But the subscriptions part should be replaced with the worker? We still don't have the scheduled worker or concurrency party set up yet.

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

2 participants