-
Notifications
You must be signed in to change notification settings - Fork 190
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 tab design #81
apply tab design #81
Conversation
# Conflicts: # feature-sessions/src/main/java/io/github/droidkaigi/confsched2022/feature/sessions/Sessions.kt
👀 |
|
||
import androidx.compose.ui.Modifier | ||
|
||
inline fun <T : Any> Modifier.ifNotNull(value: T?, builder: (T) -> Modifier): Modifier { |
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 I've seen this function somewhere, do you have any references to it? 👀
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.
Here it is.
https://twitter.com/at_sushi_at/status/1490190420789587969?s=20&t=vyP-Dvv1AMolU_1LUrZ1aA
I introduced it because it is very convenient
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 so too. 👍
But I wonder if this is used a lot. Because in the compose sample, I can only find one pattern of it. May I ask if you use this function often?
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.
ifNotNull
may not be used much
I am usingifNull
which is a slightly improved version of ifNotNull
.
Should we removeifNotNull
since we do not plan to use it now?
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.
Let's remove it 🙏
@@ -0,0 +1,11 @@ | |||
package io.github.droidkaigi.confsched2022.ui |
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 would like to name it IfModifier as a file name. I know there are advantages and disadvantages, but I wanted to separate the files by responsibilities. 🗄️
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.
Response completed.
e86033f
fixed spotless
core-ui/src/main/java/io/github/droidkaigi/confsched2022/ui/IfModifier.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.
Thank you for creating great tabs 📑
And first compose contributor 👏
…Modifier.kt Co-authored-by: Takahiro Menju <takam.dev@gmail.com>
Thank you for approve. |
) { | ||
days.forEachIndexed { index, day -> | ||
val isSelected = selectedTab == index | ||
Tab( |
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.
If you have time, you can divide SessionDayTab composable function
But you can leave it as is. 👍
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.
Response completed.
f4aa0ff
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.
Thank you for your cooperation 🙏
} | ||
} | ||
} | ||
} |
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.
[spotless] reported by reviewdog 🐶
} | |
} |
@@ -1,25 +1,37 @@ | |||
package io.github.droidkaigi.confsched2022.feature.sessions | |||
|
|||
import androidx.compose.foundation.background |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.foundation.background |
import androidx.compose.foundation.clickable | ||
import androidx.compose.foundation.layout.Box |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.foundation.layout.Box |
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.foundation.layout.height |
import androidx.compose.foundation.layout.windowInsetsPadding | ||
import androidx.compose.foundation.shape.RoundedCornerShape |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.foundation.shape.RoundedCornerShape |
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Tab |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.material3.MaterialTheme | |
import androidx.compose.material3.Tab |
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.setValue | ||
import androidx.compose.ui.Alignment |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.ui.Alignment |
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.text.font.FontWeight | ||
import androidx.compose.ui.text.style.TextAlign |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.ui.draw.clip | |
import androidx.compose.ui.text.font.FontWeight | |
import androidx.compose.ui.text.style.TextAlign |
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp |
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.
[spotless] reported by reviewdog 🐶
import androidx.compose.ui.unit.dp | |
import androidx.compose.ui.unit.sp |
@@ -29,7 +41,7 @@ | |||
import io.github.droidkaigi.confsched2022.feature.sessions.SessionsUiModel.ScheduleState.Loaded | |||
import io.github.droidkaigi.confsched2022.model.TimetableItemId | |||
import io.github.droidkaigi.confsched2022.model.orEmptyContents | |||
import io.github.droidkaigi.confsched2022.ui.pagerTabIndicatorOffset | |||
import io.github.droidkaigi.confsched2022.ui.ifTrue |
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.
[spotless] reported by reviewdog 🐶
import io.github.droidkaigi.confsched2022.ui.ifTrue |
figma
https://www.figma.com/file/NcSMs6dMsD88d4wOY0g3rK/Conference-App?node-id=19%3A580
screenshots
