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

[NSDK-245] Fix Password Reset Doesn’t Work and WebView Redirection Issue #126

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

akueisara
Copy link
Contributor

@akueisara akueisara commented Dec 17, 2024

🔗 Related Links

⬅️ As Is

https://docs.google.com/presentation/d/1Cloxn7s0hsTMIDfznjPfBuXqAXMQUjXgKIwgyjoqk9c/edit#slide=id.g3210edc6694_0_5

  • Password Reset button doesn’t work
  • After the login is succeeded, you can never go back to the app automatically

➡️ To Be

  • Adjusted the popup web view layout params to match the parent view
Screen.Recording.2024-12-18.at.0.41.19.mov
  • Set setDomStorageEnabled to true for the popup webview. Unfortunately, I forgot about web development, so I'm unsure why it made a difference.
Screen.Recording.2024-12-18.at.1.09.42.mov

☑️ Checklist

  • Useless comments and/or Log.d etc are removed
  • Unit test are covered
  • Code has been deployed and tested on STG
  • ClickUp ticket status has been updated to production
  • Update CHANGELOG.md with the new changes

@akueisara akueisara self-assigned this Dec 17, 2024
Comment on lines +153 to +159
WebView(view.context).apply {
setBackgroundColor(Color.TRANSPARENT)
layoutParams =
ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Main changes

} finally {
return true
val popupWebView =
WebView(view.context).apply {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I refactored it a bit using the scope function apply
For object configuration, we can use apply

@akueisara akueisara changed the title [NSDK-245] Fix Password Reset button doesn’t work [NSDK-245] Fix Password Reset Doesn’t Work and WebView Redirection Issue Dec 17, 2024
settings.javaScriptEnabled = true
settings.javaScriptCanOpenWindowsAutomatically = true
settings.setSupportMultipleWindows(true)
settings.setDomStorageEnabled(true)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of the main changes

Copy link
Contributor

@alexshikov alexshikov left a comment

Choose a reason for hiding this comment

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

LGTM

@alexshikov alexshikov merged commit 7ab0ba6 into trunk Dec 18, 2024
3 checks passed
@alexshikov alexshikov deleted the fix/display-reset-password branch December 18, 2024 09:43
@alexshikov alexshikov mentioned this pull request Dec 18, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants