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 bug where bookmarks bar prompt does not hide bar #3553

Conversation

jotaemepereira
Copy link
Collaborator

@jotaemepereira jotaemepereira commented Nov 14, 2024

Task/Issue URL: https://app.asana.com/0/1201048563534612/1208767244367092/f
Tech Design URL:
CC:

Description:
We currently have a bug when the ’Show Bookmarks Bar` prompt is shown, if the user selects the hide option. The bar is visible.

The problem is that when showing the prompt, we update the visibility of the bookmarks bar but without updating its value, then when the user selects to hide or dismiss the prompt, given that the old value is false and the new values is false, the subscriber discards the new value and does not update the UI.

Removing the removeDuplicates() fixes the issue. I do not think there are problems removing that call, updating the visibility is something that happens on user interaction, we will have an ‘extra’ call if the user taps againg the same setting but I do not forsee a concern (open to opinions).

Steps to test this PR:

  1. Start a fresh install (run ./clean-app.sh debug)
  2. Open a site, add a bookmark from the address bar button
  3. Remove the bookmark from the address bar button
  4. The prompt should appear, press hide
  5. The bookmarks bar should hide

Definition of Done:

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@jotaemepereira jotaemepereira requested a review from ayoy November 14, 2024 18:48
@jotaemepereira jotaemepereira changed the title Allow duplicates in observer Fix bug where bookmarks bar prompt does not hide bar Nov 15, 2024
@samsymons samsymons self-requested a review November 18, 2024 18:33
Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

The steps listed worked for me, so I'll approve this, though the UX feels weird in that the bookmarks bar prompt doesn't appear on first bookmark, but rather shortly after the first bookmark. Since this PR hasn't affected that logic, I'll approve this and take the UX discussion elsewhere - thanks!

@jotaemepereira jotaemepereira changed the base branch from main to release/1.115.0 November 18, 2024 19:22
@jotaemepereira jotaemepereira merged commit 8602595 into release/1.115.0 Nov 18, 2024
37 checks passed
@jotaemepereira jotaemepereira deleted the juan/fix-show-bookmarks-popover-hide-not-working branch November 18, 2024 19:44
samsymons added a commit that referenced this pull request Nov 21, 2024
…g-error

# By Anka (5) and others
# Via GitHub (5) and Dominik Kapusta (1)
* main: (28 commits)
  Add attemptCount and maxAttempts to broker config (#3533)
  Hide continue setup cards after 1 week (#3471)
  Add expectation when checking email text field value (#3572)
  [macos] adding support for message bridge (#3558)
  Update PIR test runner (#3570)
  Add support for controlling sections visibility on HTML New Tab Page (#3551)
  Bump version to 1.115.0 (311)
  macOS 13/14 UI test compilation fix (#3569)
  macOS 13/14 UI test compilation fix (#3569)
  Fix bug where bookmarks bar prompt does not hide bar (#3553)
  Add OS version to download fail pixel (#3568)
  Remove get_tasks_in_last_internal_release (#3566)
  Bump version to 1.115.0 (310)
  Update skip-release check
  Update fastlane plugin to 0.11.6
  Bump ddg-apple-automation version for bugfix (#3565)
  PIR E2E tests GitHub actions (#3528)
  Update autoconsent to v11.5.0 (#3561)
  Bump version to 1.115.0 (309)
  Set marketing version to 1.115.0
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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