Skip to content

Commit

Permalink
fixes #378 (#385)
Browse files Browse the repository at this point in the history
* 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 애니메이션 제약 조건 문서화
  • Loading branch information
jisungbin authored Nov 25, 2022
1 parent 7eb932c commit dd44dca
Show file tree
Hide file tree
Showing 34 changed files with 778 additions and 386 deletions.
72 changes: 19 additions & 53 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@

## Our Pledge

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

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
healthy community.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

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

Examples of unacceptable behavior include:

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

## Enforcement Responsibilities

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

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

## Scope

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

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated
promptly and fairly.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any
incident.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for
any action they deem in violation of this Code of Conduct:
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
unwelcome in the community.
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

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

### 2. Warning

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

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

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate
behavior.
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

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

### 4. Permanent Ban

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

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

## Attribution

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

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

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

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.
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.
9 changes: 3 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## How to contribute

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

## Preparing a pull request for review

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

## Code reviews

All submissions, including submissions by project members, require review. We use GitHub pull
requests for this purpose.
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.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose.
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.
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

## Overview (Required)

-
-

## Screenshot

Before | After
:--: | :--:
<img src="" width="300" /> | <img src="" width="300" />
| Before | After |
| :--: | :--: |
| <img src="" width="300" /> | <img src="" width="300" /> |
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ keystore
/documents/dokka/
/report
/ui-components-snapshots/out/
snapshots
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ buildscript {
allprojects {
repositories {
google()
mavenLocal()
mavenCentral()
}

Expand Down
5 changes: 5 additions & 0 deletions playground/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Playground TODO

- [ ] QuackColor playground
- [ ] QuackIcon playground
- [ ] IME animation playground (QuackLargeButton)
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import team.duckie.quackquack.ui.component.QuackSmallButtonType
import team.duckie.quackquack.ui.component.QuackToggleChip
import team.duckie.quackquack.ui.icon.QuackIcon

// TODO: IME 애니메이션 플레이그라운드 -> common 로직 변경하는 대공사 필요

class ButtonPlayground : PlaygroundActivity(
name = "Button",
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

package team.duckie.quackquack.playground.realworld

import androidx.compose.foundation.shape.CircleShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand All @@ -23,14 +24,16 @@ import team.duckie.quackquack.playground.base.PlaygroundActivity
import team.duckie.quackquack.playground.util.rememberToast
import team.duckie.quackquack.ui.component.QuackImage
import team.duckie.quackquack.ui.component.QuackSelectableImage
import team.duckie.quackquack.ui.component.QuackSelectableImageType
import team.duckie.quackquack.ui.util.DpSize

class ImagePlayground : PlaygroundActivity(
name = "Image",
) {
override val items: ImmutableList<Pair<String, @Composable () -> Unit>> = persistentListOf(
::QuackImageDemo.name to { QuackImageDemo() },
::QuackSelectableImageDemo.name to { QuackSelectableImageDemo() },
::QuackSelectableImageTypeTopEndCheckboxDemo.name to { QuackSelectableImageTypeTopEndCheckboxDemo() },
::QuackSelectableImageTypeCheckOverlayDemo.name to { QuackSelectableImageTypeCheckOverlayDemo() },
)
}

Expand All @@ -57,11 +60,12 @@ fun QuackImageDemo() {
),
rippleEnabled = false,
onClick = { toast("QuackImage clicked") },
onLongClick = { toast("QuackImage long clicked") },
)
}

@Composable
fun QuackSelectableImageDemo() {
fun QuackSelectableImageTypeTopEndCheckboxDemo() {
val context = LocalContext.current
var selected by remember { mutableStateOf(false) }

Expand All @@ -79,3 +83,25 @@ fun QuackSelectableImageDemo() {
onClick = { selected = !selected },
)
}

@Composable
fun QuackSelectableImageTypeCheckOverlayDemo() {
val context = LocalContext.current
var selected by remember { mutableStateOf(false) }

QuackSelectableImage(
src = remember {
ContextCompat.getDrawable(
context, R.drawable.ic_quack,
)
},
size = DpSize(
all = 250.dp,
),
shape = CircleShape,
isSelected = selected,
selectableType = QuackSelectableImageType.CheckOverlay,
rippleEnabled = false,
onClick = { selected = !selected },
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ fun QuackRoundTagDemo() {
onClick = { selected = !selected },
)
}

// TODO: QuackLazyVerticalGridTag 플레이그라운드
// QuackLazyVerticalGridTag 가 정말 꽥꽥에서 제공이 필요할까?
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
package team.duckie.quackquack.playground.realworld

import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import kotlinx.collections.immutable.ImmutableList
Expand All @@ -16,8 +18,8 @@ import team.duckie.quackquack.playground.base.PlaygroundActivity
import team.duckie.quackquack.playground.util.rememberToast
import team.duckie.quackquack.ui.component.QuackBasic2TextField
import team.duckie.quackquack.ui.component.QuackBasicTextField
import team.duckie.quackquack.ui.component.QuackErrorableTextField
import team.duckie.quackquack.ui.component.QuackPriceTextField
import team.duckie.quackquack.ui.component.QuackProfileTextField
import team.duckie.quackquack.ui.icon.QuackIcon

class TextFieldPlayground : PlaygroundActivity(
Expand All @@ -27,7 +29,8 @@ class TextFieldPlayground : PlaygroundActivity(
::QuackBasicTextFieldDemo.name to { QuackBasicTextFieldDemo() },
::QuackPriceTextFieldDemo.name to { QuackPriceTextFieldDemo() },
::QuackBasic2TextFieldDemo.name to { QuackBasic2TextFieldDemo() },
::QuackProfileTextFieldDemo.name to { QuackProfileTextFieldDemo() },
::QuackErrorableTextFieldDemo.name to { QuackErrorableTextFieldDemo() },
::QuackErrorableTextFieldWithoutClearButtonDemo.name to { QuackErrorableTextFieldWithoutClearButtonDemo() },
)
}

Expand Down Expand Up @@ -74,15 +77,41 @@ fun QuackBasic2TextFieldDemo() {
}

@Composable
fun QuackProfileTextFieldDemo() {
fun QuackErrorableTextFieldDemo() {
val (text, setText) = remember { mutableStateOf("") }
val isError by remember {
derivedStateOf {
text.length > 5
}
}

QuackProfileTextField(
QuackErrorableTextField(
text = text,
onTextChanged = setText,
placeholderText = "MaxLength: 5",
maxLength = 5,
isError = isError,
errorText = "ErrorText",
showClearButton = true,
onCleared = { setText("") },
)
}

@Composable
fun QuackErrorableTextFieldWithoutClearButtonDemo() {
val (text, setText) = remember { mutableStateOf("") }
val isError by remember {
derivedStateOf {
text.length > 5
}
}

QuackErrorableTextField(
text = text,
onTextChanged = setText,
placeholderText = "MaxLength: 5",
maxLength = 5,
isError = isError,
errorText = "ErrorText",
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class TopAppBarPlayground : PlaygroundActivity(
override val items: ImmutableList<Pair<String, @Composable () -> Unit>> = persistentListOf(
::QuackTopAppBarTypeLogoAndIconsDemo.name to { QuackTopAppBarTypeLogoAndIconsDemo() },
::QuackTopAppBarTypeTextDemo.name to { QuackTopAppBarTypeTextDemo() },
::QuackTopAppBarOnlyLeadingContentsDemo.name to { QuackTopAppBarOnlyLeadingContentsDemo() },
)
}

Expand Down Expand Up @@ -50,8 +51,20 @@ fun QuackTopAppBarTypeTextDemo() {
leadingText = "Heart",
onLeadingIconClick = { toast("Heart clicked") },
centerText = "DUCKIE!",
centerTextTrailingIcon = QuackIcon.ArrowDown,
onCenterClick = { toast("Logo clicked") },
trailingText = "trailing",
onTrailingTextClick = { toast("trailing clicked") },
)
}

@Composable
fun QuackTopAppBarOnlyLeadingContentsDemo() {
val toast = rememberToast()

QuackTopAppBar(
leadingIcon = QuackIcon.Heart,
leadingText = "Heart",
onLeadingIconClick = { toast("Heart clicked") },
)
}
Loading

0 comments on commit dd44dca

Please sign in to comment.