Skip to content
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

Map tooltip bus #114

Merged
merged 30 commits into from
Oct 16, 2023
Merged

Map tooltip bus #114

merged 30 commits into from
Oct 16, 2023

Conversation

giladfuchs
Copy link
Collaborator

@giladfuchs giladfuchs commented Oct 11, 2023

Description

resolve #84

add a nice tooltip with info about the bus.
with an option to see the old JSON .

screenshots

with style card
on mobile
Screen Shot 2023-10-11 at 20 45 32

Desktop
Screen Shot 2023-10-11 at 20 44 11

with old json
Screen Shot 2023-10-11 at 20 44 56

Copy link
Member

@NoamGaash NoamGaash left a comment

Choose a reason for hiding this comment

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

great start!
could you please remove all the styling and formatting components from within the tooltip?

siriRouteLineRefs: string,
) {
const gtfs_route_promise: SiriRideWithRelatedPydanticModel[] = await SIRI_API.siriRidesListGet({
limit: 122,
Copy link
Member

Choose a reason for hiding this comment

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

122?

Suggested change
limit: 122,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lol maybe by mistake it should be 1

</Marker>
))}
{positions.map((pos, i) => {
const icon = colorIcon({
Copy link
Member

Choose a reason for hiding this comment

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

nice!

src/pages/components/MapLayers/BusToolTip.tsx Outdated Show resolved Hide resolved
@NoamGaash NoamGaash self-requested a review October 15, 2023 12:07
{TEXTS.destination} :
<span>{siriRide && siriRide!.gtfsRouteRouteLongName?.split('<->')[1]}</span>
</h4>
<h4 style={{ textAlign: 'start' }}>
Copy link
Member

Choose a reason for hiding this comment

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

please try to avoid inline CSS 🙃

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done!
there is another place you use sx
anyway I added scss file for it

Comment on lines 43 to 44
<Grid container display="flex" direction="row-reverse" justifyContent="space-between">
<Grid item xs={4}>
Copy link
Member

Choose a reason for hiding this comment

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

let's avoid abusing the grid system - it's not necessary here. we can apply CSS. it can be on seperate PR

@giladfuchs giladfuchs merged commit f836991 into hasadna:main Oct 16, 2023
5 checks passed
@NoamGaash
Copy link
Member

🥳 🎈

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.

Creating a cool tooltip with bus information
2 participants