Skip to content

Commit dd44dca

Browse files
authored
fixes #378 (#385)
* feat: snapshots 폴더 gitignore 복원 * feat: QuackAnimatedVisibility 추가 * chore: bump snapshot * docs: 문서 개선 * refactor: removoe Modifier.wrapContentSize usage * refactor: QuackText public 변경 * feat: QuackColor.Dimmed 추가 * refactor: QuackTextStyle 생성자 public 으로 변경 * refactor: QuackButton 에서 enabled 가 false 일 때 클릭 리플 제거 * refactor: CounterContent 에 애니메이션 제거 * refactor: CounterContent 에 애니메이션 전체 제거 * feat: QuackUnderlineBody3 에 underlineColor 인자 추가 * feat: Modifier.quackClickable 에 onLongClickable 추가 * feat: QuackImage 에 onLongClick 지원 추가 * feat: typography text 에 padding 지원 추가 * feat: ProfileTextField 구현 개선 * feat: QuackTopAppBar 자유도 개선 * feat: QuackProfileTextField 에 showClearButton 인자 추가 * feat: QuackProfileTextField 를 QuackErrorableTextField 으로 변경 - isError 인자 추가 * feat: QuackErrorableTextField 플레이그라운드 에러 해결 * feat: QuackLazyVerticalGridTag 에 itemChunkedSize, key 인자 추가 * feat: QuackLazyVerticalGridTag 에 애니메이션 지원 추가 * feat: QuackLazyVerticalGridTag 에 애니메이션 지원 보충 * fix * fix largebutton ime animation issue * feat: QuackLazyVerticalGridTag 에 아이템 사이 간격 인자 추가 * feat: 누락된 체크 아이콘 추가 * feat: QuackSelectableImage 에 selection 방식 인자 추가 * feat: SplashSlogan 타이포그래피 추가 * refactor: QuackLazyVerticalGridTag 코드 정리 * chore: bump ui-components * feat: 플레이그라운드 최신화 * docs: 플레이그라운드 TODO 추가 * feat: QuackErrorableTextField onCleared 인자 문제 수정 * feat: quackClickable 인자 순서 문제 해결 * docs: QuackLargeButton 의 IME 애니메이션 제약 조건 문서화
1 parent 7eb932c commit dd44dca

34 files changed

+778
-386
lines changed

.github/CODE_OF_CONDUCT.md

+19-53
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
## Our Pledge
44

5-
We as members, contributors, and leaders pledge to make participation in our community a
6-
harassment-free experience for everyone, regardless of age, body size, visible or invisible
7-
disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
8-
education, socio-economic status, nationality, personal appearance, race, religion, or sexual
9-
identity and orientation.
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
106

11-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
12-
healthy community.
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
138

149
## Our Standards
1510

@@ -18,96 +13,67 @@ Examples of behavior that contributes to a positive environment for our communit
1813
* Demonstrating empathy and kindness toward other people
1914
* Being respectful of differing opinions, viewpoints, and experiences
2015
* Giving and gracefully accepting constructive feedback
21-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
22-
experience
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
2317
* Focusing on what is best not just for us as individuals, but for the overall community
2418

2519
Examples of unacceptable behavior include:
2620

2721
* The use of sexualized language or imagery, and sexual attention or advances of any kind
2822
* Trolling, insulting or derogatory comments, and personal or political attacks
2923
* Public or private harassment
30-
* Publishing others' private information, such as a physical or email address, without their
31-
explicit permission
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
3225
* Other conduct which could reasonably be considered inappropriate in a professional setting
3326

3427
## Enforcement Responsibilities
3528

36-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
37-
and will take appropriate and fair corrective action in response to any behavior that they deem
38-
inappropriate, threatening, offensive, or harmful.
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
3930

40-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
41-
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
42-
will communicate reasons for moderation decisions when appropriate.
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
4332

4433
## Scope
4534

46-
This Code of Conduct applies within all community spaces, and also applies when an individual is
47-
officially representing the community in public spaces. Examples of representing our community
48-
include using an official e-mail address, posting via an official social media account, or acting as
49-
an appointed representative at an online or offline event.
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
5036

