Skip to content

design: fix bottom modal element border#47

Merged
gdaegeun539 merged 3 commits into
developfrom
fix/bottom-modal-border
May 14, 2026
Merged

design: fix bottom modal element border#47
gdaegeun539 merged 3 commits into
developfrom
fix/bottom-modal-border

Conversation

@hyunjung-choi
Copy link
Copy Markdown
Collaborator

@hyunjung-choi hyunjung-choi commented May 13, 2026

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines

What kind of change does this PR introduce?

  • Bug fix

What is the current behavior?

The profile character selection items in ProfileCharacterBottomSheet
use a fixed size (84.dp), which causes layout issues on narrow screens.
Items appear too small inside their circle bounds and don't distribute
evenly across different device widths.

Also, @Preview does not render because ModalBottomSheet is not
supported in the Compose Preview environment.

What is the new behavior (if this is a feature change)?

  • Replaced fixed .size(84.dp) with .aspectRatio(1f) so items
    properly use the width given by weight(1f) and stay square
    on any screen size.
  • Simplified the nested Box structure into a single Box with border
    and padding.
  • Extracted bottom sheet content into ProfileCharacterBottomSheetContent
    so previews render correctly without ModalBottomSheet.
  • Added a narrow screen preview (320dp) to verify the layout.

Does this PR introduce a breaking change?

No.

ScreenShots (If needed)

Summary by CodeRabbit

  • Refactor
    • Reorganized profile character bottom sheet internal UI structure and layout components
    • Updated profile selection item sizing with new responsive layout approach
    • Refactored selection item interaction state handling and behavior
  • Style
    • Updated profile selection item visual appearance with circular layout design
    • Enhanced visual feedback for press-state interactions on profile selection items

Review Change Stack

@hyunjung-choi hyunjung-choi requested a review from gdaegeun539 May 13, 2026 15:56
@hyunjung-choi hyunjung-choi self-assigned this May 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

This PR refactors the profile character bottom sheet component by extracting its UI into a new composable, redesigning the profile selection item with press-state interaction feedback and circular layout, and updating previews to match the new structure.

Changes

ProfileCharacterBottomSheet UI Refactor

Layer / File(s) Summary
ProfileSelectItemLayered circular layout and press-state
app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt
Imports updated for interaction and layout utilities. ProfileSelectItemLayered refactored from nested fixed-size boxes to a circular box using aspectRatio(1f), adds MutableInteractionSource with collectIsPressedAsState() to apply conditional background on press, and configures clickable with indication = null. Parameter KDoc adjusted.
ProfileCharacterBottomSheetContent composable extraction
app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt
New private composable encapsulates the bottom-sheet column layout, accepting onDismiss callback, onSelectProfile callback, nullable selectedProfile state, and optional modifier.
Preview updates for new composable
app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt
All six previews updated to render ProfileCharacterBottomSheetContent directly. Selection state changed to nullable ProfileCharacter?, with "No Selection" preview setting state to null and others to specific profiles.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Suggested reviewers

  • gdaegeun539

Poem

🐰 A bottom sheet now circles round,
With press states glowing, safe and sound,
Composables extracted clean,
The finest UI we've ever seen!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The PR title mentions fixing 'bottom modal element border', but the actual changes focus on fixing layout issues (removing fixed sizes, using aspectRatio) and making the bottom sheet previewable by extracting content into a new composable. Revise the title to accurately reflect the main changes, such as: 'design: fix ProfileCharacterBottomSheet layout and make preview-compatible' or 'design: refactor profile character selection layout and improve bottom sheet preview support'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bottom-modal-border

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hyunjung-choi hyunjung-choi linked an issue May 13, 2026 that may be closed by this pull request
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt (1)

68-111: ⚡ Quick win

Use the extracted content composable inside ProfileCharacterBottomSheet to avoid divergence.

The same layout/state block now exists in two places. Wire ModalBottomSheet to render ProfileCharacterBottomSheetContent(...) so future UI/state edits stay single-source.

