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

PM-10094: Disable double-navigation by default #3660

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

shannon-livefront
Copy link
Collaborator

@shannon-livefront shannon-livefront commented Jul 31, 2024

🎟️ Tracking

PM-10094

📔 Objective

Nearly everywhere that navigation is possible in the app, rapidly double-clicking on the navigation button would cause the navigation action to happen twice, which would either stack two new views on top of each other or, in the case of rapidly navigating back too many times, break the view entirely. This PR fixes that issue by ignoring events that occur when the view is not resumed by default.

IMPORTANT NOTE: There is a new interface called BackgroundEvent that non-navigation events should conform to if there is a chance they might occur (and should be processed) before the view is resumed. So far only the passkey management related events fall into this category that we know of.

📸 Screenshots

An example of rapidly navigating to a new view (also occurs for push navigation when tapping on any of the folders in the list, and on the vault and settings tabs as well):

Before After
10094.before.mov
10094.after.mov

An example of rapidly navigating back from a view (also occurs when dismissing a slide-up view, though in that case the base view is still visible just unresponsive):

Before After
10094.before.2.mov
10094.after.2.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@@ -2364,8 +2365,7 @@ sealed class VaultAddEditEvent {
/**
* Navigate the user to the tooltip URI.
*/
data object NavigateToTooltipUri :
VaultAddEditEvent()
data object NavigateToTooltipUri : VaultAddEditEvent()
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

github-actions bot commented Jul 31, 2024

Logo
Checkmarx One – Scan Summary & Details619b4cf8-b34e-474b-8e6b-05a4312414a6

No New Or Fixed Issues Found

@shannon-livefront shannon-livefront force-pushed the PM-10094-fix-double-navigation branch 2 times, most recently from 7103bd1 to dcf6bac Compare July 31, 2024 21:49
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.81%. Comparing base (1f8d50e) to head (349b837).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3660   +/-   ##
=======================================
  Coverage   87.81%   87.81%           
=======================================
  Files         368      368           
  Lines       30454    30458    +4     
  Branches     4547     4548    +1     
=======================================
+ Hits        26744    26748    +4     
  Misses       2128     2128           
  Partials     1582     1582           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

david-livefront
david-livefront previously approved these changes Aug 1, 2024
Copy link
Collaborator

@brian-livefront brian-livefront left a comment

Choose a reason for hiding this comment

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

Looks good!

@shannon-livefront shannon-livefront merged commit 055fbc1 into main Aug 1, 2024
9 checks passed
@shannon-livefront shannon-livefront deleted the PM-10094-fix-double-navigation branch August 1, 2024 21:31
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.

3 participants