Skip to content

Commit 62f27df

Browse files
committed
feat: inline pipeline steps in each command panel
Each command tab panel now shows a compact "How it works" pipeline directly below the code block. Steps are numbered pills with arrows between them, hovering shows the description tooltip. This solves the UX issue where the How It Works section was too far down the page to notice when switching command tabs. Now the pipeline is visible immediately in context.
1 parent 80962ae commit 62f27df

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

site/assets/css/main.css

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,76 @@
884884
color: var(--color-text-faint);
885885
}
886886

887+
/* --------------------------------------------------------------------------
888+
* INLINE PIPELINE (inside command panels)
889+
* -------------------------------------------------------------------------- */
890+
.pipeline-inline {
891+
margin-top: var(--space-6);
892+
padding-top: var(--space-5);
893+
border-top: 1px solid var(--color-border-subtle);
894+
}
895+
896+
.pipeline-inline__label {
897+
font-size: var(--text-xs);
898+
font-weight: var(--font-semibold);
899+
color: var(--color-text-muted);
900+
text-transform: uppercase;
901+
letter-spacing: var(--tracking-wider);
902+
margin-bottom: var(--space-3);
903+
}
904+
905+
.pipeline-inline__steps {
906+
display: flex;
907+
flex-wrap: wrap;
908+
align-items: center;
909+
gap: var(--space-2);
910+
}
911+
912+
.pipeline-inline__step {
913+
display: flex;
914+
align-items: center;
915+
gap: var(--space-2);
916+
padding: var(--space-1) var(--space-3);
917+
background: var(--color-bg-surface-2);
918+
border: 1px solid var(--color-border-subtle);
919+
border-radius: var(--radius-default);
920+
cursor: default;
921+
transition: border-color var(--duration-fast) var(--ease-out),
922+
background var(--duration-fast) var(--ease-out);
923+
}
924+
925+
.pipeline-inline__step:hover {
926+
border-color: var(--color-border-default);
927+
background: var(--color-bg-surface-3);
928+
}
929+
930+
.pipeline-inline__num {
931+
display: inline-flex;
932+
align-items: center;
933+
justify-content: center;
934+
width: 18px;
935+
height: 18px;
936+
font-size: 10px;
937+
font-weight: var(--font-semibold);
938+
color: var(--color-accent-purple);
939+
background: var(--color-accent-muted);
940+
border-radius: var(--radius-full);
941+
flex-shrink: 0;
942+
}
943+
944+
.pipeline-inline__title {
945+
font-size: var(--text-xs);
946+
font-family: var(--font-mono);
947+
color: var(--color-text-secondary);
948+
white-space: nowrap;
949+
}
950+
951+
.pipeline-inline__arrow {
952+
color: var(--color-text-faint);
953+
font-size: var(--text-sm);
954+
flex-shrink: 0;
955+
}
956+
887957
/* --------------------------------------------------------------------------
888958
* SCROLL CUE
889959
* -------------------------------------------------------------------------- */

site/assets/js/main.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,52 @@
837837
updateHowItWorks(e.detail.index);
838838
});
839839
}
840+
841+
// Inject inline pipeline steps into each command panel so users see them without scrolling
842+
var commandPanels = document.querySelectorAll('.commands .tabs__panel');
843+
commandPanels.forEach(function (panel, idx) {
844+
var data = howItWorksData[idx];
845+
if (!data || !data.steps) return;
846+
847+
var pipeline = document.createElement('div');
848+
pipeline.className = 'pipeline-inline';
849+
850+
var label = document.createElement('p');
851+
label.className = 'pipeline-inline__label';
852+
label.textContent = 'How it works';
853+
pipeline.appendChild(label);
854+
855+
var stepsRow = document.createElement('div');
856+
stepsRow.className = 'pipeline-inline__steps';
857+
858+
data.steps.forEach(function (step, i) {
859+
if (i > 0) {
860+
var arrow = document.createElement('span');
861+
arrow.className = 'pipeline-inline__arrow';
862+
arrow.setAttribute('aria-hidden', 'true');
863+
arrow.textContent = '\u2192';
864+
stepsRow.appendChild(arrow);
865+
}
866+
var stepEl = document.createElement('div');
867+
stepEl.className = 'pipeline-inline__step';
868+
stepEl.setAttribute('title', step.desc);
869+
870+
var num = document.createElement('span');
871+
num.className = 'pipeline-inline__num';
872+
num.textContent = i + 1;
873+
stepEl.appendChild(num);
874+
875+
var title = document.createElement('span');
876+
title.className = 'pipeline-inline__title';
877+
title.textContent = step.title;
878+
stepEl.appendChild(title);
879+
880+
stepsRow.appendChild(stepEl);
881+
});
882+
883+
pipeline.appendChild(stepsRow);
884+
panel.appendChild(pipeline);
885+
});
840886
}
841887

842888
// ========================================================================

0 commit comments

Comments
 (0)