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

[#789] Fixed Timetable grid item UI #898

Merged
merged 3 commits into from
Sep 1, 2023
Merged

Conversation

Noddy20
Copy link

@Noddy20 Noddy20 commented Aug 22, 2023

Issue

Overview

[Updated] Changes made in the TimeTable grid item UI -

  • Issue fixed : Long titles were truncating, Fixed with ellipsis
  • Added Checks and changes to make UI look like Figma UI
  • Updated the error content (replace full message with icon only) as shown in Figma

Background Context -

  • Truncating lines fixed by the Column weights

Links

  • NA

Screenshot (Optional if screenshot test is present or unrelated to UI)

Before After

@Noddy20 Noddy20 requested a review from a team as a code owner August 22, 2023 17:10
@Noddy20 Noddy20 requested a review from ry-itto August 22, 2023 17:10
@github-actions
Copy link

github-actions bot commented Aug 23, 2023

Snapshot diff report

File name Image
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_0_compare.
png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_4_compare.
png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_L
anguage_PreviewTimet
ableGridLongTitleIte
m-English-5_8_null_c
ompare.png
io.github.droidkaigi
.confsched2023.sessi
ons.section_null_The
me_TimetablePreview-
LightMode-25_25_null
_compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_L
anguage_PreviewTimet
ableGridItem-Japanes
e-4_6_null_compare.p
ng
io.github.droidkaigi
.confsched2023.sessi
ons.section_null_The
me_TimetablePreview-
DarkMode-25_26_null_
compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_3_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_6_compare.
png
io.github.droidkaigi
.confsched2023.sessi
ons.section_null_Lan
guage_TimetablePrevi
ew-English-15_18_nul
l_compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridMultiSpeakersIt
em-DarkMode-11_12_nu
ll_compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.section_null_Lan
guage_TimetablePrevi
ew-Japanese-15_17_nu
ll_compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_5_compare.
png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_4_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_5_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_1_compare.
png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_0_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_L
anguage_PreviewTimet
ableGridItem-English
-4_7_null_compare.pn
g
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_6_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_3_compare.
png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_1_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-LightMode-
12_12_null_2_compare
.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_L
anguage_PreviewTimet
ableGridLongTitleIte
m-Japanese-5_7_null_
compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridMultiSpeakersIt
em-LightMode-11_11_n
ull_compare.png
io.github.droidkaigi
.confsched2023.sessi
ons.component_null_T
heme_PreviewTimetabl
eGridItem-DarkMode-1
2_13_null_2_compare.
png
TimetableScreenTest.
checkGridShot_compar
e.png
TimetableScreenTest.
checkGridScrollShot_
compare.png

@github-actions
Copy link

github-actions bot commented Aug 23, 2023

Test Results

206 tests   206 ✔️  6m 43s ⏱️
  11 suites      0 💤
  11 files        0

Results for commit b1fada1.

♻️ This comment has been updated with latest results.

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 23, 2023 01:37 Inactive
@github-actions
Copy link

Hi @Noddy20! Codes seem to be unformatted. To resolve this issue, please run ./gradlew detekt --auto-correct and fix the results of ./gradlew lintDebug.. Thank you for your contribution.

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 23, 2023 05:59 Inactive
@github-actions github-actions bot temporarily deployed to deploygate-distribution August 23, 2023 15:13 Inactive
@Noddy20 Noddy20 force-pushed the Issue-789 branch 2 times, most recently from 23b50a6 to 4ef49a7 Compare August 24, 2023 04:51
.weight(1f)
.defaultMinSize(minHeight = 8.dp),
)
if (speakers.isEmpty()) return@ConstraintLayout
Copy link
Member

Choose a reason for hiding this comment

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

Almost LGTM! I would like to use if block here. This is because we don't expect an early return when we write Compose so we could accidentally skip important component 🙏

Copy link
Author

@Noddy20 Noddy20 Aug 24, 2023

Choose a reason for hiding this comment

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

Updated.

@takahirom
Copy link
Member

It looks like the sessions that don't have a speaker can break. Could you check it? We have several sessions that have no speakers. 👀
image

@Noddy20
Copy link
Author

Noddy20 commented Aug 26, 2023

It looks like the sessions that don't have a speaker can break. Could you check it? We have several sessions that have no speakers. 👀 image

I'll look into it.

@Noddy20
Copy link
Author

Noddy20 commented Aug 26, 2023

It looks like the sessions that don't have a speaker can break. Could you check it? We have several sessions that have no speakers. 👀 image

Fixed it, please review @takahirom

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 27, 2023 05:01 Inactive
@takahirom
Copy link
Member

If there is a speaker. Maybe the title is going to center?
image

@Noddy20
Copy link
Author

Noddy20 commented Aug 28, 2023

If there is a speaker. Maybe the title is going to center? image

Thanks 🧐 @takahirom, Looks like the whole content is moving center vertically when the content is less.
Pushing a fix right away.

@takahirom
Copy link
Member

Sorry for bothering you. But, the text is hidden when the item is small. What do you think?
image

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 29, 2023 16:02 Inactive
@Noddy20
Copy link
Author

Noddy20 commented Aug 30, 2023

Sorry for bothering you. But, the text is hidden when the item is small. What do you think? image

I can take a look at that. Might need to change the approach.
@takahirom Is it possible to have a case with that small item? In a case like that what can we prioritize to show, since it will be difficult to fit all the content there.

@Noddy20 Noddy20 force-pushed the Issue-789 branch 3 times, most recently from b641996 to c8ff347 Compare August 30, 2023 09:22
@github-actions github-actions bot temporarily deployed to deploygate-distribution August 30, 2023 11:35 Inactive
@Noddy20
Copy link
Author

Noddy20 commented Aug 30, 2023

@takahirom

  • Refactored the code and made some changes according to the Figma UI
  • There is one catch though, the schedule time text and speaker name title fontSizes will be adjusted according to the fontSizes of the title. Hope it works since a small title fontSize will any way look weird. This was required to make the Grid item more responsive for different heights.

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 30, 2023 14:31 Inactive
@takahirom
Copy link
Member

I think we can't see the session message 👀
image

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 31, 2023 15:56 Inactive
@Noddy20
Copy link
Author

Noddy20 commented Aug 31, 2023

I think we can't see the session message 👀 image

Yes. Session canceled message is not there in the Figma UI. Only Icon is there, please check the Figma link.
That is why I made this change which also reduces the items we can fit in this dynamic height Grid item.
This commit makes it look exactly like the Figma UI.

@takahirom
Copy link
Member

Oh, I see.

@github-actions github-actions bot temporarily deployed to deploygate-distribution September 1, 2023 01:32 Inactive
@@ -111,14 +110,24 @@ fun TimetableGridItem(
}
.padding(TimetableGridItemSizes.padding),
) {
Column {
Column(
Copy link
Member

Choose a reason for hiding this comment

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

Honestly, I was hesitant to use ConstraintLayout, as it's not compatible with other platforms. This alternative seems much better.

Copy link
Author

Choose a reason for hiding this comment

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

Yes. I had to try multiple iterations to make this solution 😅
Best thing is that now we have the exact Figma UI 🙌🏻

Copy link
Member

@takahirom takahirom left a comment

Choose a reason for hiding this comment

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

Thank you for this PR. Your relentless perseverance was impressive.

@takahirom takahirom merged commit 46efa71 into DroidKaigi:main Sep 1, 2023
8 checks passed
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.

Long session titles should be truncated with an ellipsis.
2 participants