transport-data / tdc-data-portal

https://tdc-data-portal.vercel.app
1 stars 2 forks source link

Implement Follow/Unfollow Functionality for Datasets, Geographies and Organizations #128

Closed Uchechukwu-Onye-Igbo closed 1 week ago

Uchechukwu-Onye-Igbo commented 1 month ago

As a user of the TDC portal, I want to be able to follow or unfollow specific datasets, geographies and organizations, so that I can easily get updates about them and be kept informed about how my favorite organisations/geographies/datasets change.

Tasklist (TBD - to be updated by the developer)

Acceptance Criteria

Given that I am a logged in user of the TDC portal viewing a dataset detail page,

Uchechukwu-Onye-Igbo commented 1 month ago

Additional Improvements/Points

@willy1989cv

Uchechukwu-Onye-Igbo commented 1 month ago

Hello @willy1989cv

I cannot follow any org, db or geography. i keep clicking on them but it never works.

please take a look

Uchechukwu-Onye-Igbo commented 1 month ago

QA Feedback

Hello @willy1989cv

Hello @willy1989cv

I cannot follow any org, db or geography. i keep clicking on them but it never works.

please take a look

Thanks for fixing the point i raised earlier.

There is however a new issue i am noticing when i try to follow the dataset named "dataset with everything". There are 3 things to follow, but when i follow the 3, it reads that I follow 4. when i am not following any of the 3, it reads I am following 1 of the items. see images below.

following 4 Image

following 1 Image

FYI, from what I can see so far, this only happens to this dataset.

willy1989cv commented 1 month ago

FYI, from what I can see so far, this only happens to this dataset.

This is because this dataset is related to all regions available. This causes the api to crash when checking which regions the user is following. I'll try to find a solution even tho this might not be a common case @Uchechukwu-Onye-Igbo

willy1989cv commented 1 month ago

Doc: https://github.com/transport-data/tdc-data-portal/tree/main/docs/follow-unfollow Test: https://github.com/transport-data/tdc-data-portal/actions/runs/11560048937/job/32176071054#step:14:1909

Uchechukwu-Onye-Igbo commented 1 month ago

Doc: https://github.com/transport-data/tdc-data-portal/tree/main/docs/follow-unfollow Test: https://github.com/transport-data/tdc-data-portal/actions/runs/11560048937/job/32176071054#step:14:1909

thanks @willy1989cv this works well now.

nicolas-becker commented 1 week ago

@willy1989cv this is working perfectly. I am just unsure how to check this point from the acceptance criteria:

Uchechukwu-Onye-Igbo commented 1 week ago

@willy1989cv this is working perfectly. I am just unsure how to check this point from the acceptance criteria:

  • [ ] If I am already following any of the items associated with a dataset i am viewing, the label changes to "unfollow" from "follow"

hi @nicolas-becker we did not implement it this way because we now have numbers. so the numbers increases or decreases and one can follow more than one item. so i will remove it