Skip to content

fixed state restoring on feedback window reopen #101074

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

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

nlchar
Copy link
Contributor

@nlchar nlchar commented Jun 25, 2020

This PR fixes #100897
Possible solution that I proposed in the issue
The code responsible for the feature is located in the file. The updateCharCountText function does the job of updating the counter & the 'Tweet' button state, so its call in the window reopen function may be sufficient to resolve the issue. I think the show function is called on window reopen, so it may be used for that purpose.

The solution seems to work correct.
Tests I ran:

Test 1. Close window by tapping the cross icon

  1. Open the 'Tweet Feedback' window.
  2. Choose the sad smiley. The character counter now equals to 270. The Tweet button is inactive.
  3. Type 'hello' in the text box. The character counter now equals to 265. The Tweet button is active.
  4. Close the window by tapping the cross icon at the top of the window.
  5. Open the 'Tweet Feedback' window again.
  6. The character counter is restored and equals to 265. The Tweet button is restored and is active.
    Correct!
    test1

Test 2. Close window by pressing ESC key

  1. Open the 'Tweet Feedback' window.
  2. Choose the happy smiley. The character counter now equals to 257. The Tweet button is inactive.
  3. Type 'hello' in the text box. The character counter now equals to 252. The Tweet button is active.
  4. Close the window by pressing the ESC key.
  5. Open the 'Tweet Feedback' window again.
  6. The character counter is restored and equals to 252. The Tweet button is restored and is active.
    Correct!
    test2

Test 3. Choosing another smiley after window reopen.

  1. Open the 'Tweet Feedback' window.
  2. Choose the sad smiley. The character counter now equals to 270. The Tweet button is inactive.
  3. Type 'hello' in the text box. The character counter now equals to 265. The Tweet button is active.
  4. Close the window by tapping the cross icon at the top of the window.
  5. Open the 'Tweet Feedback' window again.
  6. The character counter is restored and equals to 265. The Tweet button is restored and is active.
  7. Now choose the happy smiley. The character counter now equals to 252 and the Tweet button is still active.
    Correct!
    test3

Test 4. Window reopen with no text box contents.

  1. Open the 'Tweet Feedback' window.
  2. Choose the happy smiley. The character counter now equals to 257. The Tweet button is inactive.
  3. Type 'hello' in the text box. The character counter now equals to 252. The Tweet button is active.
  4. Close the window by pressing the ESC key.
  5. Open the 'Tweet Feedback' window again.
  6. The character counter is restored and equals to 252. The Tweet button is restored and is active.
  7. Now remove the input in the text box. The counter is equal to 257 and the Tweet button is inactive.
  8. Close the window by pressing the ESC key.
  9. Open the 'Tweet Feedback' window again.
  10. The character counter is restored and equals to 257. The Tweet button is restored and is not active.
    test4

@bpasero bpasero assigned bpasero and unassigned chrmarti Jun 26, 2020
@bpasero bpasero modified the milestones: July 2020, June 2020 Jun 26, 2020
@bpasero bpasero merged commit 1b54095 into microsoft:master Jun 26, 2020
@bpasero
Copy link
Member

bpasero commented Jun 26, 2020

Thanks

@github-actions github-actions bot locked and limited conversation to collaborators Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Tweet Feedback' window does not save its state properly on reopen
3 participants