Skip to content

Add header to route card#485

Merged
guytepper merged 27 commits intobetter-rail:mainfrom
drehelis:route_card_header
Nov 14, 2025
Merged

Add header to route card#485
guytepper merged 27 commits intobetter-rail:mainfrom
drehelis:route_card_header

Conversation

@drehelis
Copy link
Copy Markdown
Member

@drehelis drehelis commented Sep 23, 2025

Follwoing #474

After some internal discussions, we agreed to create "UI settings" page and to put this feature off by default.

image

Comment thread app/components/route-card/route-card.tsx Outdated
@drehelis drehelis changed the title Proposal: Add header to route card Add header to route card Oct 9, 2025
@drehelis drehelis marked this pull request as ready for review October 9, 2025 10:12
Copilot AI review requested due to automatic review settings October 11, 2025 20:48
Copy link
Copy Markdown

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

This PR adds a configurable header to route cards displaying train information, controlled through a new UI settings page. The feature is disabled by default and requires users to enable it through settings.

  • Added a UI settings screen with a toggle for showing route card headers
  • Extended API models to include train wagon data for determining train types
  • Implemented train type detection and icon display in route card headers

Reviewed Changes

Copilot reviewed 12 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/services/api/route-api.ts Passes through visaWagonData from API response
app/services/api/rail-api.types.ts Adds VisaWagonData and Wagon interfaces for train information
app/screens/settings/settings-ui-screen.tsx Creates new UI settings screen with route card header toggle
app/screens/settings/settings-screen.tsx Adds navigation to UI settings screen
app/screens/index.ts Exports new UI settings screen
app/navigators/settings/settings-navigator.tsx Adds UI settings route to navigation stack
app/models/settings/settings.ts Adds showRouteCardHeader setting to state model
app/i18n/*.json Adds translations for train types and UI settings
app/components/route-card/route-card.tsx Implements conditional header display with train information

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread app/components/route-card/route-card.tsx
Comment thread app/components/route-card/route-card.tsx Outdated
Comment thread app/navigators/settings/settings-navigator.tsx
Copilot AI review requested due to automatic review settings November 8, 2025 09:39
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

stopsText={stopsText}
isRideActive={props.isActiveRide}
/>
{mainTrain.originPlatform > 0 && (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@drehelis why is that check needed?

Copilot AI review requested due to automatic review settings November 8, 2025 10:46
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings November 8, 2025 11:20
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings November 8, 2025 11:29
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@guytepper
Copy link
Copy Markdown
Member

/publish

Copilot AI review requested due to automatic review settings November 8, 2025 11:59
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings November 8, 2025 13:08
Copy link
Copy Markdown

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@guytepper
Copy link
Copy Markdown
Member

/publish

@guytepper
Copy link
Copy Markdown
Member

/publish

2 similar comments
@drehelis
Copy link
Copy Markdown
Member Author

/publish

@drehelis
Copy link
Copy Markdown
Member Author

/publish

@guytepper guytepper merged commit 82fca63 into better-rail:main Nov 14, 2025
1 check passed
@drehelis drehelis deleted the route_card_header branch November 14, 2025 09:33
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