anitab-org / mentorship-android

Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the Android application of this project.
https://github.com/anitab-org/mentorship-android/raw/apk/app-debug.apk
GNU General Public License v3.0
164 stars 379 forks source link

fix: Use dashboard endpoint instead of home #784

Closed vatsalkul closed 3 years ago

vatsalkul commented 4 years ago

Description

As a developer, I need to use /dashboard api endpoint to show the data on app dashboard. Backend currently have an endpoint called /dashboard which is supposed to use by frontend apps in order to show the dashboard of a user. Not only the count, it includes important details about every relationship (pending, accepted, rejected, cancelled, completed)

Acceptance Criteria

Update [Required]

Enhancement to Update [Optional]

Definition of Done

Estimation

7 hours

yashhalgaonkar commented 4 years ago

Hey, @vatsalkul I would like to work on this for OSH.

vatsalkul commented 4 years ago

@yashhalgaonkar thanks for showing interest in contributing to mentorship android 🎉. The program OSH will start from 1 September. Once the program starts you can work on this

aditmehta9 commented 4 years ago

Hey, @vatsalkul I would like to work on this for OSH.

Assigned.

vatsalkul commented 4 years ago

@yashhalgaonkar Are you working on this? If you have issues, feel free to reach out to zulip channel: http://anitab-org.zulipchat.com/

yashhalgaonkar commented 4 years ago

@vatsalkul yes I am working on it. I will reach out if I have any issue.

yashhalgaonkar commented 4 years ago

@vatsalkul There is no achievement field in /dashboard endpoint. So what should I display in the existing achievement section in the UI?

yashhalgaonkar commented 4 years ago

@vatsalkul Even the name field is missing in /dashboard endpoint.

vatsalkul commented 4 years ago

@yashhalgaonkar Achievements means, task which has been completed. tasks_done can be interpreted as achievement.

vatsalkul commented 4 years ago

@yashhalgaonkar What mentorship ios does is, it fetches dashboard and profile when logging in so the name is accessible from profile api. There is no need to use profile api on dashboard as of now. Just fetch dashboard and do not update name on screen (app will show just welcome). We can raise issue on mentorship backend for the same.

yashhalgaonkar commented 4 years ago

@vatsalkul Got it. Thanks

vj-codes commented 4 years ago

@yashhalgaonkar how's the PR going?

vj-codes commented 4 years ago

Unassigning @yashhalgaonkar due to inactivity .If you would like to work again , do let us know in comments:)

epicadk commented 4 years ago

@vj-codes can I work on this?

vj-codes commented 4 years ago

Assigning you @epicadk Happy coding! Note : this is an OSH issue so the PR must be created on/before 30th Sept

epicadk commented 4 years ago

Assigning you @epicadk Happy coding! Note : this is an OSH issue so the PR must be created on/before 30th Sept

@vj-codes Oh sorry I didn't realize that. I am not particularly interested in the OSH tag I just wanted to work on this. If anyone else wants to work on this for OSH please let them . I will work on this after the event then if possible.

vj-codes commented 4 years ago

@epicadk no problem, you can still work on this just will have to wait until 1st Oct to submit the fix.What say?

epicadk commented 4 years ago

@epicadk no problem, you can still work on this just will have to wait until 1st Oct to submit the fix.What say?

Sure will do :-)

epicadk commented 4 years ago

@vj-codes for some reason my account does not have any tasks done and tasks to do. As in there is not tasks done or tasks to do JSON array in the response. Is this an issue that I should take up with the backend or should I code according to the current response?

vj-codes commented 4 years ago

@epicadk tasks are only possible after a user is in a mentorship relation with another user as a mentor/mentee. The simplest way is to make another account on apk, send a request to the previous acc accept it and then create/complete tasks. If even after doing as suggested above the same problem persists, do make an issue. What say?

epicadk commented 4 years ago

