Skip to content

ntp: omnibar states #1882

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

ntp: omnibar states #1882

wants to merge 2 commits into from

Conversation

shakyShane
Copy link
Contributor

@shakyShane shakyShane commented Aug 8, 2025

Asana Task/Github Issue:

Description

Support persistent state for omnibar input.

  • A mapping of <tab id>: <input value> is maintained outside of the lifecycle of the omnibar widget.
  • When a new config update arrives, it might have a new tabId - if it does we re-render the omibar widget
  • For each new mount, it will look up a previous value from the stored mapping, restoring any previous values
  • TODO: I didn't check if pressing a submit has the intended effect yet

Testing Steps (windows)

  • add tabId and tabIds to:
    • the omnibar_getConfig call
    • the omnibar_onConfigUpdate subscription event

Then, every time the tab changes, send omnibar_onConfigUpdate back into the page with the updated tabId and tabIds fields

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

@shakyShane
Copy link
Contributor Author

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

Copy link

github-actions bot commented Aug 8, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

Copy link

github-actions bot commented Aug 8, 2025

[Beta] Generated file diff

Time updated: Fri, 08 Aug 2025 09:54:41 GMT

Apple
    - apple/pages/new-tab/dist/index.js

File has changed

Integration
    - integration/pages/new-tab/dist/index.js

File has changed

Windows
    - windows/pages/new-tab/dist/index.js

File has changed

Copy link

netlify bot commented Aug 8, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit b2bcf87
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/6895c9261d95e000085cded3
😎 Deploy Preview https://deploy-preview-1882--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shakyShane shakyShane marked this pull request as ready for review August 8, 2025 09:47
@shakyShane shakyShane requested review from mgurgel and a team as code owners August 8, 2025 09:47
@duckduckgo duckduckgo deleted a comment from cursor bot Aug 8, 2025

export function factory() {
return (
<Centered data-entry-point="omnibar">
<OmnibarCustomized />
<PersistentTermsProvider>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This state needs to live for the lifespan of the page, not the widget, so we go 1 level higher

@duckduckgo duckduckgo deleted a comment from cursor bot Aug 8, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

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

all of the naming here is a mess - can be addressed after the POC is confirmed working

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.

1 participant