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

Apply bookmark screen design #260

Merged
merged 29 commits into from
Jul 18, 2023
Merged

Conversation

mtkw0127
Copy link
Contributor

@mtkw0127 mtkw0127 commented Jul 11, 2023

Issue

Overview (Required)

  • I developed BookmarkScreen

Links

Screenshot

Before After

@github-actions
Copy link

github-actions bot commented Jul 11, 2023

Test Results

18 tests   18 ✔️  59s ⏱️
  4 suites    0 💤
  4 files      0

Results for commit 7afc39e.

♻️ This comment has been updated with latest results.

@@ -22,12 +25,14 @@ import androidx.compose.ui.unit.dp
import io.github.droidkaigi.confsched2023.sessions.strings.SessionsStrings.Timetable

const val TimetableUiTypeChangeButtonTestTag = "TimetableUiTypeChangeButton"
const val BookMarkIconTestTag = "BookMarkIconTestTag"
Copy link
Member

Choose a reason for hiding this comment

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

For your reference, now that you added the test tag, you can add test to check the screenshot like checkNavigateToContributorShot() in KaigiAppTest 👍

Copy link
Member

Choose a reason for hiding this comment

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

This is a top-level constant, so perhaps a name like "TimetableBookmarkIconTestTag" would be better.

@DroidKaigi DroidKaigi deleted a comment from github-actions bot Jul 11, 2023
@github-actions
Copy link

Dependency diff:

dependency diff%0Abranch: main -> feature/apply-bookmark-screen-design, module: app, configuration: releaseRuntimeClasspath

@@ -50,7 +50,7 @@ composeUiTestManifest = { module = "androidx.compose.ui:ui-test-manifest", versi
composeHiltNavigtation = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "composeHiltNavigatiaon" }
composeLintCheck = { module = "com.slack.lint.compose:compose-lint-checks", version = "1.2.0" }
composeCoil = { module = "io.coil-kt:coil-compose", version = "2.4.0" }

composeConstraintLayout = { module = "androidx.constraintlayout:constraintlayout-compose", version = "1.0.1" }
Copy link
Member

Choose a reason for hiding this comment

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

It is OK in this PR but ConstraintLayout doesn't support multiplatform. So we maybe have to convert it later. 👀

@@ -0,0 +1,91 @@
package io.github.droidkaigi.confsched2023.sessions.section
Copy link
Member

Choose a reason for hiding this comment

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

Having this in section is great!

@github-actions
Copy link

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

onClick = { onClickTopAreaBookmarkIcon() },
) {
Icon(
imageVector = Icons.Outlined.Bookmark,
Copy link
Contributor Author

@mtkw0127 mtkw0127 Jul 17, 2023

Choose a reason for hiding this comment

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

I wanted show outlined bookmarkIcon, but it was filled.
I didn't know how to do that. sorry.
Can I add svg file downloaded from Figma into drawable folder?

modifier = Modifier
.size(84.dp)
.background(
color = Color(0xFFCEE9DB),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to set Color directly, but I couldn't find the definition.
I didn't know I can add the definition in Color.kt🙏
Is that ok?

import androidx.compose.ui.unit.lerp
import androidx.compose.ui.unit.sp
import io.github.droidkaigi.confsched2023.sessions.strings.SessionsStrings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was my first challenge to develop animation, so it might be not good in terms of performance or something. 🙏

style = titleTextStyle,
modifier = Modifier.padding(
start = if (titlePaddingStart >= 0.dp) titlePaddingStart else 0.dp,
top = if (titlePaddingTop >= 0.dp) titlePaddingTop else 0.dp,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know the reason, but if there is not this if sentence, a crash happen.
The error said that padding is negative value, but I didn't intend to do that.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add a FIXME comment for this?

@mtkw0127 mtkw0127 marked this pull request as ready for review July 17, 2023 02:42
@mtkw0127 mtkw0127 requested a review from takahirom July 17, 2023 02:43
Comment on lines +33 to +46
val selectedChipColor = AssistChipDefaults.assistChipColors(
containerColor = Color(0xFFCEE9DB),
)
val selectedChipBoarderColor = AssistChipDefaults.assistChipBorder(
borderColor = md_theme_light_outline,
borderWidth = 0.dp,
)
val isAll = currentDayFilter.size == DroidKaigi2023Day.values().size
val isDayFirst =
currentDayFilter.size == 1 && currentDayFilter.first() == DroidKaigi2023Day.Day1
val isDaySecond =
currentDayFilter.size == 1 && currentDayFilter.first() == DroidKaigi2023Day.Day2
val isDayThird =
currentDayFilter.size == 1 && currentDayFilter.first() == DroidKaigi2023Day.Day3
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! We are creating and using UiState for each section. So how about migrating these logics to the UiState? Maybe we don't have to pass currentDayFilter 👀
https://github.com/DroidKaigi/conference-app-2023#screen

Copy link
Member

Choose a reason for hiding this comment

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

But it is ok for now I can make an issue for this

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.

Thanks! It's great point to start! We can improve with our contributors.

@takahirom takahirom merged commit fedfcfd into main Jul 18, 2023
6 checks passed
@takahirom takahirom deleted the feature/apply-bookmark-screen-design branch July 18, 2023 02:10
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.

Apply bookmark screen design
2 participants