@epicadk tasks are only possible after a user is in a mentorship relation with another user as a mentor/mentee. The simplest way is to make another account on apk, send a request to the previous acc accept and create/complete tasks. If even after doing as suggested above the same problem persists, do make an issue. What say?

Oh okay sure, Also what is the meaning of Show the count of relationship in each category using a table view?

vj-codes commented 4 years ago

@epicadk count as in the no of pending, accepted , rejected , cancelled for mentorship requests and completed, ongoing for mentorship relations. But just to be more sure, can you please tag the author and confirm once?

vatsalkul commented 4 years ago

@epicadk count as in the no of pending, accepted , rejected , cancelled for mentorship requests and completed, ongoing for mentorship relations. But just to be more sure, can you please tag the author and confirm once?

Yes @vj-codes you are right.

epicadk commented 4 years ago

I don't see the mentorship relations in the response Model do we have to get it from a different endpoint? Also for the mentorship requests should we further sort them into sent the received ? @vatsalkul

So currently I have set it up like this. There are two columns unders As mentor one for sent and one for received requests. Same for as Mentee. Should I just combine the two or should I keep sent the received requests different? <img src ="https://user-images.githubusercontent.com/56596662/94563421-55999800-0284-11eb-8d0a-2c2083c7c290.png" height = 450 width = 250>

epicadk commented 4 years ago

I don't see the mentorship relations in the response Model do we have to get it from a different endpoint? Also for the mentorship requests should we further sort them into sent the received ? @vatsalkul

So currently I have set it up like this. There are two columns unders As mentor one for sent and one for received requests. Same for as Mentee. Should I just combine the two or should I keep sent the received requests different?

@vj-codes thoughts?

vj-codes commented 4 years ago

@epicadk after a request is accepted , it is only then considered as a relation so for the first part I would say Accepted Requests will have the same meaning as mentorship relations .Any counter thoughts?

vj-codes commented 4 years ago

@epicadk and for the second part , what if I as a user is not available to mentor , will the UI be displayed as faded or completely vanished as I can later update myself as a mentor . The current one is bit difficult to understand is the first column for sent or for received requests?

vj-codes commented 4 years ago

@vatsalkul does the iOS one use dashboard endpoint? 👀

epicadk commented 4 years ago

@epicadk and for the second part , what if I as a user is not available to mentor , will the UI be displayed as faded or completely vanished as I can later update myself as a mentor . The current one is bit difficult to understand is the first column for sent or for received requests?

Yeah actually that was my question because if I add a sent and received header to the columns then I will not be able to use tablelayout because it does not support row span. So Instead I'll have to use grid layout but the author has asked for a table layout so should I just combine the sent and received or should I use a table layout?

epicadk commented 4 years ago

@epicadk after a request is accepted , it is only then considered as a relation so for the first part I would say Accepted Requests will have the same meaning as mentorship relations .Any counter thoughts?

So should I change accepted requests to relations or just let it be the way it is right now?

epicadk commented 4 years ago

@epicadk and for the second part , what if I as a user is not available to mentor , will the UI be displayed as faded or completely vanished as I can later update myself as a mentor . The current one is bit difficult to understand is the first column for sent or for received requests?

Also , @vj-codes I am not sure there is a way to tell if the user has just signed up to be a mentor/ mentee just from the Dashboard endpoint.

vj-codes commented 4 years ago

@epicadk after a request is accepted , it is only then considered as a relation so for the first part I would say Accepted Requests will have the same meaning as mentorship relations .Any counter thoughts?

So should I change accepted requests to relations or just let it be the way it is right now?

@epicadk I would say keep it for now

vj-codes commented 4 years ago

@epicadk and for the second part , what if I as a user is not available to mentor , will the UI be displayed as faded or completely vanished as I can later update myself as a mentor . The current one is bit difficult to understand is the first column for sent or for received requests?

Also , @vj-codes I am not sure there is a way to tell if the user has just signed up to be a mentor/ mentee just from the Dashboard endpoint.

