-
-
Notifications
You must be signed in to change notification settings - Fork 6
Status bar update #706
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
Status bar update #706
Conversation
…on and improve status updates
…tions and messaging
View your CI Pipeline Execution ↗ for commit 29f8bd5
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the status bar from a DOM-based UI to use the Chrome Action badge/title, and introduces a Port-based messaging path for action updates.
- Replace DOM status bar with ActionService-driven badge/title updates.
- Add PortService and background onConnect handling for one-way, low-latency messages.
- Extend ActionMessenger and manifest to support per-tab action control and improved icon/title.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
File | Description |
---|---|
packages/shared/status-bar/tsconfig.lib.json | Adds reference to core/service to allow using ActionService in status-bar. |
packages/shared/status-bar/tsconfig.json | Adds project reference to core/service. |
packages/shared/status-bar/src/lib/status-bar.ts | Rewrites StatusBar to drive Chrome Action badge/title instead of DOM elements. |
packages/shared/status-bar/src/index.ts | Adds chrome types reference for TS consumers. |
packages/core/service/src/lib/service.ts | Introduces PortService for runtime.connect-based messaging. |
packages/core/service/src/lib/action.service.ts | Refactors ActionService to use PortService (fire-and-forget) and adds new methods. |
packages/core/extension/src/lib/background/chrome/runtime.ts | Adds runtime.onConnect routing for Port-based messages. |
packages/core/extension/src/lib/background/chrome/messenger/action.messenger.ts | Updates ActionMessenger to accept sender and support new methods. |
packages/core/common/src/lib/model/core-model.ts | Adds __addonRecheck field to extension model. |
apps/acf-extension/src/manifest.json | Expands action icon sizes and sets a default title. |
apps/acf-extension/src/content_scripts/index.ts | Disables status bar when no configs are present. |
apps/acf-extension/src/content_scripts/config.ts | Initializes status bar with totals; removes DOM status bar setup. |
apps/acf-extension/src/content_scripts/batch.ts | Aligns batch waits with new status bar API. |
apps/acf-extension/src/background/index.ts | Wires Runtime.onConnect to existing message handlers. |
packages/core/extension/src/lib/background/chrome/messenger/action.messenger.ts
Outdated
Show resolved
Hide resolved
packages/core/extension/src/lib/background/chrome/messenger/action.messenger.ts
Show resolved
Hide resolved
packages/core/extension/src/lib/background/chrome/messenger/action.messenger.ts
Outdated
Show resolved
Hide resolved
fix(status-bar): standardize property initialization syntax
…pdate ActionService methods
…ity details in documentation
…date method signature
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesFootnotes
|
|
This pull request introduces significant improvements to the status bar functionality, Chrome extension action handling, and messaging infrastructure. The main themes are a refactor of the status bar to use Chrome action APIs for feedback, the introduction of a port-based messaging system for extension communication, and enhancements to the extension manifest and batch processing logic.
Status Bar Refactor and Integration with Chrome Action APIs:
StatusBar
class instatus-bar.ts
is refactored to interact directly with Chrome's action APIs for visual feedback, such as badge text, icon, and title, instead of manipulating DOM elements. Methods likeenable
,disable
,wait
,error
, anddone
now update the extension's action state via the newActionService
. The previous DOM-based implementation and theManualStatusBar
class are removed.core-service
package, enabling it to use the newActionService
. [1] [2]Chrome Action API and Messaging Enhancements:
ActionMessenger
class is expanded to support new methods (enable
,disable
,setBadgeTextColor
) and all methods now operate on a per-tab basis using the sender's tab ID.ActionService
is refactored to use a newPortService
for messaging, providing non-blocking, port-based communication with the background script. New methods for enabling/disabling the action and setting badge text color are added. [1] [2]ActionMessenger
methods, ensuring correct tab-specific updates.Runtime.onConnect
method is introduced to handle port connections from content scripts, supporting the new port-based messaging system.onConnect
events, further integrating the port-based communication model.Extension Manifest and Model Updates:
action
field is updated to provide icons at multiple resolutions and a default title, improving appearance and accessibility in the browser UI.IExtension
interface is updated with a new__addonRecheck
property for tracking addon rechecks.Batch Processor and Content Script Adjustments:
wait
calls. [1] [2] [3]Summary of Most Important Changes:
Status Bar Refactor and Chrome Action Integration
StatusBar
to use Chrome action APIs (badge text, icon, title) for feedback, removing DOM manipulation and theManualStatusBar
.core-service
to the status bar package for access to the newActionService
. [1] [2]Chrome Action API and Messaging Improvements
ActionMessenger
andActionService
to support per-tab action updates, enable/disable functionality, and badge text color. Introduced port-based messaging withPortService
. [1] [2] [3]onConnect
handling. [1] [2] [3]Extension Manifest and Model
__addonRecheck
property to theIExtension
model.