Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/view/frontend/web/css/inspector.css
Original file line number Diff line number Diff line change
Expand Up @@ -461,19 +461,6 @@
border-bottom-color: var(--mageforge-color-blue);
}

.mageforge-badge-new {
background: linear-gradient(135deg, var(--mageforge-color-amber) 0%, var(--mageforge-color-amber) 100%);
color: white;
font-size: 8px;
padding: 1px 4px;
border-radius: 4px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
animation: mageforge-pulse 2s infinite;
}

/* ============================================================================
Info Sections & Data Display
========================================================================== */
Expand Down
41 changes: 0 additions & 41 deletions src/view/frontend/web/js/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ function _registerMageforgeInspector() {
pageTimings: null,
performanceObservers: [],

// Feature Discovery
MAX_NEW_BADGE_VIEWS: 5,
featureViews: {
'performance': 0,
'core-web-vitals': 0
},

// ====================================================================
// Lifecycle
// ====================================================================
Expand All @@ -101,7 +94,6 @@ function _registerMageforgeInspector() {
this.createFloatingButton();
this.initWebVitalsTracking();
this.cachePageTimings();
this.loadFeatureViews();

// Dispatch init event for Hyvä integration
this.$dispatch('mageforge:inspector:init');
Expand Down Expand Up @@ -141,39 +133,6 @@ function _registerMageforgeInspector() {
}
},

// ====================================================================
// Feature Views
// ====================================================================

loadFeatureViews() {
try {
const stored = localStorage.getItem('mageforge_feature_views');
if (stored) {
this.featureViews = { ...this.featureViews, ...JSON.parse(stored) };
}
} catch (e) {
console.warn('MageForge: Failed to load feature views', e);
}
},

incrementFeatureViews() {
let changed = false;
['performance', 'core-web-vitals'].forEach(feature => {
if (this.featureViews[feature] < this.MAX_NEW_BADGE_VIEWS) {
this.featureViews[feature]++;
changed = true;
}
});

if (changed) {
try {
localStorage.setItem('mageforge_feature_views', JSON.stringify(this.featureViews));
} catch (e) {
// Ignore storage errors
}
}
},

// ====================================================================
// Panel Data
// ====================================================================
Expand Down
1 change: 0 additions & 1 deletion src/view/frontend/web/js/inspector/picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export const pickerMethods = {
this.showHighlight(element);
this.updatePanelData(element);
this.showInfoBadge(element);
this.incrementFeatureViews();
}, this.hoverDelay);
} else if (!element && this.hoveredElement) {
// Only hide highlight when leaving element, keep badge visible
Expand Down
9 changes: 0 additions & 9 deletions src/view/frontend/web/js/inspector/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ export const tabsMethods = {
textSpan.textContent = tab.label;
button.appendChild(textSpan);

// Show "New" badge for Performance and Core Web Vitals if seen < 5 times
if (['performance', 'core-web-vitals'].includes(tab.id) &&
(this.featureViews[tab.id] || 0) < this.MAX_NEW_BADGE_VIEWS) {
const badge = document.createElement('span');
badge.className = 'mageforge-badge-new';
badge.textContent = 'NEW';
button.appendChild(badge);
}

button.onclick = (e) => {
e.preventDefault();
e.stopPropagation();
Expand Down
Loading