Skip to content

구분선 공통 컴포넌트를 사용하여 코드 중복을 제거한다#65

Merged
komodgn merged 2 commits intodevelopfrom
refactor/#64
Jan 7, 2026
Merged

구분선 공통 컴포넌트를 사용하여 코드 중복을 제거한다#65
komodgn merged 2 commits intodevelopfrom
refactor/#64

Conversation

@komodgn
Copy link
Owner

@komodgn komodgn commented Jan 7, 2026

Summary by CodeRabbit

  • Refactor
    • Introduced a unified divider component used consistently across the application to improve visual coherence and maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

A new reusable MetaSearchDivider Compose component is introduced to standardize visual separators throughout the app, replacing eight manually-created dividers (Spacer with LightGrey background) across feature modules with this unified component.

Changes

Cohort / File(s) Summary
New Component
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt
Adds new public composable MetaSearchDivider(modifier) that renders a full-width Spacer with MetaSearchTheme.spacing.spacing05 height and LightGrey background. Includes preview.
Detail Feature
feature/detail/src/main/java/com/example/metasearch/feature/detail/graph/component/GraphDetailHeader.kt, feature/detail/src/main/java/com/example/metasearch/feature/detail/person/component/PersonDetailHeader.kt, feature/detail/src/main/java/com/example/metasearch/feature/detail/photo/component/PhotoDetailHeader.kt
Replaced Spacer-based dividers with MetaSearchDivider(). Removed LightGrey imports; added MetaSearchDivider import.
Graph Feature
feature/graph/src/main/java/com/example/metasearch/feature/graph/component/GraphHeader.kt
Replaced Spacer-based divider with MetaSearchDivider(). Updated imports.
Home Feature
feature/home/src/main/java/com/example/metasearch/feature/home/component/HomeHeader.kt
Replaced Spacer-based divider with MetaSearchDivider(). Updated imports.
Person Feature
feature/person/src/main/java/com/example/metasearch/feature/person/component/PersonHeader.kt
Replaced Spacer-based divider with MetaSearchDivider(). Updated imports.
Search Feature
feature/search/src/main/java/com/example/metasearch/feature/search/focusing/component/FocusingSearchHeader.kt, feature/search/src/main/java/com/example/metasearch/feature/search/nls/component/NLSearchHeader.kt
Replaced Spacer-based dividers with MetaSearchDivider(). Updated imports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 A divider composed with care,
Now shared and reused everywhere!
No more Spacers scattered about,
One component to rule throughout. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: creating a shared divider component (MetaSearchDivider) to eliminate duplicate divider code across multiple header components throughout the codebase.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6afe5a and 25a8bf3.

📒 Files selected for processing (9)
  • core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt
  • feature/detail/src/main/java/com/example/metasearch/feature/detail/graph/component/GraphDetailHeader.kt
  • feature/detail/src/main/java/com/example/metasearch/feature/detail/person/component/PersonDetailHeader.kt
  • feature/detail/src/main/java/com/example/metasearch/feature/detail/photo/component/PhotoDetailHeader.kt
  • feature/graph/src/main/java/com/example/metasearch/feature/graph/component/GraphHeader.kt
  • feature/home/src/main/java/com/example/metasearch/feature/home/component/HomeHeader.kt
  • feature/person/src/main/java/com/example/metasearch/feature/person/component/PersonHeader.kt
  • feature/search/src/main/java/com/example/metasearch/feature/search/focusing/component/FocusingSearchHeader.kt
  • feature/search/src/main/java/com/example/metasearch/feature/search/nls/component/NLSearchHeader.kt
🧰 Additional context used
🧬 Code graph analysis (9)
feature/detail/src/main/java/com/example/metasearch/feature/detail/graph/component/GraphDetailHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
feature/home/src/main/java/com/example/metasearch/feature/home/component/HomeHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
feature/person/src/main/java/com/example/metasearch/feature/person/component/PersonHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
feature/search/src/main/java/com/example/metasearch/feature/search/focusing/component/FocusingSearchHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
feature/detail/src/main/java/com/example/metasearch/feature/detail/person/component/PersonDetailHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
feature/detail/src/main/java/com/example/metasearch/feature/detail/photo/component/PhotoDetailHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
feature/search/src/main/java/com/example/metasearch/feature/search/nls/component/NLSearchHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
core/designsystem/src/main/java/com/example/metasearch/core/designsystem/theme/Theme.kt (1)
  • MetaSearchTheme (14-19)