♻️ Proposed refactor
 `@OptIn`(ExperimentalMaterial3Api::class)
 `@Composable`
 fun ProfileCharacterBottomSheet(
     onDismiss: () -> Unit,
     onSelectProfile: (ProfileCharacter) -> Unit,
     modifier: Modifier = Modifier,
     selectedProfile: ProfileCharacter? = null
 ) {
     val colors = LocalFeelinColors.current
-    val isDarkMode = LocalDarkTheme.current
-    var internalSelectedProfile by remember { mutableStateOf(selectedProfile) }

     ModalBottomSheet(
         onDismissRequest = onDismiss,
         containerColor = colors.modal,
         shape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp),
         dragHandle = null,
         modifier = modifier
     ) {
-        Column(
-            modifier = Modifier
-                .fillMaxWidth()
-                .padding(top = 24.dp),
-            horizontalAlignment = Alignment.CenterHorizontally
-        ) {
-            Column(
-                modifier = Modifier
-                    .fillMaxWidth()
-                    .padding(horizontal = 20.dp),
-                verticalArrangement = Arrangement.spacedBy(24.dp)
-            ) {
-                ProfileBottomSheetHeader(
-                    onDismiss = onDismiss,
-                    titleColor = colors.gray09,
-                    iconColor = colors.gray09
-                )
-
-                ProfileCharacterList(
-                    selectedProfile = internalSelectedProfile,
-                    onProfileClick = { profile -> internalSelectedProfile = profile },
-                    isDarkMode = isDarkMode
-                )
-            }
-
-            Spacer(modifier = Modifier.height(32.dp))
-
-            ProfileSelectButton(
-                onClick = { internalSelectedProfile?.let { onSelectProfile(it) } },
-                enabled = internalSelectedProfile != null,
-                backgroundColor = colors.systemActivate,
-                textColor = LightGray00
-            )
-
-            Spacer(modifier = Modifier.height(23.dp))
-        }
+        ProfileCharacterBottomSheetContent(
+            onDismiss = onDismiss,
+            onSelectProfile = onSelectProfile,
+            selectedProfile = selectedProfile
+        )
     }
 }

Also applies to: 114-161

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt`
around lines 68 - 111, The ModalBottomSheet block in ProfileCharacterBottomSheet
duplicates the UI/state that should live in ProfileCharacterBottomSheetContent;
replace the inline Column/children (ProfileBottomSheetHeader,
ProfileCharacterList, ProfileSelectButton and related Spacers) with a single
call to ProfileCharacterBottomSheetContent(...) and forward the necessary
props/state (onDismiss, internalSelectedProfile and its onProfileClick updater,
onSelectProfile, isDarkMode, colors and modifier) so internalSelectedProfile is
still mutated locally and the enabled/selected behavior is preserved; ensure you
remove the duplicated layout and import/use ProfileCharacterBottomSheetContent
from its existing declaration so future UI changes remain single-source.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt`:
- Around line 68-111: The ModalBottomSheet block in ProfileCharacterBottomSheet
duplicates the UI/state that should live in ProfileCharacterBottomSheetContent;
replace the inline Column/children (ProfileBottomSheetHeader,
ProfileCharacterList, ProfileSelectButton and related Spacers) with a single
call to ProfileCharacterBottomSheetContent(...) and forward the necessary
props/state (onDismiss, internalSelectedProfile and its onProfileClick updater,
onSelectProfile, isDarkMode, colors and modifier) so internalSelectedProfile is
still mutated locally and the enabled/selected behavior is preserved; ensure you
remove the duplicated layout and import/use ProfileCharacterBottomSheetContent
from its existing declaration so future UI changes remain single-source.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a0195099-0df0-4ea4-8c0b-00afee0daa27

📥 Commits

Reviewing files that changed from the base of the PR and between 3f96abc and 402c5c5.

📒 Files selected for processing (1)
  • app/src/main/java/com/lyrics/feelin/core/designsystem/component/FeelinProfileCharacterBottomSheet.kt

@gdaegeun539 gdaegeun539 added design 디자인 관련 수정 bug 버그 수정 labels May 14, 2026
@gdaegeun539
Copy link
Copy Markdown
Member

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gdaegeun539
Copy link
Copy Markdown
Member

퇴근하고 코드 확인해보고, 문제 없으면 바로 병합할게요

@gdaegeun539 gdaegeun539 changed the title Fix/bottom modal border design: fix bottom modal element border May 14, 2026
Copy link
Copy Markdown
Member

@gdaegeun539 gdaegeun539 left a comment

Choose a reason for hiding this comment

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

LGTM! 수정 감사합니다

@gdaegeun539 gdaegeun539 merged commit 671da0c into develop May 14, 2026
3 checks passed
@hyunjung-choi hyunjung-choi deleted the fix/bottom-modal-border branch May 16, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 버그 수정 design 디자인 관련 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: profile bottom modal border is not matched

2 participants