Skip to content

refactor: remove feature views and new badge logic from inspector#164

Merged
dermatz merged 1 commit intomainfrom
fix/remove-new-badge
Apr 11, 2026
Merged

refactor: remove feature views and new badge logic from inspector#164
dermatz merged 1 commit intomainfrom
fix/remove-new-badge

Conversation

@dermatz
Copy link
Copy Markdown
Member

@dermatz dermatz commented Apr 11, 2026

This pull request removes the "NEW" badge feature from the MageForge Inspector UI, including all related logic for tracking and displaying the badge for new features. The main changes are grouped as follows:

Removal of "NEW" Badge UI and Logic:

  • Deleted the .mageforge-badge-new CSS class from inspector.css, removing the visual styling for the "NEW" badge.
  • Removed the logic for displaying the "NEW" badge on the Performance and Core Web Vitals tabs from tabs.js.
  • Eliminated all feature view tracking state and constants (such as MAX_NEW_BADGE_VIEWS and featureViews) from inspector.js.
  • Removed the methods for loading and incrementing feature views from local storage (loadFeatureViews and incrementFeatureViews) in inspector.js.
  • Deleted all calls to feature view tracking methods, including removing the call to loadFeatureViews() during initialization and incrementFeatureViews() from picker logic. [1] [2]

These changes simplify the codebase by removing an unused or obsolete feature.

Copilot AI review requested due to automatic review settings April 11, 2026 14:30
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 removes the “NEW” badge feature from the MageForge Inspector frontend UI by deleting its styling, badge rendering logic, and the localStorage-backed view-count tracking previously used to decide when to show the badge.

Changes:

  • Removed “NEW” badge rendering from the inspector tabs UI.
  • Removed feature-view tracking state and localStorage persistence from the inspector Alpine component.
  • Removed the “NEW” badge CSS styling.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/view/frontend/web/js/inspector/tabs.js Removes DOM creation/attachment of the “NEW” badge on specific tabs.
src/view/frontend/web/js/inspector/picker.js Removes the call that incremented feature-view counters during hover interactions.
src/view/frontend/web/js/inspector.js Deletes feature-view tracking state and the load/increment methods (and init call).
src/view/frontend/web/css/inspector.css Removes the .mageforge-badge-new class styling.

@dermatz dermatz merged commit 3bf7143 into main Apr 11, 2026
17 checks passed
@dermatz dermatz deleted the fix/remove-new-badge branch April 11, 2026 14:36
@github-actions github-actions bot mentioned this pull request Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants