-
Notifications
You must be signed in to change notification settings - Fork 201
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
Feature/445 stretchfield #603
Conversation
… feature/445-stretchfield
… feature/445-stretchfield
This still needs more work. For some reason other fields are getting double entries. |
Fixed build issue (from merge) and fixed colors for extended fields. Ready for some prelim review... what do folks think of this kind of implementation? |
After talking discussions about what the website is doing, I decided to try and extend just the lunch field. Still needs to be discussed with the mobile team to see if this change is worth keeping. |
Let's go ahead and review this one and merge if possible. |
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.
Thanks!!
I left some comments!
Please check them🙏
|
||
public init( | ||
timetableItem: TimetableItem, | ||
cellCount: Int? = 1, |
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 think this argument is no needed an optional 🤔
and required property is no needed a default value 👍
cellCount: Int? = 1, | |
cellCount: Int, |
Text("\(timetableItem.startsTimeString) - \(timetableItem.endsTimeString)") | ||
.textStyle(.labelMedium) | ||
.foregroundStyle(timetableItem.room.roomTheme.primaryColor) | ||
.foregroundStyle(cellCount>1 ? AssetColors.Surface.onSurfaceVariant.swiftUIColor : timetableItem.room.roomTheme.primaryColor) |
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.
.foregroundStyle(cellCount>1 ? AssetColors.Surface.onSurfaceVariant.swiftUIColor : timetableItem.room.roomTheme.primaryColor) | |
.foregroundStyle(cellCount > 1 ? AssetColors.Surface.onSurfaceVariant.swiftUIColor : timetableItem.room.roomTheme.primaryColor) |
I want add spaces for any operators left and right😅
@@ -198,7 +209,7 @@ fileprivate var bottomTabBarPadding: some View { | |||
} | |||
|
|||
extension RoomType { | |||
func toRoom() -> TimetableRoom { | |||
public func toRoom() -> TimetableRoom { |
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 did you add this public
🤔?
I seem this PR doesn't reference this method.
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 was using it elsewhere, but on closer inspection it was in the same file so public was not needed.
@MrSmart00 Thanks for your comments! I responded and made some adjustments. |
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.
left some comments~
please check them🙏
@@ -265,9 +276,9 @@ extension RoomType { | |||
} | |||
|
|||
extension TimetableTimeGroupItems { | |||
func getCellForRoom(room: RoomType, onTap: @escaping (TimetableItemWithFavorite) -> Void) -> TimetableGridCard? { | |||
func getCellForRoom(room: RoomType, cellCount: Int?=1, onTap: @escaping (TimetableItemWithFavorite) -> Void) -> TimetableGridCard? { |
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.
func getCellForRoom(room: RoomType, cellCount: Int?=1, onTap: @escaping (TimetableItemWithFavorite) -> Void) -> TimetableGridCard? { | |
func getCellForRoom(room: RoomType, cellCount: 1, onTap: @escaping (TimetableItemWithFavorite) -> Void) -> TimetableGridCard? { |
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 might be wrong, but I think the intended change is removing "?=1" not the Int part... correct?
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.
sorry it's wrong😅
func getCellForRoom(room: RoomType, cellCount: Int, onTap: @escaping (TimetableItemWithFavorite) -> Void) -> TimetableGridCard? {
is correct👍
@charles-b-stb
onTap: @escaping (TimetableItem) -> Void | ||
) { | ||
self.timetableItem = timetableItem | ||
self.onTap = onTap | ||
self.cellCount = cellCount ?? 1 |
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.
you have ?? 1
is never used used warning yet.
you should remove it👍
Ok. I will commit this one as-is. Thanks! Co-authored-by: Hiroya Hinomori <[email protected]>
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.
LGTM 🙏
Issue
Overview (Required)
TODO: The cell spacing needs adjustment.TODO: The stretched cells should have the room color removed.colors fixedBased off #367 and should not be merged until after the grid merge is complete.
Links
Screenshot (Optional if screenshot test is present or unrelated to UI)
Movie (Optional)