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

Add Class Names #1236

Merged
merged 27 commits into from
Aug 15, 2024
Merged

Add Class Names #1236

merged 27 commits into from
Aug 15, 2024

Conversation

miles-grant-ibigroup
Copy link
Collaborator

Description:
Adds a bunch of class names all over the place to make post-compile styling easier.

PR Checklist:

  • Does the code follow accessibility standards (WCAG 2.1 AA Compliant)?
  • Are all languages supported (Internationalization/Localization)?
  • Are appropriate Typescript types implemented?

@miles-grant-ibigroup miles-grant-ibigroup self-assigned this Jun 13, 2024
@miles-grant-ibigroup miles-grant-ibigroup marked this pull request as ready for review July 29, 2024 10:52
Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

This looks pretty good but I have a few thoughts about redundant things. Also I'd like to be able to test it with the new ItinerarySupplement component

lib/components/app/app.css Show resolved Hide resolved
@@ -3,11 +3,12 @@ import { Itinerary, Leg } from '@opentripplanner/types'
import coreUtils from '@opentripplanner/core-utils'
import React from 'react'

export const getFirstTransitLeg = (itinerary: Itinerary): Leg | undefined =>
itinerary.legs?.find((leg: Leg) => leg?.from?.vertexType === 'TRANSIT')

export const getFirstTransitLegStop = (
Copy link
Contributor

Choose a reason for hiding this comment

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

do we even need this function? Could we just get rid of it? Where is it used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's used in the metro itinerary!

Copy link
Contributor

Choose a reason for hiding this comment

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

If it wasn't clear this comment is about getFirstTransitLegStop. Literally all it does is return the stop from an itinerary. I don't know that we really need a whole function to do that. There's no logic there

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's shorter to write out the method than to copy paste that line everywhere!

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

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

I think this makes sense! Beautiful class names

# Conflicts:
#	__tests__/components/viewers/__snapshots__/nearby-view.js.snap
#	yarn.lock
@miles-grant-ibigroup miles-grant-ibigroup merged commit dd3bb52 into dev Aug 15, 2024
9 checks passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the allow-more-styling branch August 15, 2024 17:24
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