-
Notifications
You must be signed in to change notification settings - Fork 0
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
RouteCell refactor to display multiple combinations of directions #48
Conversation
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.
Great work Mihili! The refactor is so refreshing to see many many lines of code get deleted, the logic seems way simpler too. Anything that I said "Nit:" is optional to address, everything else I would like to be addressed. Although there are a lot of comments I want to emphasize that you did a great job! Most of them are minor lol.
app/src/main/java/com/cornellappdev/transit/models/RouteModels.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/transit/models/RouteModels.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/transit/ui/components/RouteCell.kt
Outdated
Show resolved
Hide resolved
) { | ||
Text( | ||
text = transport.lateness.text(), | ||
fontFamily = sfProDisplayFamily, |
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.
why are we using SF pro 😭 this is a copyrighted font and is NOT legal for us to use... I may bring this up in leads lol (you don't have to respond to this comment but just interesting to point out)
app/src/main/java/com/cornellappdev/transit/ui/components/RouteCell.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/transit/ui/components/RouteCell.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/transit/ui/components/RouteCell.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/cornellappdev/transit/ui/components/RouteCell.kt
Outdated
Show resolved
Hide resolved
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.
Overall it is great to see sooooo much code getting deleted, beautiful stuff!
app/src/main/java/com/cornellappdev/transit/ui/viewmodels/RouteViewModel.kt
Outdated
Show resolved
Hide resolved
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.
Yaaayyy amazing job! Just make the previews and helper Composables private
and you should be good to go.
* @param transport The transport data to display in the route cell. | ||
*/ | ||
@Composable | ||
fun RouteCellHeader(transport: Transport) { |
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.
I just remembered all the @Preview
functions and this helper function should be private
RouteCell
can now display routes with any number of bus and walk directions in any order. (Closes Route shows a '0' bus line #44 )Transport
class to have no sealed classes (created unnecessary complications inRouteScreen
)HomeScreen
search barRouteScreen
Demo.1.mp4
Demo.2.mp4