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

Display Next Steps cards on HTML New Tab Page #3621

Merged
merged 13 commits into from
Dec 5, 2024
Merged

Display Next Steps cards on HTML New Tab Page #3621

merged 13 commits into from
Dec 5, 2024

Conversation

ayoy
Copy link
Collaborator

@ayoy ayoy commented Dec 3, 2024

Task/Issue URL: https://app.asana.com/0/72649045549333/1208246350498752/f

Description:
This change adds Next Steps cards section on HTML New Tab Page. The change from native NTP
is that Next Steps section can't be controlled by the user.

Steps to test this PR:
General note - the view model wasn't changed so all the logic (e.g. cards randomization or hiding after 7 days) should work the same as on the native NTP.

  1. Clean app data and run the app from Xcode.
  2. Disable Email Protection as needed.
  3. Set internal state and enable HTML New Tab Page using a feature flag.
  4. Verify that you see 5 Next Steps cards.
  5. Remember cards order, close and reopen window and verify that the order is different.
  6. Dismiss all cards one by one, close and reopen window and verify that there are no cards.
  7. Quit the app, clean app data and run the app from Xcode (then set internal user state and enable HTML NTP feature flag).
  8. Click Duck Player card, open Duck Player. Go back to NTP and verify that Duck Player card is gone.
  9. Click Default Browser card, set browser as default and verify that the card is gone.
  10. Click Dock card and verify that app is added to Dock. The card is not removed and the button doesn't update to "Added to Dock" which is a known issue to be addressed separately.
  11. Click Import card, import bookmarks and verify that the card is gone.
  12. Enable Email Protection and verify that the card is gone.

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 Dec 3, 2024

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

Generated by 🚫 dangerJS against 1e5eafe

@ayoy ayoy marked this pull request as ready for review December 3, 2024 14:06
@ayoy ayoy requested a review from SabrinaTardio December 3, 2024 14:08
Copy link
Collaborator

@SabrinaTardio SabrinaTardio left a comment

Choose a reason for hiding this comment

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

Great job!
We discussed that the for add to dock we will add confirmation UI later on C-S-S.


@MainActor
func action(params: Any, original: WKScriptMessage) async throws -> Encodable? {
guard let card: NewTabPageNextStepsCardsClient.Card = DecodableHelper.decode(from: params) else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we just need let card: Card =

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right :) Let me add it in the next PR because I'm moving ALOT code around and would rather avoid conflicts

@ayoy ayoy merged commit 65f241e into main Dec 5, 2024
21 checks passed
@ayoy ayoy deleted the dominik/next-steps branch December 5, 2024 07:00
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