Skip to content

NTP: Reset omnibar after form submission #1819

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

Merged
merged 7 commits into from
Jul 15, 2025

Conversation

noisysocks
Copy link
Contributor

@noisysocks noisysocks commented Jul 14, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1209121419454298/task/1210771515454552?focus=true

Description

Resets the omnibar component after submitting the form or selecting a suggestion.

Also renames props/handlers to use handleVerbNoun and onVerbNoun consistently since this was getting a bit crazy.

Testing Steps

  1. Go to https://deploy-preview-1819--content-scope-scripts.netlify.app/build/pages/new-tab/?omnibar=true
  2. Type something in the Search form and press enter. Form should reset.
  3. Type “pizza” into the Search form and select a suggestion. Form should reset.
  4. Type something in Duck.ai form and press enter. Form should reset.

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

@noisysocks noisysocks added the bug Something isn't working label Jul 14, 2025
@noisysocks noisysocks requested review from shakyShane, mgurgel and a team as code owners July 14, 2025 03:59
Copy link

netlify bot commented Jul 14, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 8093434
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/6876279812d24f0008ae5687
😎 Deploy Preview https://deploy-preview-1819--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.

Copy link

github-actions bot commented Jul 14, 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 Jul 14, 2025

[Beta] Generated file diff

Time updated: Tue, 15 Jul 2025 10:05:02 GMT

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

File has changed

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

File has changed

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

File has changed

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@shakyShane shakyShane left a comment

Choose a reason for hiding this comment

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

@noisysocks clicking a line-item (when searching for pizza) doesn’t submit for me.

@noisysocks
Copy link
Contributor Author

Ah, I see the issue. Should have tested in WebKit. Working on it.

@noisysocks noisysocks requested a review from shakyShane July 15, 2025 10:05
@noisysocks noisysocks merged commit 2c84443 into main Jul 15, 2025
18 checks passed
@noisysocks noisysocks deleted the randerson/omnibar-reset-form-on-submission branch July 15, 2025 10:19
mallexxx pushed a commit that referenced this pull request Jul 17, 2025
* Refactor omnibar to use prop callbacks and reset form on submit

* Rename props and handlers from set*/on* to onChange/handle* for
consistency

* Put back event.preventDefault()

* setTerm -> onChangeTerm

* Fix tests after merge

* Add tabindex to suggestions so that Safari/WebKit fires focus events on
it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants