Update widgets-scaffold to shared menu footer + useWidgetTelemetry#28
Open
IamDgrant618 wants to merge 2 commits into
Open
Update widgets-scaffold to shared menu footer + useWidgetTelemetry#28IamDgrant618 wants to merge 2 commits into
IamDgrant618 wants to merge 2 commits into
Conversation
Bake the shared WidgetMenuFooter + SizeSubmenu (Bug 2046045 / D306294) and the
useWidgetTelemetry hook into the widget scaffold, so a newly scaffolded widget
gets the consistent context-menu footer (divider, Change size, Move, Hide
widget, Learn more -> new tab) and shared telemetry by default instead of the
old hand-rolled pattern that drifted out of sync.
- ExampleWidget.jsx: render <WidgetMenuFooter sizeSubmenu={<SizeSubmenu/>}>
instead of the inline size submenu + MoveSubmenu + Hide + Learn more; use
useWidgetTelemetry (impressionRef + recordUserAction) instead of hand-built
WIDGETS_IMPRESSION / WIDGETS_USER_EVENT dispatches and useIntersectionObserver.
- SKILL.md and notes.md: document the shared footer and telemetry hook; drop the
stale useSizeSubmenu / MoveSubmenu / hand-rolled-observer guidance.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the New Tab widget scaffolding skill to standardize newly scaffolded widgets on the shared context-menu footer components and the shared widget telemetry hook, replacing older per-widget hand-rolled patterns that drifted from product behavior.
Changes:
- Update scaffold guidance to use
WidgetMenuFooter+SizeSubmenufor the standardized trailing context-menu block. - Document and switch the reference widget telemetry wiring to
useWidgetTelemetry(impression + user actions). - Refresh reference notes to remove stale
useSizeSubmenu/hand-wired observer guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| plugins/newtab/skills/widgets-scaffold/SKILL.md | Updates the official scaffolding instructions to use shared menu footer + shared telemetry hook. |
| plugins/newtab/skills/widgets-scaffold/references/notes.md | Refreshes reference notes to describe WidgetMenuFooter/SizeSubmenu and useWidgetTelemetry. |
| plugins/newtab/skills/widgets-scaffold/references/ExampleWidget/ExampleWidget.jsx | Refactors the reference widget to use useWidgetTelemetry and the shared menu footer components. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
IamDgrant618
commented
Jul 7, 2026
IamDgrant618
left a comment
Author
There was a problem hiding this comment.
Addressed copilot comments.
suhaibmujahid
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bake the shared WidgetMenuFooter + SizeSubmenu (Bug 2046045 / D306294) and the useWidgetTelemetry hook into the widget scaffold, so a newly scaffolded widget gets the consistent context-menu footer (divider, Change size, Move, Hide widget, Learn more -> new tab) and shared telemetry by default instead of the old hand-rolled pattern that drifted out of sync.
instead of the inline size submenu + MoveSubmenu + Hide + Learn more; use
useWidgetTelemetry (impressionRef + recordUserAction) instead of hand-built
WIDGETS_IMPRESSION / WIDGETS_USER_EVENT dispatches and useIntersectionObserver.