@epicadk yeah right that can be done by GET/user. Btw the dashboard endpoint has 2 separate sections for accepted, rejected... requests as a mentor and mentee. So on UI if there are 2 rows one for as mentor and other for as mentee and when I click on any one ,the table which is to be done in this issue can be displayed with just one column along with details. But this will require many UI changes cc: @vatsalkul

epicadk commented 4 years ago

@epicadk and for the second part , what if I as a user is not available to mentor , will the UI be displayed as faded or completely vanished as I can later update myself as a mentor . The current one is bit difficult to understand is the first column for sent or for received requests?

Also , @vj-codes I am not sure there is a way to tell if the user has just signed up to be a mentor/ mentee just from the Dashboard endpoint.

@epicadk yeah right that can be done by GET/user. Btw the dashboard endpoint has 2 separate sections for accepted, rejected... requests as a mentor and mentee. So on UI if there are 2 rows one for as mentor and other for as mentee and when I click on any one ,the table which is to be done in this issue can be displayed with just one column along with details. But this will require many UI changes cc: @vatsalkul

So should I make a request to the /user endpoint as well ? or should I raise an issue with the backend so that we can get the same information on the /dashboard endpoint?

epicadk commented 4 years ago

@epicadk and for the second part , what if I as a user is not available to mentor , will the UI be displayed as faded or completely vanished as I can later update myself as a mentor . The current one is bit difficult to understand is the first column for sent or for received requests?

Also , @vj-codes I am not sure there is a way to tell if the user has just signed up to be a mentor/ mentee just from the Dashboard endpoint.

@epicadk yeah right that can be done by GET/user. Btw the dashboard endpoint has 2 separate sections for accepted, rejected... requests as a mentor and mentee. So on UI if there are 2 rows one for as mentor and other for as mentee and when I click on any one ,the table which is to be done in this issue can be displayed with just one column along with details. But this will require many UI changes cc: @vatsalkul

So should I make a request to the /user endpoint as well ? or should I raise an issue with the backend so that we can get the same information on the /dashboard endpoint?

@vj-codes @vatsalkul ??

vj-codes commented 4 years ago

@epicadk first raising an issue on backend would be good but you might have to wait until all OSH finishes for answers. Also there's a Mentorship System Sync Up session on 6th Oct, you can ask Isabel directly in the session :)

epicadk commented 4 years ago

@vatsalkul I just saw the ios implementation is that what you had in mind? I think an expandableListView Would be much better than a table Layout for that. If so can you update the requirements?

epicadk commented 4 years ago

@epicadk first raising an issue on backend would be good but you might have to wait until all OSH finishes for answers. Also there's a Mentorship System Sync Up session on 6th Oct, you can ask Isabel directly in the session :)

Okay Sure

epicadk commented 4 years ago

@vj-codes should I proceed with the expandable list view or should I wait for the author to respond?

vj-codes commented 4 years ago

@epicadk the issue says table layout so how about you create a work in progress (WIP) PR with the changes you mentioned earlier ?

Meanwhile @vatsalkul can you please confirm whether table view or exapandable list would be the best implementation for this issue? Thanks!

vatsalkul commented 4 years ago

Sorry @vj-codes @epicadk for not being active since last few days. I was stuck in some of my work.

@epicadk Yes, iOS app uses dashboard endpoint. I will share screen recording of iOS, which will help you in developing the UI.

vatsalkul commented 4 years ago

Please have a look on Mentorship iOS app here

epicadk commented 4 years ago

Please have a look on Mentorship iOS app here

This will require significant ui changes . @vj-codes should I proceed?

vj-codes commented 4 years ago

@epicadk yes but don't make UI changes exactly same as iOS one , the current color codes and theme of Android should be followed, just the flow and layout should be correspond

vatsalkul commented 4 years ago

@vj-codes Agreed! No need to make huge changes. It was just for reference of how data flows in iOS app

isabelcosta commented 3 years ago

Closing due to this comment https://github.com/anitab-org/mentorship-android/pull/1015#issuecomment-729166252