feature/graph/src/main/java/com/example/metasearch/feature/graph/component/GraphHeader.kt (1)
core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (1)
  • MetaSearchDivider (13-22)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci-build
🔇 Additional comments (11)
feature/graph/src/main/java/com/example/metasearch/feature/graph/component/GraphHeader.kt (1)

15-15: LGTM! Successfully eliminates code duplication.

The refactoring correctly replaces the inline Spacer-based divider with the centralized MetaSearchDivider component, improving maintainability and consistency across the codebase.

Also applies to: 34-34

feature/search/src/main/java/com/example/metasearch/feature/search/focusing/component/FocusingSearchHeader.kt (1)

21-21: LGTM! Refactoring applied consistently.

The replacement of the inline divider with MetaSearchDivider maintains the same visual appearance while reducing code duplication.

Also applies to: 55-55

feature/detail/src/main/java/com/example/metasearch/feature/detail/photo/component/PhotoDetailHeader.kt (1)

21-21: LGTM! Consistent refactoring.

The divider replacement is correctly implemented and aligns with the broader refactoring effort across all header components.

Also applies to: 55-55

feature/detail/src/main/java/com/example/metasearch/feature/detail/person/component/PersonDetailHeader.kt (1)

20-20: LGTM! Clean refactoring.

The divider replacement maintains the existing layout while centralizing the styling logic in the reusable component.

Also applies to: 61-61

feature/person/src/main/java/com/example/metasearch/feature/person/component/PersonHeader.kt (1)

15-15: LGTM! Refactoring successfully applied and verified as complete.

The refactoring correctly eliminates code duplication by using the centralized MetaSearchDivider component. Verification confirms all header components (PersonHeader, HomeHeader, FocusingSearchHeader, PhotoDetailHeader, and GraphDetailHeader) consistently use this component instead of the inline Spacer-based divider pattern.

feature/search/src/main/java/com/example/metasearch/feature/search/nls/component/NLSearchHeader.kt (1)

15-15: Excellent refactoring to eliminate code duplication.

The import and usage of MetaSearchDivider correctly replaces the inline Spacer pattern with the new shared component, maintaining the same visual appearance while improving maintainability.

Also applies to: 34-34

feature/detail/src/main/java/com/example/metasearch/feature/detail/graph/component/GraphDetailHeader.kt (1)

21-21: LGTM! Consistent refactoring pattern.

The divider replacement follows the same clean pattern as other header components in this PR.

Also applies to: 55-55

core/ui/src/main/java/com/example/metasearch/core/ui/component/MetaSearchDivider.kt (3)

13-22: Well-designed reusable component.

The implementation correctly encapsulates the common divider pattern with a modifier parameter that allows for customization (e.g., padding, test tags) while maintaining consistent height and appearance across the app.


24-30: Good preview implementation.

The preview function follows best practices: private visibility, proper theme wrapping, and appropriate annotation for visual testing.


13-22: Divider replacement is complete.

All instances of the old Spacer-based divider pattern have been successfully replaced with MetaSearchDivider. The component is now consistently used across 8 files (NLSearchHeader, FocusingSearchHeader, HomeHeader, GraphHeader, PhotoDetailHeader, PersonDetailHeader, GraphDetailHeader, and PersonHeader), with no remaining instances of the old pattern in the codebase.

feature/home/src/main/java/com/example/metasearch/feature/home/component/HomeHeader.kt (1)

22-22: LGTM! Consistent application of the refactoring.

The divider replacement maintains consistency with the other header components in this PR.

Also applies to: 60-60


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.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖 Android CI Summary

Step Results:

  • Unit Test: ✅ Success (2m 34s)
  • Debug Build: ✅ Success (1m 7s)
  • Code Style Check: ✅ Success (3m 36s)

Total Time: 7m 17s

🎉 All steps completed successfully!

@komodgn komodgn merged commit 35aafc7 into develop Jan 7, 2026
2 checks passed
@komodgn komodgn deleted the refactor/#64 branch January 7, 2026 09:16
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.

1 participant