Skip to content

Commit

Permalink
Merge pull request #5268 from HSLdevcom/DT-6729
Browse files Browse the repository at this point in the history
DT-6729 Broken route names in stop view
  • Loading branch information
vesameskanen authored Feb 15, 2025
2 parents 4da2f8f + e6cce45 commit 82f37da
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/component/itinerary/navigator/navigator.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
display: flex;
flex-direction: row;
height: 18px;

.arrow-center {
padding-top: 4px;
}
Expand All @@ -95,7 +95,7 @@

.vcenter-children {
display: flex;

.vehicle-number {
color: white;
padding: 0 8px 0 2px;
Expand Down
2 changes: 2 additions & 0 deletions app/component/routepage/RoutePatternSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function renderPatternSelectSuggestion(item, currentPattern) {
<Icon
className={item.mode.toLowerCase()}
img={`icon-icon_${item.mode.toLowerCase()}`}
color={item.color ? `#${item.color}` : null}
/>
<div className="similar-route-text">
<span className="similar-route-name">{item.shortName}</span>
Expand Down Expand Up @@ -169,6 +170,7 @@ class RoutePatternSelect extends Component {
shortName
longName
mode
color
}
}
`;
Expand Down
5 changes: 4 additions & 1 deletion app/component/routepage/ScheduleContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,13 +900,16 @@ class ScheduleContainer extends PureComponent {
this.context.config.timetables[routeIdSplitted[0]]
: undefined;

const timetableDay =
(wantedDay && wantedDay.format(DATE_FORMAT)) || newServiceDay;
const routeTimetableUrl =
routeTimetableHandler &&
timetableDay &&
this.context.config.URL.ROUTE_TIMETABLES[routeIdSplitted[0]] &&
routeTimetableHandler.routeTimetableUrlResolver(
this.context.config.URL.ROUTE_TIMETABLES[routeIdSplitted[0]],
this.props.route,
newServiceDay,
timetableDay,
this.props.lang,
);

Expand Down
6 changes: 5 additions & 1 deletion app/component/routepage/route.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,6 @@ $margin-left-right: 21.3px;
}

.icon {
color: $primary-color;
position: absolute;
right: 1rem;
top: 15px;
Expand All @@ -1241,6 +1240,11 @@ $margin-left-right: 21.3px;
}
}

.dropdown-arrow,
.in-text-arrow {
color: $primary-color;
}

.in-text-arrow {
position: relative;
float: none;
Expand Down
Binary file modified app/configurations/images/default/default-favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/util/legUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,9 @@ export function getHeadsignFromRouteLongName(route) {
if (
longName &&
shortName &&
// Sometimes a "normal" shortname is included in longName, but sometimes
// shortName is just a shortened version of longName.
shortName.length < 7 &&
longName.substring(0, shortName.length) === shortName &&
longName.length > shortName.length
) {
Expand Down

0 comments on commit 82f37da

Please sign in to comment.