-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Floating Vehicle Bunching #1333
base: dev
Are you sure you want to change the base?
Changes from 7 commits
3295af6
255f6aa
120a77d
f5f727c
34da8d3
bf58322
1073c73
04558a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { Bicycle } from '@styled-icons/fa-solid/Bicycle' | ||
import { Company } from '@opentripplanner/types' | ||
import { connect } from 'react-redux' | ||
import { FormattedMessage, IntlShape, useIntl } from 'react-intl' | ||
// @ts-expect-error icons doesn't have typescript? | ||
import { getCompanyIcon } from '@opentripplanner/icons/lib/companies' | ||
import { IntlShape, useIntl } from 'react-intl' | ||
// @ts-expect-error icons doesn't have typescript? | ||
import { Micromobility } from '@opentripplanner/icons' | ||
import React, { Suspense } from 'react' | ||
|
||
import { AppReduxState } from '../../../util/state-types' | ||
import { IconWithText } from '../../util/styledIcon' | ||
|
||
import { Card, CardBody, CardHeader, CardTitle } from './styled' | ||
import { Card, CardBody, CardFooter, CardHeader, CardTitle } from './styled' | ||
import DistanceDisplay from './distance-display' | ||
|
||
type VehicleFormFactor = | ||
|
@@ -101,6 +101,7 @@ const Vehicle = ({ | |
vehicle.name === 'Default vehicle type' | ||
? getVehicleText(formFactor, companyLabel, intl) | ||
: vehicle.name | ||
|
||
return ( | ||
<Card> | ||
<CardHeader> | ||
|
@@ -119,6 +120,18 @@ const Vehicle = ({ | |
)} | ||
{fromToSlot} | ||
</CardBody> | ||
{vehicle.additionalCount > 0 && ( | ||
<CardFooter> | ||
<span> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the span needed? |
||
<FormattedMessage | ||
id="components.NearbyView.additionalVehicles" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about this but it gets busy especially in the case of a 2-line title |
||
values={{ | ||
count: vehicle.additionalCount | ||
}} | ||
/> | ||
</span> | ||
</CardFooter> | ||
)} | ||
</Card> | ||
) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for the margin between the footer and the body of the card, and can it be done using
margin-top
ofCardFooter
itself instead?