refactor: remove feature views and new badge logic from inspector#164
Merged
refactor: remove feature views and new badge logic from inspector#164
Conversation
Contributor
There was a problem hiding this comment.
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. |
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.
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:
.mageforge-badge-newCSS class frominspector.css, removing the visual styling for the "NEW" badge.tabs.js.MAX_NEW_BADGE_VIEWSandfeatureViews) frominspector.js.loadFeatureViewsandincrementFeatureViews) ininspector.js.loadFeatureViews()during initialization andincrementFeatureViews()from picker logic. [1] [2]These changes simplify the codebase by removing an unused or obsolete feature.