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

Prevent the Autofill Cancel button from resetting item selection #520

Merged
merged 2 commits into from
Apr 11, 2022

Conversation

samsymons
Copy link
Collaborator

@samsymons samsymons commented Apr 10, 2022

Task/Issue URL: https://app.asana.com/0/1177771139624306/1202040507157531/f
Tech Design URL:
CC: @ayoy

Description:

This PR removes the onCancelled block from the Autofill data models.

This block was getting called after going into an editing state and then simply cancelling, triggering the list model to reselect the first item in the list.

This block was introduced in the onboarding PR, but removing it appears to fix this issue with no negative side effects.

Steps to test this PR:

  1. Smoke test the Autofill panel
  2. Enter editing state and then immediately cancel without making any changes, verify that you still have the same item selected
  3. Edit an item and save it, verify that the newly edited item is still selected (and has the correct values)

Testing checklist:

  • Test with Release configuration
  • Test proper deallocation of tabs
  • Make sure committed submodule changes are desired

Internal references:

Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

@samsymons
Copy link
Collaborator Author

@brindy This is something you can probably add context to. This fixes an issue where simply canceling an editing state would reset the selected item, @ayoy noticed that it was coming from the onCancelled block - that block was added as a part of the onboarding work, do you remember what it was for? So far it looks like taking it out fixes this issue without consequence.

@brindy
Copy link
Contributor

brindy commented Apr 11, 2022

I think it was so that the empty state for the item didn't appear when you were editing a new entry, but I just tested this PR and that looks OK.

@brindy brindy self-assigned this Apr 11, 2022
Copy link
Contributor

@brindy brindy left a comment

Choose a reason for hiding this comment

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

LGTM

@brindy brindy assigned samsymons and unassigned brindy Apr 11, 2022
@samsymons
Copy link
Collaborator Author

samsymons commented Apr 11, 2022

@brindy Ah, that would explain it, thanks! I did make some empty state improvements after the onboarding work, so I would guess that those have fixed the same issue, meaning we're safe to remove this.

@samsymons samsymons merged commit 4b4972e into develop Apr 11, 2022
@samsymons samsymons deleted the sam/prevent-cancel-from-resetting-item-selection branch April 11, 2022 14:56
samsymons added a commit that referenced this pull request Apr 14, 2022
# By Dominik Kapusta (4) and others
# Via GitHub
* develop:
  ‘Rename user-facing “Preferences” strings to “Settings”. (#519)
  Fix URLs with port and replace spaces in query with %20 (#506)
  Printing custom frame (#530)
  Fix warnings in unit tests target (#490)
  Version 0.22.3
  FTP scheme handled as internal (#524)
  Old compilation flag removed (#531)
  Don't use ZStack as it messes up the layout on Catalina (#532)
  Disable context menu for Privacy Dashboard (#512)
  Add unit tests Github Actions workflow (#525)
  Add a shell script and GitHub Action to create notarized builds (#517)
  Add missing period in 'Privacy, simplified.' tagline (#527)
  move some state into the model so that SwiftUI doesn't remember it if that object comes back (#521)
  Prevent the Autofill Cancel button from resetting item selection (#520)
  Fix animation hitching. (#518)
  Add description fields to breakage reporting flows (#511)
  Update BSK with a fix for query params (#513)
  set the default height of the navigation bar so that it can be used when configuring a popup window (#522)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
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