5137
## Enforcement
5238

53-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
54-
leaders responsible for enforcement at ji@sungb.in. All complaints will be reviewed and investigated
55-
promptly and fairly.
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ji@sungb.in. All complaints will be reviewed and investigated promptly and fairly.
5640

57-
All community leaders are obligated to respect the privacy and security of the reporter of any
58-
incident.
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
5942

6043
## Enforcement Guidelines
6144

62-
Community leaders will follow these Community Impact Guidelines in determining the consequences for
63-
any action they deem in violation of this Code of Conduct:
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
6446

6547
### 1. Correction
6648

67-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
68-
unwelcome in the community.
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
6950

70-
**Consequence**: A private, written warning from community leaders, providing clarity around the
71-
nature of the violation and an explanation of why the behavior was inappropriate. A public apology
72-
may be requested.
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
7352

7453
### 2. Warning
7554

7655
**Community Impact**: A violation through a single incident or series of actions.
7756

78-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people
79-
involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
80-
specified period of time. This includes avoiding interactions in community spaces as well as
81-
external channels like social media. Violating these terms may lead to a temporary or permanent ban.
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
8258

8359
### 3. Temporary Ban
8460

85-
**Community Impact**: A serious violation of community standards, including sustained inappropriate
86-
behavior.
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
8762

88-
**Consequence**: A temporary ban from any sort of interaction or public communication with the
89-
community for a specified period of time. No public or private interaction with the people involved,
90-
including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
91-
period. Violating these terms may lead to a permanent ban.
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
9264

9365
### 4. Permanent Ban
9466

95-
**Community Impact**: Demonstrating a pattern of violation of community standards, including
96-
sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement
97-
of classes of individuals.
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
9868

9969
**Consequence**: A permanent ban from any sort of public interaction within the community.
10070

10171
## Attribution
10272

103-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at
104-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
73+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
10574

106-
Community Impact Guidelines were inspired
107-
by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
10876

10977
[homepage]: https://www.contributor-covenant.org
11078

111-
For answers to common questions about this code of conduct, see the FAQ at
112-
https://www.contributor-covenant.org/faq. Translations are available at
113-
https://www.contributor-covenant.org/translations.
79+
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

.github/CONTRIBUTING.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## How to contribute
22

3-
We'd love to accept your patches and contributions to this project. There are just a few small
4-
guidelines you need to follow.
3+
We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
54

65
## Preparing a pull request for review
76

@@ -26,7 +25,5 @@ Finally, you need to make sure the project builds successfully:
2625

2726
## Code reviews
2827

29-
All submissions, including submissions by project members, require review. We use GitHub pull
30-
requests for this purpose.
31-
Consult [GitHub Help](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)
32-
for more information on using pull requests.
28+
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose.
29+
Consult [GitHub Help](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) for more information on using pull requests.

.github/PULL_REQUEST_TEMPLATE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
## Overview (Required)
66

7-
-
7+
-
88

99
## Screenshot
1010

11-
Before | After
12-
:--: | :--:
13-
<img src="" width="300" /> | <img src="" width="300" />
11+
| Before | After |
12+
| :--: | :--: |
13+
| <img src="" width="300" /> | <img src="" width="300" /> |

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ keystore
1515
/documents/dokka/
1616
/report
1717
/ui-components-snapshots/out/
18+
snapshots

