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

Add navigatorInterface + messageBridge support #5461

Merged
merged 6 commits into from
Jan 24, 2025

Conversation

joshliebe
Copy link
Contributor

@joshliebe joshliebe commented Jan 13, 2025

Task/Issue URL: https://app.asana.com/0/488551667048375/1208697679300718/f

Description

  • Adds a new package to the content-scope-scripts-impl module to inject the navigatorInterface JSON from the privacy config.
  • Also adds the related messageBridge C-S-S feature which is required for SERP<->native communication.

Steps to test this PR

navigatorInterface

Screenshot 2025-01-16 at 00 51 01

messageBridge

  • Go to duckduckgo.com
  • Open Chrome and go to chrome://inspect
  • In the console, type: navigator.duckduckgo.createMessageBridge(“aiChat").notify("helloWorld”)
  • Verify that you see the following:
Screenshot 2025-01-16 at 14 59 51

Copy link
Contributor Author

joshliebe commented Jan 13, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@joshliebe joshliebe changed the title Add navigator interface support Add navigatorInterface + messageBridge support Jan 15, 2025
@joshliebe joshliebe marked this pull request as ready for review January 16, 2025 15:01
@joshliebe joshliebe force-pushed the feature/josh/navigator-interface branch from ca11b5c to f87ff09 Compare January 19, 2025 18:47
@joshliebe joshliebe mentioned this pull request Jan 21, 2025
10 tasks
@joshliebe joshliebe force-pushed the feature/josh/navigator-interface branch from f87ff09 to 63e7261 Compare January 22, 2025 20:35
@malmstein malmstein self-assigned this Jan 23, 2025
@joshliebe joshliebe mentioned this pull request Jan 24, 2025
13 tasks
Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

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

works as expected, thanks @joshliebe !


@Entity(tableName = "message_bridge")
data class MessageBridgeEntity(
@PrimaryKey val id: Int = 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

discussed this offline, we don’t really seem to need a Room db, but since this pattern is already used in other c-s-s features let’s not change anything now.

@joshliebe joshliebe merged commit 766ea1f into develop Jan 24, 2025
8 checks passed
@joshliebe joshliebe deleted the feature/josh/navigator-interface branch January 24, 2025 15:09
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