-
Notifications
You must be signed in to change notification settings - Fork 1
feat: 컬렉션 작품 검색 화면 기본 UI 및 내비게이션 구현 #945
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
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5c4c650
feat: 컬렉션 생성 내 작품 검색 화면 추가 및 내비게이션 연결
devfeijoa 66f75e1
feat: 컬렉션 작품 검색 화면 내 검색 필드 추가 및 UI 수정
devfeijoa 7618ed9
feat: 컬렉션 작품 검색 필드 입력 기능 및 자동 포커스 구현
devfeijoa 5ca78ec
refactor: consolidate collection app bars
devfeijoa 0596a7f
refactor: feat/935 변경 사항을 feat/936에 동기화
devfeijoa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
...llection/src/main/java/com/into/websoso/feature/collection/CollectionNovelSearchScreen.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| package com.into.websoso.feature.collection | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.statusBarsPadding | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.LaunchedEffect | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.runtime.mutableStateOf | ||
| import androidx.compose.runtime.remember | ||
| import androidx.compose.runtime.saveable.rememberSaveable | ||
| import androidx.compose.runtime.setValue | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.focus.FocusRequester | ||
| import androidx.compose.ui.platform.LocalSoftwareKeyboardController | ||
| import androidx.compose.ui.text.input.TextFieldValue | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.into.websoso.core.designsystem.theme.WebsosoTheme | ||
| import com.into.websoso.core.designsystem.theme.White | ||
| import com.into.websoso.feature.collection.component.CollectionAppBar | ||
| import com.into.websoso.feature.collection.component.CollectionNovelSearchField | ||
|
|
||
| @Composable | ||
| internal fun CollectionNovelSearchScreen( | ||
| onNavigateBack: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| var searchQuery by rememberSaveable(stateSaver = TextFieldValue.Saver) { | ||
| mutableStateOf(TextFieldValue()) | ||
| } | ||
| val searchFocusRequester = remember { FocusRequester() } | ||
| val keyboardController = LocalSoftwareKeyboardController.current | ||
|
|
||
| LaunchedEffect(Unit) { | ||
| searchFocusRequester.requestFocus() | ||
| keyboardController?.show() | ||
| } | ||
|
|
||
| Column( | ||
| modifier = modifier | ||
| .fillMaxSize() | ||
| .background(White) | ||
| .statusBarsPadding(), | ||
| ) { | ||
| CollectionAppBar( | ||
| title = "작품 리스트", | ||
| actionLabel = "완료", | ||
| onNavigateBack = onNavigateBack, | ||
| isActionEnabled = false, | ||
| ) | ||
| CollectionNovelSearchField( | ||
| value = searchQuery, | ||
| onValueChange = { searchQuery = it }, | ||
| onClearClick = { searchQuery = TextFieldValue() }, | ||
| focusRequester = searchFocusRequester, | ||
| modifier = Modifier.padding( | ||
| start = 20.dp, | ||
| top = 10.dp, | ||
| end = 20.dp, | ||
| ), | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun CollectionNovelSearchScreenPreview() { | ||
| WebsosoTheme { | ||
| CollectionNovelSearchScreen(onNavigateBack = {}) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
...ion/src/main/java/com/into/websoso/feature/collection/component/CollectionCreateAppBar.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
null을 허용할 필요가있을까요?