Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

fix: add token expired message and fix navigation and title text #119

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

techno-disaster
Copy link
Contributor

@techno-disaster techno-disaster commented Jul 30, 2020

Description

This PR fixes the issue where the jwt token is expired and the user has to relogin to fix this. This PR also fixes the issue where the user could not navigate properly after clicking on the "Find Members" button, this also fixes the issue where text in app titile wont change

Fixes #118
Fixes #113
Fixes #124

Flutter Channel:

  • I have used the Flutter Beta channel on my local machine

Type of Change:

Delete irrelevant options.

  • User Interface

How Has This Been Tested?

Physical Device

ezgif com-video-to-gif (1)

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged

s

@techno-disaster techno-disaster added Category: User Interface Improvements or additions to design. Status: Needs Review PR needs an additional review or a maintainer's review. labels Jul 30, 2020
Copy link

@robotjellyzone robotjellyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 🎉 great job @techno-disaster

@techno-disaster techno-disaster changed the title fix: add token expired message and fix navigation fix: add token expired message and fix navigation and title text Aug 2, 2020
@techno-disaster
Copy link
Contributor Author

@anitab-org/qa-team can someone give this a quick test?

Copy link
Member

@isabelcosta isabelcosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm basing my review on the GIF, but I would like @bartekpacia 's input on this.

@isabelcosta isabelcosta added Status: Needs Testing Work has been reviewed and needs the code tested by the quality assurance team. and removed Status: Needs Review PR needs an additional review or a maintainer's review. labels Aug 5, 2020
Copy link

@robotjellyzone robotjellyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this pr , it requires some changes as can be seen below :

The changes made in this PR were tested locally. Following are the results:

1. Code Review : Done

2. All possible responses were tested as below :

Screenshot/gif :

title text not changing

Expected Result : When I change a screen through clicking the bottom navigation menu the screen titles should change accordingly.
Actual Result : Not working in the expected manner. Title text remains the same even on navigating to different tabs at bottom

find members

Expected Result : On clicking Find Members, it should lead you to the Members Page
Actual Result : When I first clicked it after I was just logged in then it was working fine and leading me to the Members Page but after again clicking it, it's not working and not leading anywhere.

3. Remaining Test Case : For testing the token I need to wait for 7 days till it expires. I Will update on it after Week
4. Additional test cases covered : n/a
5. Device : Emulator Pixel 2 XL API 27

@robotjellyzone
Copy link

robotjellyzone commented Aug 9, 2020

@techno-disaster @isabelcosta didn't tested the first test case of token expire message as for this i have to wait for 7 days till it expires 😅 will update after a week .

@techno-disaster
Copy link
Contributor Author

@techno-disaster @isabelcosta didn't tested the first test case of token expire message as for this i have to wait for 7 days till it expires 😅 will update after a week .

you can host the backup on your laptop and change that time.

@robotjellyzone robotjellyzone added the Status: Changes Requested Changes are required to be done by the PR author. label Aug 9, 2020
@rpattath rpattath removed the Status: Needs Testing Work has been reviewed and needs the code tested by the quality assurance team. label Aug 11, 2020
@techno-disaster
Copy link
Contributor Author

I have tested this pr , it requires some changes as can be seen below :

The changes made in this PR were tested locally. Following are the results:

1. Code Review : Done

2. All possible responses were tested as below :

Screenshot/gif :

title text not changing

Expected Result : When I change a screen through clicking the bottom navigation menu the screen titles should change accordingly.
Actual Result : Not working in the expected manner. Title text remains the same even on navigating to different tabs at bottom

find members

Expected Result : On clicking Find Members, it should lead you to the Members Page
Actual Result : When I first clicked it after I was just logged in then it was working fine and leading me to the Members Page but after again clicking it, it's not working and not leading anywhere.

3. Remaining Test Case : For testing the token I need to wait for 7 days till it expires. I Will update on it after Week
4. Additional test cases covered : n/a
5. Device : Emulator Pixel 2 XL API 27

@robotjellyzone are you sure its not working? can you try pulling the latest changes from my branch just to be sure? I just tested this on my device again and it works just fine.

@techno-disaster
Copy link
Contributor Author

@robotjellyzone any updates?

@techno-disaster
Copy link
Contributor Author

