Skip to content
Merged
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
21 changes: 12 additions & 9 deletions assets/js/dashboard/extra/exploration.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ function ExplorationColumn({
) : (
<span className="flex flex-col items-center gap-2">
<FlagIcon className="size-4.5" />
{"You've reached the end of this journey"}
{direction === EXPLORATION_DIRECTIONS.BACKWARD
? "You've reached the beginning of this journey"
: "You've reached the end of this journey"}
</span>
)}
</div>
Expand Down Expand Up @@ -790,7 +792,15 @@ export function FunnelExploration() {

const initialLoading =
!inViewport || (steps.length === 0 && activeColumnLoading)
const numColumns = Math.max(steps.length + 1, initialLoading ? 1 : 3)
const journeyEnded =
!activeColumnLoading &&
activeColumnResults.length === 0 &&
steps.length >= 1
const numColumns = initialLoading
? 1
: journeyEnded || (activeColumnLoading && steps.length === 1)
? steps.length + 1
: Math.max(steps.length + 1, 3)
const gridColumns = Math.max(numColumns, 3)
const activeColumnIndex = steps.length
const containerRef = useRef(null)
Expand Down Expand Up @@ -880,13 +890,6 @@ export function FunnelExploration() {
key={i}
colIndex={i}
header={columnHeader(i, direction)}
className={
steps.length === 0 && i === 2
? 'sm:hidden'
: steps.length === 0 && i === 1
? 'sm:[grid-column:span_2]'
: undefined
}
active={isReachable}
// Active column gets live results; previously-active (now
// selected) columns get the candidate list that was visible at
Expand Down
Loading