Skip to content

TT-7335 Improve aesthetics of racetrack UI#314

Open
nghtctrl wants to merge 9 commits into
sillsdev:developfrom
nghtctrl:TT-7335
Open

TT-7335 Improve aesthetics of racetrack UI#314
nghtctrl wants to merge 9 commits into
sillsdev:developfrom
nghtctrl:TT-7335

Conversation

@nghtctrl
Copy link
Copy Markdown

@nghtctrl nghtctrl commented May 19, 2026

Changes:

  • Make the parallelograms (i.e., racetrack) bigger
  • Add mock dropdown for passage navigation (to be implemented later) -- the actual button styling will need to be adjusted by theme control, which is out of scope for this PR
  • Fix how the racetrack centers itself on bigger screens (e.g., tablets and laptop screens)

Before:
Before

After:
After

@nghtctrl nghtctrl changed the title TT-7335 TT-7335 Improve aesthetics of racetrack UI May 19, 2026
@nghtctrl nghtctrl marked this pull request as ready for review May 19, 2026 18:32
Comment thread src/renderer/src/components/PassageDetail/mobile/MobileWorkflowSteps.tsx Outdated
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

Improves the mobile racetrack (workflow step) UI: enlarges the parallelogram step indicators, adds a placeholder passage-navigation dropdown beside them, and adjusts layout so the racetrack stays centered on wider screens via a mirroring spacer.

Changes:

  • Resize step indicators to 80×30 with a clipPath parallelogram, overlap edges, and reformat the centered label/tip.
  • Add a passage-selection Button+Menu (book/reference) that, when an item is chosen, persists the current passage and navigates via usePassageNavigate.
  • Track the dropdown width with useLayoutEffect+ResizeObserver and render a matching spacer so mx:auto centers the parallelograms.

@nghtctrl nghtctrl requested a review from gtryus May 19, 2026 19:44
Copy link
Copy Markdown
Contributor

@gtryus gtryus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also put some devin.ai comments into the code but here is one that doesn't fit in this module.

devin.ai reports this issue:
Cypress testing rule file references outdated SVG-based rendering
The .cursor/rules/cypress-testing-takeaways.mdc states: "WorkflowStepsMobile renders SVG stages (no visible text nodes). Assert on structure (svg, svg g)." The component no longer uses SVG — it now uses CSS clipPath on ButtonBase elements. The existing Cypress tests in MobileWorkflowSteps.cy.tsx correctly use data-cy selectors and don't rely on SVG structure, so they should still pass. However, the rule file is now stale and should be updated to reflect the new rendering approach (CSS clip-path parallelograms, passage dropdown). Similarly, the advice about dispatching a resize event after mount may no longer be needed since the width-driven step list was replaced with a flex/scroll layout.

const passRecIds = related(section, 'passages');
if (!Array.isArray(passRecIds)) return [];
return passRecIds
.map((p) => findRecord(memory, 'passage', p.id) as PassageD)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sectionPassages includes publishing titles unlike nextPassageRecord
The sectionPassages memo at lines 53-59 includes all passages from the section. In contrast, nextPassageRecord in nextPasId.ts:21-26 filters out publishing titles via isPublishingTitle(). This means the passage dropdown will show publishing title entries (e.g., section headers used for publishing) as selectable items. This may be intentional for the dropdown use case (showing all passages for navigation) or may be an oversight.

rememberCurrentPassage(memory, remId);
passageNavigate(`/detail/${prjId}/${remId}`);
setPassageMenuAnchor(null);
}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passage dropdown always visible regardless of workflow progression mode
The PassageDetailMobileFooter at PassageDetailMobileFooter.tsx:65-66 conditionally hides passage prev/next navigation when orgDefaultWorkflowProgression === 'step' (showing step-based navigation instead). The new passage dropdown in the header is always shown regardless of the progression mode setting. This means in 'step' progression mode, the footer hides passage navigation but the header now provides it. This may be intentional (providing a way to switch passages even in step mode) or may be an inconsistency worth confirming with the team.

Another issue:
Passage dropdown does not guard against active recording state
The handleSelect function at line 66-73 blocks workflow step changes when recording || commentRecording is true. However, the new passage dropdown's onClick handler at lines 149-153 does not check these states before navigating to a different passage. If a user taps a different passage while actively recording audio, the navigation could interrupt the recording without warning.

That said, this is consistent with the existing pattern: PassageDetailMobileFooter.tsx:117-130 also does not check recording state before passage navigation, and PassageDetailChooser.tsx:55-67 similarly omits this check. The passageNavigate flow goes through checkSavedFn (UnsavedContext), which may provide some protection, but recording state and unsaved-changes state are tracked separately. This appears to be a pre-existing design gap rather than a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants