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: fix mailserver popup showing after canceling it #10342

Closed
wants to merge 2 commits into from

Conversation

jrainville
Copy link
Member

Summary

Fixes #10065 by setting a dismissed flag on Cancel, so the popup will not appear again.
Selecting a new mail server sets dismissed as false, so the error can appear again

Platforms

Tested Android simulator

Steps to test

See issue above to see reproduction steps

Fixes #10065
After clicking cancel, the popup is `dismissed`, so it will not appear again
Selecting a new mail server sets `dismissed` as false, so the error can appear again
@jrainville jrainville requested a review from a team as a code owner April 15, 2020 20:19
@status-github-bot
Copy link

Hey @jrainville, and thank you so much for making your first pull request in status-react! ❤️ Please help us make your experience better by filling out this brief questionnaire https://goo.gl/forms/uWqNcVpVz7OIopXg2

@status-github-bot
Copy link

Pull Request Checklist

  • Docs: Updated the documentation, if affected
  • Docs: Added or updated inline comments explaining intention of the code
  • Tests: Ensured that all new UI elements have been assigned accessibility IDs
  • Tests: Signaled need for E2E tests with label, if applicable
  • Tests: Briefly described what was tested and what platforms were used
  • UI: In case of UI changes, ensured that UI matches Figma
  • UI: In case of UI changes, requested review from a Core UI designer
  • UI: In case of UI changes, included screenshots of implementation

@status-im-auto
Copy link
Member

status-im-auto commented Apr 15, 2020

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
7cccf18 #1 2020-04-15 20:29:25 ~9 min ios 📄log
7cccf18 #1 2020-04-15 20:34:11 ~14 min android-e2e 📄log
7cccf18 #1 2020-04-15 20:34:17 ~14 min android 📄log
✔️ 2e4bebc #2 2020-04-16 13:49:45 ~8 min ios 📦ipa 📲
✔️ 2e4bebc #2 2020-04-16 13:55:52 ~15 min android 📦apk 📲
✔️ 2e4bebc #2 2020-04-16 13:56:06 ~15 min android-e2e 📦apk 📲

@flexsurfer
Copy link
Member

@jrainville thanks for the PR! great job! but this issue much deeper than it looks, Mailserver management is completely outdated and we need to reintroduce it with proper design and flows, but even if we want to fix the popup we should fix the cause - adding mailserver process should be stopped, not the consequences - multi popup

Copy link
Member

@0x-r4bbit 0x-r4bbit left a comment

Choose a reason for hiding this comment

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

Nice @jrainville !

Learning a lot from your changes. I've left some inline comments about code-style related things.

preferred-mailserver])
:style "default"}]}})
(update-mailserver-state db :error)}
(let [error-dismissed (connection-error-dismissed db)]
Copy link
Member

Choose a reason for hiding this comment

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

Shall we call this error-dismissed? instead? It seems to be common practice to suffix boolean values with ?. Or does this only apply to certain booleans?

Copy link
Member

Choose a reason for hiding this comment

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

yes its better to use ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for letting me know, I'll change it.

:advanced-settings
:offline-messaging-settings)])
:extra-options [{:text (i18n/label :t/mailserver-retry)
:onPress #(re-frame/dispatch
Copy link
Member

Choose a reason for hiding this comment

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

This is unrelated to the changes in this PR, but I'm wondering if there's a reason onPress is written in camelCase here while most other events seem to be using kebab-case

Copy link
Member

Choose a reason for hiding this comment

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

kebab-case should be used

Copy link
Member Author

Choose a reason for hiding this comment

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

This was code that was already there, I just changed the indentation. I can change it to kebab-case if it's an available prop though.

Copy link
Member

Choose a reason for hiding this comment

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

yeah, as i said its a really old code, should be re-implemented from scratch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Popup error reappears if tap on "Cancel" in "Error connecting to mailserver" popup
4 participants