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

Fix #15735 Remove the Refresh modal class #16378

Merged
merged 38 commits into from
Jan 7, 2023
Merged

Conversation

Priyansh61
Copy link
Contributor

@Priyansh61 Priyansh61 commented Oct 21, 2022

Overview

  1. This PR fixes Switching languages is not working appropriately while playing exploration(CUJ 1.16) on web and mobile #15735
  2. This PR does the following: Fix the language change in exploration

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The linter/Karma presubmit checks have passed locally on your machine.
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
    • This lets reviewers restart your CircleCI tests for you.
  • The PR is made from a branch that's not called "develop".

Proof that changes are correct

language-2022-10-21_22.53.16.mp4

Proof of changes on desktop with slow/throttled network

Proof of changes on mobile phone

Proof of changes in Arabic language

PR Pointers

  • Make sure to follow the instructions for making a code change.
  • If you need a review or an answer to a question, and don't have permissions to assign people, leave a comment like the following: "{{Question/comment}} @{{reviewer_username}} PTAL". Oppiabot will help assign that person for you.
  • For what code owners will expect, see the Code Owner's wiki page.
  • Make sure your PR follows conventions in the style guide, otherwise this will lead to review delays.
  • Never force push. If you do, your PR will be closed.
  • Some of the e2e tests are flaky, and can fail for reasons unrelated to your PR. We are working on fixing this, but in the meantime, if you need to restart the tests, please check the "If your build fails" wiki page.

@Priyansh61 Priyansh61 requested a review from a team October 21, 2022 20:23
@Priyansh61 Priyansh61 requested a review from a team as a code owner October 21, 2022 20:23
@Priyansh61 Priyansh61 requested review from gp201 and nithinrdy October 21, 2022 20:23
@oppiabot
Copy link

oppiabot bot commented Oct 21, 2022

Hi, @Priyansh61, this pull request does not have a "CHANGELOG: ..." label as mentioned in the PR pointers. Assigning @Priyansh61 to add the required label. PRs without this label will not be merged. If you are unsure of which label to add, please ask the reviewers for guidance. Thanks!

@Priyansh61
Copy link
Contributor Author

@nithinrdy PTAL!

@nithinrdy
Copy link
Contributor

Hey, could you please explain the ideal expected behaviour (the behaviour that this PR is trying to achieve) just for my understanding?

@nithinrdy nithinrdy assigned Priyansh61 and unassigned nithinrdy Oct 25, 2022
@Priyansh61
Copy link
Contributor Author

Priyansh61 commented Oct 25, 2022

Thank you @nithinrdy for reviewing the PR.

Since a refresh is not required to change the language that appears to the user after selecting the language translation option, the PR eliminates the refresh functionality.

This does help to prevent unnecessary language switches to English when the user chooses another language.

In order to change the language without requiring a refresh, I removed the refresh modal class along with the tests and added some functionality.

I hope this helps 😄

@Priyansh61 Priyansh61 assigned nithinrdy and unassigned Priyansh61 Oct 25, 2022
@oppiabot
Copy link

oppiabot bot commented Oct 26, 2022

Hi @Priyansh61, there is a new change in develop which needs to be in your PR. Please update your branch with the latest changes in develop. For instructions, refer to this link. Thanks!

@nithinrdy
Copy link
Contributor

@Priyansh61 the issue description says that the issue arises when the user makes some progress (completes a state, for example), and then changes the language.

Select an option using radio button which redirects to next screen (i.e. complete a card/state)
Now switch to spanish language which auto-reloads the page with popup

The video in the PR description doesn't display that user journey. The language is changed before even the first card is completed.

Could you please upload a new video where you first complete a state and then change the language, and show that the issue no longer occurs?

@nithinrdy nithinrdy removed their assignment Oct 26, 2022
@Priyansh61
Copy link
Contributor Author

@nithinrdy I just had a doubt, we cant change the language of a card when we move to the next one since there is no language selection option available on the new card.

language-2022-10-28_14.39.12.mp4

So is this what you were asking me to show ?? 😅

@oppiabot
Copy link

oppiabot bot commented Oct 28, 2022

Hi @Priyansh61, the build of this PR is stale and this could result in tests failing in develop. Please update this pull request with the latest changes from develop. Thanks!

Copy link
Contributor

@nithinrdy nithinrdy left a comment

Choose a reason for hiding this comment

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

Thanks! Left a comment.

@oppiabot
Copy link

oppiabot bot commented Nov 3, 2022

Hi @Priyansh61, the build of this PR is stale and this could result in tests failing in develop. Please update this pull request with the latest changes from develop. Thanks!

@Priyansh61 Priyansh61 removed their assignment Nov 3, 2022
@oppiabot
Copy link

oppiabot bot commented Dec 31, 2022

Hi @Priyansh61, the build of this PR is stale and this could result in tests failing in develop. Please update this pull request with the latest changes from develop. Thanks!

@gp201 gp201 assigned Priyansh61 and unassigned gp201 Dec 31, 2022
@Priyansh61 Priyansh61 assigned gp201 and unassigned Priyansh61 Jan 3, 2023
Copy link
Contributor

@gp201 gp201 left a comment

Choose a reason for hiding this comment

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

@Priyansh61 great job on the tests. Only some lint issues left. PTAL

]);
});

it('should correcly initialize newLanguageCode', () => {
windowRef = TestBed.inject(WindowRef);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this line to the beforeEach block?

Copy link
Contributor

@gp201 gp201 left a comment

Choose a reason for hiding this comment

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

I left a review above PTAL

@gp201 gp201 assigned Priyansh61 and unassigned gp201 Jan 4, 2023
@Priyansh61
Copy link
Contributor Author

Priyansh61 commented Jan 5, 2023

@gp201 PTAL! I have addressed all the requested changes :)

@Priyansh61 Priyansh61 requested a review from gp201 January 5, 2023 10:02
@Priyansh61 Priyansh61 assigned gp201 and unassigned Priyansh61 Jan 5, 2023
Copy link
Contributor

@gp201 gp201 left a comment

Choose a reason for hiding this comment

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

LGTM

@gp201 gp201 assigned Shivkant-Chauhan and unassigned gp201 Jan 6, 2023
@oppiabot oppiabot bot added the PR: LGTM label Jan 6, 2023
@oppiabot
Copy link

oppiabot bot commented Jan 6, 2023

Hi @nithusha21, this PR is ready to be merged. Author of this PR does not have permissions to merge this PR. Before you merge it, please make sure that there are no pending comments that require action from the author's end. Thanks!

@seanlip seanlip merged commit 3bcd1fb into oppia:develop Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching languages is not working appropriately while playing exploration(CUJ 1.16) on web and mobile
7 participants