build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ buildscript {
7373
allprojects {
7474
repositories {
7575
google()
76+
mavenLocal()
7677
mavenCentral()
7778
}
7879

playground/TODO.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Playground TODO
2+
3+
- [ ] QuackColor playground
4+
- [ ] QuackIcon playground
5+
- [ ] IME animation playground (QuackLargeButton)

playground/src/main/kotlin/team/duckie/quackquack/playground/realworld/ButtonPlayground.kt

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import team.duckie.quackquack.ui.component.QuackSmallButtonType
2424
import team.duckie.quackquack.ui.component.QuackToggleChip
2525
import team.duckie.quackquack.ui.icon.QuackIcon
2626

27+
// TODO: IME 애니메이션 플레이그라운드 -> common 로직 변경하는 대공사 필요
28+
2729
class ButtonPlayground : PlaygroundActivity(
2830
name = "Button",
2931
) {

playground/src/main/kotlin/team/duckie/quackquack/playground/realworld/ImagePlayground.kt

+28-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
package team.duckie.quackquack.playground.realworld
99

10+
import androidx.compose.foundation.shape.CircleShape
1011
import androidx.compose.runtime.Composable
1112
import androidx.compose.runtime.getValue
1213
import androidx.compose.runtime.mutableStateOf
@@ -23,14 +24,16 @@ import team.duckie.quackquack.playground.base.PlaygroundActivity
2324
import team.duckie.quackquack.playground.util.rememberToast
2425
import team.duckie.quackquack.ui.component.QuackImage
2526
import team.duckie.quackquack.ui.component.QuackSelectableImage
27+
import team.duckie.quackquack.ui.component.QuackSelectableImageType
2628
import team.duckie.quackquack.ui.util.DpSize
2729

2830
class ImagePlayground : PlaygroundActivity(
2931
name = "Image",
3032
) {
3133
override val items: ImmutableList<Pair<String, @Composable () -> Unit>> = persistentListOf(
3234
::QuackImageDemo.name to { QuackImageDemo() },
33-
::QuackSelectableImageDemo.name to { QuackSelectableImageDemo() },
35+
::QuackSelectableImageTypeTopEndCheckboxDemo.name to { QuackSelectableImageTypeTopEndCheckboxDemo() },
36+
::QuackSelectableImageTypeCheckOverlayDemo.name to { QuackSelectableImageTypeCheckOverlayDemo() },
3437
)
3538
}
3639

@@ -57,11 +60,12 @@ fun QuackImageDemo() {
5760
),
5861
rippleEnabled = false,
5962
onClick = { toast("QuackImage clicked") },
63+
onLongClick = { toast("QuackImage long clicked") },
6064
)
6165
}
6266

6367
@Composable
64-
fun QuackSelectableImageDemo() {
68+
fun QuackSelectableImageTypeTopEndCheckboxDemo() {
6569
val context = LocalContext.current
6670
var selected by remember { mutableStateOf(false) }
6771

@@ -79,3 +83,25 @@ fun QuackSelectableImageDemo() {
7983
onClick = { selected = !selected },
8084
)
8185
}
86+
87+
@Composable
88+
fun QuackSelectableImageTypeCheckOverlayDemo() {
89+
val context = LocalContext.current
90+
var selected by remember { mutableStateOf(false) }
91+
92+
QuackSelectableImage(
93+
src = remember {
94+
ContextCompat.getDrawable(
95+
context, R.drawable.ic_quack,
96+
)
97+
},
98+
size = DpSize(
99+
all = 250.dp,
100+
),
101+
shape = CircleShape,
102+
isSelected = selected,
103+
selectableType = QuackSelectableImageType.CheckOverlay,
104+
rippleEnabled = false,
105+
onClick = { selected = !selected },
106+
)
107+
}

playground/src/main/kotlin/team/duckie/quackquack/playground/realworld/TagPlayground.kt

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ fun QuackRoundTagDemo() {
6464
onClick = { selected = !selected },
6565
)
6666
}
67+
68+
// TODO: QuackLazyVerticalGridTag 플레이그라운드
69+
// QuackLazyVerticalGridTag 가 정말 꽥꽥에서 제공이 필요할까?

playground/src/main/kotlin/team/duckie/quackquack/playground/realworld/TextFieldPlayground.kt

+33-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
package team.duckie.quackquack.playground.realworld
99

1010
import androidx.compose.runtime.Composable
11+
import androidx.compose.runtime.derivedStateOf
12+
import androidx.compose.runtime.getValue
1113
import androidx.compose.runtime.mutableStateOf
1214
import androidx.compose.runtime.remember
1315
import kotlinx.collections.immutable.ImmutableList
@@ -16,8 +18,8 @@ import team.duckie.quackquack.playground.base.PlaygroundActivity
1618
import team.duckie.quackquack.playground.util.rememberToast
1719
import team.duckie.quackquack.ui.component.QuackBasic2TextField
1820
import team.duckie.quackquack.ui.component.QuackBasicTextField
21+
import team.duckie.quackquack.ui.component.QuackErrorableTextField
1922
import team.duckie.quackquack.ui.component.QuackPriceTextField
20-
import team.duckie.quackquack.ui.component.QuackProfileTextField
2123
import team.duckie.quackquack.ui.icon.QuackIcon
2224

2325
class TextFieldPlayground : PlaygroundActivity(
@@ -27,7 +29,8 @@ class TextFieldPlayground : PlaygroundActivity(
2729
::QuackBasicTextFieldDemo.name to { QuackBasicTextFieldDemo() },
2830
::QuackPriceTextFieldDemo.name to { QuackPriceTextFieldDemo() },
2931
::QuackBasic2TextFieldDemo.name to { QuackBasic2TextFieldDemo() },
30-
::QuackProfileTextFieldDemo.name to { QuackProfileTextFieldDemo() },
32+
::QuackErrorableTextFieldDemo.name to { QuackErrorableTextFieldDemo() },
33+
::QuackErrorableTextFieldWithoutClearButtonDemo.name to { QuackErrorableTextFieldWithoutClearButtonDemo() },
3134
)
3235
}
3336

@@ -74,15 +77,41 @@ fun QuackBasic2TextFieldDemo() {
7477
}
7578

7679
@Composable
77-
fun QuackProfileTextFieldDemo() {
80+
fun QuackErrorableTextFieldDemo() {
7881
val (text, setText) = remember { mutableStateOf("") }
82+
val isError by remember {
83+
derivedStateOf {
84+
text.length > 5
85+
}
86+
}
7987

80-
QuackProfileTextField(
88+
QuackErrorableTextField(
8189
text = text,
8290
onTextChanged = setText,
8391
placeholderText = "MaxLength: 5",
8492
maxLength = 5,
93+
isError = isError,
8594
errorText = "ErrorText",
95+
showClearButton = true,
8696
onCleared = { setText("") },
8797
)
8898
}
99+
100+
@Composable
101+
fun QuackErrorableTextFieldWithoutClearButtonDemo() {
102+
val (text, setText) = remember { mutableStateOf("") }
103+
val isError by remember {
104+
derivedStateOf {
105+
text.length > 5
106+
}
107+
}
108+
109+
QuackErrorableTextField(
110+
text = text,
111+
onTextChanged = setText,
112+
placeholderText = "MaxLength: 5",
113+
maxLength = 5,
114+
isError = isError,
115+
errorText = "ErrorText",
116+
)
117+
}

playground/src/main/kotlin/team/duckie/quackquack/playground/realworld/TopAppBarPlayground.kt

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TopAppBarPlayground : PlaygroundActivity(
2121
override val items: ImmutableList<Pair<String, @Composable () -> Unit>> = persistentListOf(
2222
::QuackTopAppBarTypeLogoAndIconsDemo.name to { QuackTopAppBarTypeLogoAndIconsDemo() },
2323
::QuackTopAppBarTypeTextDemo.name to { QuackTopAppBarTypeTextDemo() },
24+
::QuackTopAppBarOnlyLeadingContentsDemo.name to { QuackTopAppBarOnlyLeadingContentsDemo() },
2425
)
2526
}
2627

@@ -50,8 +51,20 @@ fun QuackTopAppBarTypeTextDemo() {
5051
leadingText = "Heart",
5152
onLeadingIconClick = { toast("Heart clicked") },
5253
centerText = "DUCKIE!",
54+
centerTextTrailingIcon = QuackIcon.ArrowDown,
5355
onCenterClick = { toast("Logo clicked") },
5456
trailingText = "trailing",
5557
onTrailingTextClick = { toast("trailing clicked") },
5658
)
5759
}
60+
61+
@Composable
62+
fun QuackTopAppBarOnlyLeadingContentsDemo() {
63+
val toast = rememberToast()
64+
65+
QuackTopAppBar(
66+
leadingIcon = QuackIcon.Heart,
67+
leadingText = "Heart",
68+
onLeadingIconClick = { toast("Heart clicked") },
69+
)
70+
}

0 commit comments

Comments
 (0)