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 tab design #81

Merged
merged 10 commits into from
Aug 28, 2022
Merged

apply tab design #81

merged 10 commits into from
Aug 28, 2022

Conversation

sobaya-0141
Copy link
Contributor

@sobaya-0141 sobaya-0141 commented Aug 28, 2022

# Conflicts:
#	feature-sessions/src/main/java/io/github/droidkaigi/confsched2022/feature/sessions/Sessions.kt
@takahirom
Copy link
Member

👀


import androidx.compose.ui.Modifier

inline fun <T : Any> Modifier.ifNotNull(value: T?, builder: (T) -> Modifier): Modifier {
Copy link
Member

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? 👀

Copy link
Contributor Author

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

Copy link
Member

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?

https://github.com/android/compose-samples/blob/e6994123804b976083fa937d3f5bf926da4facc5/Jetsnack/app/src/main/java/com/example/jetsnack/ui/components/Surface.kt#L56

Copy link
Contributor Author

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?

Copy link
Member

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
Copy link
Member

@takahirom takahirom Aug 28, 2022

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. 🗄️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Response completed.
e86033f

@takahirom takahirom changed the title apply design apply tab design Aug 28, 2022
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 creating great tabs 📑
And first compose contributor 👏

sobaya-0141 and others added 2 commits August 28, 2022 23:15
…Modifier.kt

Co-authored-by: Takahiro Menju <takam.dev@gmail.com>
@sobaya-0141
Copy link
Contributor Author

Thank you for approve.
I made one change with the addition of the receiver, so please double-check just to be sure:pray:

) {
days.forEachIndexed { index, day ->
val isSelected = selectedTab == index
Tab(
Copy link
Member

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. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Response completed.
f4aa0ff

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 your cooperation 🙏

}
}
}
}

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
}
}

@@ -1,25 +1,37 @@
package io.github.droidkaigi.confsched2022.feature.sessions

import androidx.compose.foundation.background

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
import androidx.compose.foundation.background

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
import androidx.compose.foundation.layout.Box

Comment on lines 9 to 11
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
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

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
import androidx.compose.foundation.shape.RoundedCornerShape

Comment on lines 18 to 19
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Tab

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
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

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
import androidx.compose.ui.Alignment

Comment on lines 29 to 31
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign

Comment on lines 33 to 34
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
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

Choose a reason for hiding this comment

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

[spotless] reported by reviewdog 🐶

Suggested change
import io.github.droidkaigi.confsched2022.ui.ifTrue

@takahirom takahirom merged commit bb6d464 into main Aug 28, 2022
@takahirom takahirom deleted the apply_sessions_tab_design branch August 28, 2022 14:54
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.

2 participants