@anitab-org/qa-team @anitab-org/mentorship-flutter-maintainers any updates?

@techno-disaster techno-disaster added Status: Needs Review PR needs an additional review or a maintainer's review. and removed Status: Changes Requested Changes are required to be done by the PR author. labels Sep 9, 2020
@techno-disaster
Copy link
Contributor Author

@anitab-org/mentorship-flutter-maintainers @anitab-org/coding-team can someone review this?

@robotjellyzone
Copy link

@robotjellyzone any updates?

hi, @techno-disaster can you please provide an account to check for this members button as it's not there due to the already present relation on the relation page ?

@techno-disaster
Copy link
Contributor Author

@robotjellyzone any updates?

hi, @techno-disaster can you please provide an account to check for this members button as it's not there due to the already present relation on the relation page ?

Hey, I don't have one right now, but could you create one? If not I can get back to you by tommorow. Thanks

@robotjellyzone
Copy link

@robotjellyzone any updates?

hi, @techno-disaster can you please provide an account to check for this members button as it's not there due to the already present relation on the relation page ?

Hey, I don't have one right now, but could you create one? If not I can get back to you by tommorow. Thanks

ok i will create new as i have already created many so, sometimes creates confusion but ok I will create one now :)

@techno-disaster
Copy link
Contributor Author

ometimes creates confusion but ok I will create one now :)

same here 🤦 . Thanks for the cooperation tho :)

@robotjellyzone
Copy link

robotjellyzone commented Sep 9, 2020

ometimes creates confusion but ok I will create one now :)

same here 🤦 . Thanks for the cooperation tho :)

it will be great if you can test the token expiry feature by yourself :) as it requires a time span to be given .!!

robotjellyzone
robotjellyzone previously approved these changes Sep 9, 2020
Copy link

@robotjellyzone robotjellyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this pr , it is working fine on my side :

The changes made in this PR were tested locally. Following are the results:

1. Code Review : Done

2. All possible responses were tested as below :

Screenshots gif :

titlechanges

Expected Result : When I change a screen through clicking the bottom navigation menu the screen titles should change accordingly.
Actual Result : Working as expected!

find members

Expected Result : On clicking Find Members, it should lead you to the Members Page
Actual Result : Working as expected!

3. Remaining Test Case : For testing the token I need to wait for 7 days till it expires. It will be great if you @techno-disaster can test this feature will be provided by you
4. Additional test cases covered : n/a
5. Device : Emulator Pixel 2 XL API 27

@isabelcosta
Copy link
Member

@robotjellyzone thank you so so much for testing this 🙌 And about the token expiry test, I can always see how that goes in the future. I'll test that eventually.

Copy link
Member

@isabelcosta isabelcosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@techno-disaster I noticed 2 things in the code, but I am only requesting one change, which is in the message displayed the user. I should have noticed this before 🙈 The change then won't need to have additional tests :)

lib/screens/home/pages/stats/stats_page.dart Outdated Show resolved Hide resolved
@@ -94,7 +95,12 @@ class _StatsPageState extends State<StatsPage> {
);
}
if (state is StatsPageFailure) {
return Text(state.message);
if (state.message == "The token has expired! Please, login again or refresh it.") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to think of a better way to do this, comparing the message will cause this feature to break if we decide later to change the message returned by the API. Perhaps now makes sense to return something else added to the message. Can you create an issue on Flutter repo to address this change, please? If not changed now perhaps later, but with an issue, we won't forget about this problem. @techno-disaster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anitab-org/mentorship-android-maintainers any idea how this is done on the android side? Not sure if there is any other alternative right now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but you can ask on #mentorship-system stream on Zulip. I don't remember now 🤔

@isabelcosta isabelcosta added Status: Changes Requested Changes are required to be done by the PR author. and removed Status: Needs Review PR needs an additional review or a maintainer's review. labels Sep 9, 2020
Co-authored-by: Isabel Costa <11148726+isabelcosta@users.noreply.github.com>
@techno-disaster techno-disaster added Status: Needs Review PR needs an additional review or a maintainer's review. and removed Status: Changes Requested Changes are required to be done by the PR author. labels Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Category: User Interface Improvements or additions to design. Status: Needs Review PR needs an additional review or a maintainer's review.
Projects
None yet
4 participants