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

NSPopover-based Bookmarks menu system #3106

Merged
merged 42 commits into from
Aug 30, 2024

Conversation

mallexxx
Copy link
Collaborator

Task/Issue URL: https://app.asana.com/0/1202406491309510/1207775978136617/f
Design URL: https://www.figma.com/design/5EpHdIdOlFjdkOy96xUMW3/Bookmark-Management-%F0%9F%93%99?node-id=7410-45232&m=dev

Description:

  • NSPopover-based Bookmarks Bar menu implementation
  • ❗️no drag&drop support in this PR
  • ❗️no keyboard controls in this PR

Steps to test this PR:

  1. Clear bookmarks from the Debug menu
  2. Validate Clear state is correctly displayed in the Bookmarks Popover
  3. Import (a lot) of bookmarks (you can use the attachment if needed)
  4. Change structure from the Manager to have all the kinds of folders (with too many bookmarks, with 1 bookmark, with several bookmarks, with empty subfolders, with non-empty subfolders, with nested subfolders, etc)
  5. Toggle the Bookmarks Bar
  6. Open menus, hover over other folders on the Bookmarks Bar, over the Clipped items button, validate folders are automatically switched on hover
  7. Open menu close to the bottom of the screen, validate it becomes directed upwards
  8. Validate menu scrolling works both using scrolling and the scroll buttons, validate scroll buttons are shown/hidden correctly
  9. Open subfolders, open bookmarks from different levels of the menu, validate opening individual bookmarks from the Bookmark Bar works
  10. Use context menu (both right click and “…” menu), to toggle favorite, edit bookmarks, other actions, validate everything works

Definition of Done:


Internal references:

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

Copy link
Contributor

github-actions bot commented Aug 15, 2024

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.
Messages
📖

You seem to be updating localized strings. Make sure that you request translations and include translated strings before you ship your change. See Localization Guidelines for more information.

Generated by 🚫 dangerJS against db4b4ab

Copy link
Collaborator

@jotaemepereira jotaemepereira left a comment

Choose a reason for hiding this comment

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

@mallexxx This is a first pass; overall, the functionality looks good. I still need to go through all the code changes, given that there were a lot of additions.

My biggest questions code related is: why do we not create a new view controller instead of reusing the BookmarkListViewController? BookmarkListViewController is huge now and hard to follow.

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.8">
version = "1.7">
Copy link
Collaborator

Choose a reason for hiding this comment

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

@mallexxx This seems like an unintended change. We should revert this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was a change made by Xcode 15.2; 15.4+ always reverts it back to "1.7"

DuckDuckGo/Bookmarks/Model/BookmarkNode.swift Show resolved Hide resolved
Copy link
Collaborator

@jotaemepereira jotaemepereira left a comment

Choose a reason for hiding this comment

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

I’ve made another pass, it’s working great 👍🏼 , and thanks for creating the BookmarksBarMenuViewController!

@mallexxx mallexxx changed the base branch from main to alex/bookmarks-context-menu August 23, 2024 07:35
mallexxx and others added 13 commits August 23, 2024 15:36
Group&align code, add MARK-s, fix naming, cleanup
…#3110)

- Add "Open all in new tabs" menu items
- Fix bookmarks menu not closed when nested bookmarks menu item (or open
all action) selected
- Bookmarks drag&drop support unified to act the same way in different
places of UI: drag&drop support moved to BookmarkDragDropManager
- Implemented drag&drop support for the Bookmarks Bar menus
- Add keyboard controls support to Bookmarks Bar menu
- Activate search by typing any letter in the Navigation Bar Bookmarks
menu
- Close search in the Navigation Bar Bookmarks menu first on Esc press
- Switching between the search bar and the search results using keyboard
in the Navigation Bar Bookmarks menu
Adjust Bookmarks Menu popover size when number of items changes
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1207733191644528/f
Tech Design URL:
https://app.asana.com/0/481882893211075/1207774401221083/f
CC:

**Description**:
Adds new pixels to indicate how many opt outs are successfully submitted
within 24 hours

**Steps to test this PR**:
1. With opt out jobs already existing (older than 24 hours), check the
pixels fire appropriately

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Definition of Done**:

* [x] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)

---------

Co-authored-by: Elle Sullivan <[email protected]>
Task/Issue URL:
https://app.asana.com/0/1148564399326804/1208127166369788/f
https://app.asana.com/0/1148564399326804/1208127166369786/f
CC:

**Description**:
PR resolves two edge cases related to automatic updates.

Presenting the available update after the update cycle finishes (instead of the update file download completion)
Activation of the manual update flow in case the current binary owner is different user

Co-authored-by: Dominik Kapusta <[email protected]>
daxmobile and others added 21 commits August 24, 2024 10:17
Task/Issue URL:
https://app.asana.com/0/1204006570077678/1208002970105121/f
Tech Design URL:
CC:


**Description**:
This pull request introduces a change on how we check for valid
hostnames. The current regurlar expression had an issue where some
mathematical expressions where valid hostnames.

BSK PR: duckduckgo/BrowserServicesKit#952

**Steps to test this PR**:
1. Open the app
2. Put 16385-12228.75 in the address bar
3. This should do a search on our SERP instead of trying to open a
webpage
4. Test other usual web sites URLs and check those are working.

**Definition of Done**:

* [x] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?
Task/Issue URL: https://app.asana.com/0/1203301625297703/1208137627434482/f

**Description**:
This change introduces ddg_apple_automation fastlane plugin and its first action, for extracting task ID from Asana task URL. Fastlane setup step was added to all workflows, GHA action calls were replaced by fastlane action calls,
outputs were renamed to match action output name and old GHA action was removed.
Task/Issue URL: https://app.asana.com/0/1203301625297703/1208137627434482/f

**Description**:
This change introduces ddg_apple_automation fastlane plugin and its first action, for extracting task ID from Asana task URL. Fastlane setup step was added to all workflows, GHA action calls were replaced by fastlane action calls,
outputs were renamed to match action output name and old GHA action was removed.
Task/Issue URL:
https://app.asana.com/0/1206488453854252/1208051900144618/f

**Description**: Add macOS Freemium PIR RMF attribute. Temporarily set
to hardcoded `false`. [Subsequent
task](https://app.asana.com/0/0/1208141497961723/f) will set actual
state based on yet-to-be implemented logic.
…3148)

Bumps Submodules/privacy-reference-tests from `afb4f61` to `6133e7d`.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alessandro Boron <[email protected]>
Task/Issue URL:
https://app.asana.com/0/1205922231854923/1207701941801991/f
Tech Design URL:
CC:

**Description**:

**Steps to test this PR**:
1.

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Definition of Done**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
Task/Issue URL: https://app.asana.com/0/414709148257752/1207874749913488/f
Tech Design URL:
CC:

Description:

This PR updates the app to add WireGuard as a direct dependency, instead of inheriting it from BSK. The issue with the inheritance approach is that WireGuard was being implicitly included in targets that didn't need it, like the VPN agent and app.
@mallexxx mallexxx merged commit f06c808 into alex/bookmarks-context-menu Aug 30, 2024
14 of 18 checks passed
@mallexxx mallexxx deleted the alex/bookmarks-bar/menu branch August 30, 2024 09:06
@mallexxx mallexxx restored the alex/bookmarks-bar/menu branch August 30, 2024 09:07
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.

9 participants