Skip to content
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

๐Ÿ”€ :: (#249) - ํ”„๋กœ๊ทธ๋žจ, ํ”„๋กœ๊ทธ๋žจ ์ฐธ๊ฐ€์ž ๊ด€๋ฆฌ ํŽ˜์ด์ง€์˜ UI ์š”์†Œ์ธ Box์™€ ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ์ด horizontalScroll์ด ๋  ์ˆ˜ ์žˆ๊ฒŒ ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค. #254

Merged

Conversation

audgns10
Copy link
Member

@audgns10 audgns10 commented Dec 16, 2024

๐Ÿ’ก ๊ฐœ์š”

  • ํ”„๋กœ๊ทธ๋žจ, ํ”„๋กœ๊ทธ๋žจ ์ฐธ๊ฐ€์ž ๊ด€๋ฆฌ ํŽ˜์ด์ง€์˜ UI ์š”์†Œ์ธ Box์™€ ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ์ด horizontalScroll์ด ๋  ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •์ด ํ•„์š”ํ•ด๋ณด์˜€์Šต๋‹ˆ๋‹ค.

๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ

  • ํ”„๋กœ๊ทธ๋žจ, ํ”„๋กœ๊ทธ๋žจ ์ฐธ๊ฐ€์ž ๊ด€๋ฆฌ ํŽ˜์ด์ง€์˜ UI ์š”์†Œ์ธ Box์™€ ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ์ด horizontalScroll์ด ๋  ์ˆ˜ ์žˆ๊ฒŒ ์ˆ˜์ •์„ ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

    • ScrollState๋ฅผ ๋ณ„๋„๋กœ ์ƒ์„ฑํ•˜์ง€ ์•Š๊ณ , ์ƒ์œ„ ์ปดํฌ์ €๋ธ”์—์„œ ํ•˜๋‚˜์˜ ScrollState๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ํ•˜์œ„ ์ปดํฌ์ €๋ธ”๋“ค์— ์ „๋‹ฌํ•˜๋„๋ก ๋ณ€๊ฒฝํ•˜์—ฌ ์ค‘์ฒฉ ์Šคํฌ๋กค ์—๋Ÿฌ๋ฅผ ์ผ์œผํ‚ค์ง€ ์•Š๊ณ  ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.
    2024-12-16.10.49.01.mov

๐Ÿ”€ ๋ณ€๊ฒฝ์‚ฌํ•ญ

  • chore HomeDetailProgramParticipantList
  • chore HomeDetailProgramParticipantListItem
  • chore ProgramList
  • chore ProgramListItem
  • chore StandardProgramListItem
  • chore HomeDetailStandardProgramParticipantListItem
  • chore HomeDetailProgramScreen
  • chore HomeDetail(Training and Standard)ProgramParticipantScreen

๐Ÿ™‹โ€โ™‚๏ธ ์งˆ๋ฌธ์‚ฌํ•ญ

  • ๊ฐœ์„ ํ•  ์ , ์˜คํƒ€, ์ฝ”๋“œ์— ์ด์ƒํ•œ ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด Comment ๋‹ฌ์•„์ฃผ์„ธ์š”.

๐Ÿด ์‚ฌ์šฉ๋ฐฉ๋ฒ•

  • x

๐ŸŽธ ๊ธฐํƒ€

  • x

Summary by CodeRabbit

  • ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ

    • HomeDetailProgramScreen, HomeDetailStandardProgramParticipantScreen, HomeDetailTrainingProgramParticipantScreen์—์„œ ์ˆ˜ํ‰ ์Šคํฌ๋กค ๊ธฐ๋Šฅ์ด ํ–ฅ์ƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
    • ํ”„๋กœ๊ทธ๋žจ ์ฐธ๊ฐ€์ž ๋ชฉ๋ก ๋ฐ ํ‘œ์ค€ ํ”„๋กœ๊ทธ๋žจ ๋ชฉ๋ก์— ๋Œ€ํ•œ ์ˆ˜ํ‰ ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ๊ฐ€ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
  • ๋ฒ„๊ทธ ์ˆ˜์ •

    • UI ์ƒํƒœ ๋ฐ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ๋กœ์ง์ด ์œ ์ง€๋˜์–ด ๋ฐ์ดํ„ฐ๊ฐ€ ์—†๊ฑฐ๋‚˜ ๋กœ๋“œ ์‹คํŒจ ์‹œ ์‚ฌ์šฉ์ž์—๊ฒŒ ํ”ผ๋“œ๋ฐฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • ๋ฌธ์„œํ™”

    • ํ•จ์ˆ˜ ์‹œ๊ทธ๋‹ˆ์ฒ˜๊ฐ€ ์—…๋ฐ์ดํŠธ๋˜์–ด ์ˆ˜ํ‰ ์Šคํฌ๋กค ์ƒํƒœ๋ฅผ ํ•„์ˆ˜ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ์š”๊ตฌํ•ฉ๋‹ˆ๋‹ค.

Copy link

coderabbitai bot commented Dec 16, 2024

Walkthrough

์ด ํ’€ ๋ฆฌํ€˜์ŠคํŠธ๋Š” ํ™ˆ ๋ชจ๋“ˆ์˜ ์—ฌ๋Ÿฌ ํ™”๋ฉด๊ณผ ์ปดํฌ๋„ŒํŠธ์—์„œ ์ˆ˜ํ‰ ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ๋ฅผ ๊ฐœ์„ ํ•˜๋Š” ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์š” ๋ณ€๊ฒฝ ์‚ฌํ•ญ์€ ScrollState๋ฅผ ๋ช…์‹œ์ ์œผ๋กœ ์ „๋‹ฌํ•˜๊ณ , ๋‹ค์–‘ํ•œ ํ”„๋กœ๊ทธ๋žจ ๋ฐ ์ฐธ๊ฐ€์ž ๋ชฉ๋ก ์ปดํฌ๋„ŒํŠธ์˜ ์Šคํฌ๋กค ๋™์ž‘์„ ์ผ๊ด€๋˜๊ฒŒ ๋งŒ๋“œ๋Š” ๊ฒƒ์— ์ค‘์ ์„ ๋‘๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ˆ˜์ •์€ ์‚ฌ์šฉ์ž ์ธํ„ฐํŽ˜์ด์Šค์˜ ์Šคํฌ๋กค ๊ฒฝํ—˜์„ ํ–ฅ์ƒ์‹œํ‚ค๊ณ , ์ปดํฌ๋„ŒํŠธ ๊ฐ„ ์Šคํฌ๋กค ์ƒํƒœ ๊ณต์œ ๋ฅผ ๊ฐ€๋Šฅํ•˜๊ฒŒ ํ•ฉ๋‹ˆ๋‹ค.

Changes

ํŒŒ์ผ ๊ฒฝ๋กœ ๋ณ€๊ฒฝ ์š”์•ฝ
.../HomeDetailProgramScreen.kt horizontalScrollState ํŒŒ๋ผ๋ฏธํ„ฐ ์ถ”๊ฐ€, ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ ๊ฐœ์„ 
.../HomeDetailStandardProgramParticipantScreen.kt scrollState ํŒŒ๋ผ๋ฏธํ„ฐ ๋„์ž…, ์ˆ˜ํ‰ ์Šคํฌ๋กค ์ œ์–ด
.../HomeDetailTrainingProgramParticipantScreen.kt scrollState ํŒŒ๋ผ๋ฏธํ„ฐ ์ถ”๊ฐ€, ์Šคํฌ๋กค ์ƒํƒœ ํ†ตํ•ฉ
.../component/HomeDetailProgramParticipantList.kt ์ˆ˜ํ‰ ์Šคํฌ๋กค ์ƒํƒœ ํŒŒ๋ผ๋ฏธํ„ฐ ๋„์ž…
.../component/ProgramList.kt horizontalScrollState ํŒŒ๋ผ๋ฏธํ„ฐ ์ถ”๊ฐ€, ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ
๊ธฐํƒ€ ๊ด€๋ จ ์ปดํฌ๋„ŒํŠธ ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ๋ฅผ ์œ„ํ•œ ์œ ์‚ฌํ•œ ๋ณ€๊ฒฝ

Possibly related issues

Possibly related PRs

Suggested labels

โœจ Feature

Suggested reviewers

  • diejdkll
  • Chaejongin12
  • kimjeakwan

Poem

๐Ÿฐ ์Šคํฌ๋กค์˜ ํ† ๋ผ, ๊ฒฝ๋กœ๋ฅผ ์ฐพ๋‹ค
์ƒํƒœ๋ฅผ ์ „๋‹ฌํ•˜๋ฉฐ ์ถค์„ ์ถ”๋„ค
์ปดํฌ๋„ŒํŠธ๋งˆ๋‹ค ํ๋ฅด๋Š” ๋ฆฌ๋“ฌ
๋ถ€๋“œ๋Ÿฌ์šด ์Šคํฌ๋กค, ์‚ฌ์šฉ์ž์˜ ๋ฏธ์†Œ
์ฝ”๋“œ์˜ ํ† ๋ผ, ์—ฌ์ •์„ ๋…ธ๋ž˜ํ•ด! ๐ŸŒˆ


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

โค๏ธ Share
๐Ÿชง Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

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

Actionable comments posted: 0

๐Ÿ”ญ Outside diff range comments (1)
feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailProgramParticipantListItem.kt (1)

Line range hint 22-85: ์ฝ”๋“œ ์ค‘๋ณต์„ ์ œ๊ฑฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

HomeDetailProgramParticipantListItem๊ณผ HomeDetailStandardProgramParticipantListItem์ด ๋งค์šฐ ์œ ์‚ฌํ•œ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ถ”์ถœํ•˜์—ฌ ์žฌ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฆฌํŒฉํ† ๋ง์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

@Composable
private fun ParticipantListItemContent(
    index: Int,
    name: String,
    organization: String,
    position: String,
    status: Boolean,
    entryTime: String?,
    leaveTime: String?,
    horizontalScrollState: ScrollState,
    modifier: Modifier = Modifier
) {
    // ๊ณตํ†ต UI ๋กœ์ง ๊ตฌํ˜„
}
๐Ÿงน Nitpick comments (9)
feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailProgramParticipantList.kt (1)

Line range hint 69-72: ํ”„๋ฆฌ๋ทฐ ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ•ด ์ฃผ์„ธ์š”.

๋นˆ ํ”„๋ฆฌ๋ทฐ ํ•จ์ˆ˜๋Š” ์ปดํฌ๋„ŒํŠธ ๊ฐœ๋ฐœ ๋ฐ ํ…Œ์ŠคํŠธ์— ๋„์›€์ด ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ”„๋ฆฌ๋ทฐ๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailStandardProgramParticipantListItem.kt (1)

Line range hint 28-85: UI ์œ ์—ฐ์„ฑ ๊ฐœ์„ ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

  1. ๊ณ ์ •๋œ ๋„ˆ๋น„ ๊ฐ’๋“ค์€ ๋‹ค์–‘ํ•œ ํ™”๋ฉด ํฌ๊ธฐ์—์„œ ๋ฌธ์ œ๋ฅผ ์ผ์œผํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ƒ๋Œ€์ ์ธ ํฌ๊ธฐ๋‚˜ ๋™์  ๊ณ„์‚ฐ์„ ๊ณ ๋ คํ•ด๋ณด์„ธ์š”.
  2. ์ƒํƒœ ํ…์ŠคํŠธ๋ฅผ ๋” ๋ช…ํ™•ํ•˜๊ฒŒ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ๊ฐœ์„ ์„ ์ œ์•ˆํ•ฉ๋‹ˆ๋‹ค:

- Text(
-     text = if (data.status) "์ถœ์„" else "๋ฏธ์ถœ์„",
-     style = typography.captionRegular2,
-     color = colors.black,
-     modifier = Modifier.width(120.dp)
- )
+ Text(
+     text = if (data.status) "์ถœ์„ ์™„๋ฃŒ" else "๋ฏธ์ถœ์„",
+     style = typography.captionRegular2,
+     color = if (data.status) colors.primary else colors.error,
+     modifier = Modifier.width(120.dp)
+ )

๋˜ํ•œ ๊ณ ์ • ๋„ˆ๋น„ ๋Œ€์‹  ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ ‘๊ทผ์„ ๊ณ ๋ คํ•ด๋ณด์„ธ์š”:

private val columnWeights = listOf(0.1f, 0.15f, 0.2f, 0.15f, 0.15f, 0.25f, 0.25f)
feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailProgramParticipantListItem.kt (1)

107-109: ๋‚ ์งœ ํ˜•์‹์„ ํ‘œ์ค€ํ™”ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

ํ”„๋ฆฌ๋ทฐ ๋ฐ์ดํ„ฐ์˜ ๋‚ ์งœ ํ˜•์‹(2024-09-12 T 08:30)์ด ์ผ๋ฐ˜์ ์ธ ISO 8601 ํ˜•์‹๊ณผ ๋‹ค๋ฆ…๋‹ˆ๋‹ค. ํ‘œ์ค€ ํ˜•์‹(2024-09-12T08:30:00)์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

feature/home/src/main/java/com/school_of_company/home/view/component/StandardProgramListItem.kt (1)

33-33: ์Šคํฌ๋กค ์ƒํƒœ ๋งค๊ฐœ๋ณ€์ˆ˜์— ๋Œ€ํ•œ ๋ฌธ์„œํ™” ์ถ”๊ฐ€ ํ•„์š”

๋ถ€๋ชจ ์ปดํฌ์ €๋ธ”์—์„œ ์ „๋‹ฌ๋˜๋Š” ์Šคํฌ๋กค ์ƒํƒœ๋ฅผ ๋ช…์‹œ์ ์œผ๋กœ ์š”๊ตฌํ•˜๋„๋ก ๋ณ€๊ฒฝ๋œ ๊ฒƒ์€ ์ข‹์€ ์ ‘๊ทผ์ž…๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ๋งค๊ฐœ๋ณ€์ˆ˜์˜ ์šฉ๋„์™€ ์ค‘์š”์„ฑ์„ ์„ค๋ช…ํ•˜๋Š” KDoc ๋ฌธ์„œ๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

+/**
+ * @param horizontalScrollState ๋ถ€๋ชจ ์ปดํฌ์ €๋ธ”์—์„œ ๊ด€๋ฆฌ๋˜๋Š” ๊ฐ€๋กœ ์Šคํฌ๋กค ์ƒํƒœ
+ * ์ค‘์ฒฉ๋œ ์Šคํฌ๋กค ๋ฌธ์ œ๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์ƒ์œ„์—์„œ ์ „๋‹ฌ๋จ
+ */
feature/home/src/main/java/com/school_of_company/home/view/component/ProgramListItem.kt (1)

34-34: ์Šคํฌ๋กค ์ƒํƒœ ๋งค๊ฐœ๋ณ€์ˆ˜์— ๋Œ€ํ•œ ๋ฌธ์„œํ™” ์ถ”๊ฐ€ ํ•„์š”

StandardProgramListItem๊ณผ ์ผ๊ด€์„ฑ์„ ์œ ์ง€ํ•˜๊ธฐ ์œ„ํ•ด horizontalScrollState ๋งค๊ฐœ๋ณ€์ˆ˜์— ๋Œ€ํ•œ ๋ฌธ์„œํ™”๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

+/**
+ * @param horizontalScrollState ๋ถ€๋ชจ ์ปดํฌ์ €๋ธ”์—์„œ ๊ด€๋ฆฌ๋˜๋Š” ๊ฐ€๋กœ ์Šคํฌ๋กค ์ƒํƒœ
+ * ์ค‘์ฒฉ๋œ ์Šคํฌ๋กค ๋ฌธ์ œ๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์ƒ์œ„์—์„œ ์ „๋‹ฌ๋จ
+ */
feature/home/src/main/java/com/school_of_company/home/view/HomeDetailStandardProgramParticipantScreen.kt (1)

273-278: ์„ฑ๊ณต ์ƒํƒœ์˜ ์ฝ”๋“œ ๊ตฌ์กฐ ๊ฐœ์„  ์ œ์•ˆ

Success ์ƒํƒœ์˜ ์ฒ˜๋ฆฌ ๋กœ์ง์„ ๋ณ„๋„์˜ ์ปดํฌ์ €๋ธ”๋กœ ์ถ”์ถœํ•˜๋ฉด ์ฝ”๋“œ์˜ ๊ฐ€๋…์„ฑ๊ณผ ์œ ์ง€๋ณด์ˆ˜์„ฑ์ด ํ–ฅ์ƒ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

+@Composable
+private fun SuccessContent(
+    data: ImmutableList<StandardProgramAttendListResponseEntity>,
+    horizontalScrollState: ScrollState
+) {
+    HomeDetailStandardParticipantList(
+        item = data,
+        horizontalScrollState = horizontalScrollState
+    )
+}

 when (standardProgramAttendListUiState) {
     is StandardProgramAttendListUiState.Loading -> Unit
     is StandardProgramAttendListUiState.Success -> {
-        HomeDetailStandardParticipantList(
-            item = standardProgramAttendListUiState.data.toImmutableList(),
-            horizontalScrollState = scrollState
-        )
+        SuccessContent(
+            data = standardProgramAttendListUiState.data.toImmutableList(),
+            horizontalScrollState = scrollState
+        )
     }
feature/home/src/main/java/com/school_of_company/home/view/HomeDetailProgramScreen.kt (1)

18-18: ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” import ๋ฌธ์ด ์žˆ์Šต๋‹ˆ๋‹ค.

wrapContentWidth์™€ TextOverflow import๊ฐ€ ์ถ”๊ฐ€๋˜์—ˆ์ง€๋งŒ ์ฝ”๋“œ์—์„œ ์‚ฌ์šฉ๋˜์ง€ ์•Š๋Š” ๊ฒƒ์œผ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค.

๋ถˆํ•„์š”ํ•œ import ๋ฌธ์„ ์ œ๊ฑฐํ•˜๋Š” ๊ฒƒ์ด ์ข‹๊ฒ ์Šต๋‹ˆ๋‹ค.

Also applies to: 35-35

feature/home/src/main/java/com/school_of_company/home/view/component/ProgramList.kt (2)

51-52: ์ฝ”๋“œ ์žฌ์‚ฌ์šฉ์„ฑ ๊ฐœ์„ ์„ ์œ„ํ•œ ์ œ์•ˆ

ProgramList์™€ StandardProgramList๊ฐ€ ๋งค์šฐ ์œ ์‚ฌํ•œ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ณตํ†ต ๋กœ์ง์„ ์ถ”์ถœํ•˜์—ฌ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ปดํฌ๋„ŒํŠธ๋กœ ๋งŒ๋“œ๋Š” ๊ฒƒ์„ ๊ณ ๋ คํ•ด๋ณด์„ธ์š”.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฆฌํŒฉํ† ๋ง์„ ์ œ์•ˆ๋“œ๋ฆฝ๋‹ˆ๋‹ค:

@Composable
private fun <T> CommonProgramList(
    modifier: Modifier = Modifier,
    items: ImmutableList<T>,
    horizontalScrollState: ScrollState,
    itemContent: @Composable (Int, T) -> Unit
) {
    ExpoAndroidTheme { colors, _ ->
        LazyColumn(
            modifier = modifier
                .fillMaxSize()
                .background(color = colors.white)
                .padding(horizontal = 16.dp)
        ) {
            itemsIndexed(items) { index, item ->
                itemContent(index + 1, item)
            }
        }
    }
}

Also applies to: 66-67


87-88: ํ”„๋ฆฌ๋ทฐ ๊ธฐ๋Šฅ ๊ฐœ์„  ์ œ์•ˆ

ํ˜„์žฌ ํ”„๋ฆฌ๋ทฐ๊ฐ€ ๊ธฐ๋ณธ ์ƒํƒœ๋งŒ ๋ณด์—ฌ์ฃผ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ์Šคํฌ๋กค ์ƒํƒœ์™€ ๋ฐ์ดํ„ฐ ์ƒํƒœ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” ์ถ”๊ฐ€ ํ”„๋ฆฌ๋ทฐ๋ฅผ ๊ตฌํ˜„ํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ถ”๊ฐ€ ํ”„๋ฆฌ๋ทฐ๋ฅผ ์ œ์•ˆ๋“œ๋ฆฝ๋‹ˆ๋‹ค:

@Preview(name = "์Šคํฌ๋กค๋œ ์ƒํƒœ")
@Composable
private fun ProgramListScrolledPreview() {
    val scrollState = rememberScrollState()
    scrollState.scrollTo(100) // ์Šคํฌ๋กค๋œ ์ƒํƒœ ์‹œ๋ฎฌ๋ ˆ์ด์…˜
    ProgramList(
        trainingItem = persistentListOf(/* ๋” ๋งŽ์€ ํ…Œ์ŠคํŠธ ๋ฐ์ดํ„ฐ */),
        navigateToTrainingProgramDetail = {},
        horizontalScrollState = scrollState
    )
}
๐Ÿ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between af7d6b4 and e16477c.

๐Ÿ“’ Files selected for processing (9)
  • feature/home/src/main/java/com/school_of_company/home/view/HomeDetailProgramScreen.kt (5 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/HomeDetailStandardProgramParticipantScreen.kt (2 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/HomeDetailTrainingProgramParticipantScreen.kt (2 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailProgramParticipantList.kt (5 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailProgramParticipantListItem.kt (2 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailStandardProgramParticipantListItem.kt (1 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/component/ProgramList.kt (6 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/component/ProgramListItem.kt (2 hunks)
  • feature/home/src/main/java/com/school_of_company/home/view/component/StandardProgramListItem.kt (2 hunks)
๐Ÿ”‡ Additional comments (10)
feature/home/src/main/java/com/school_of_company/home/view/component/HomeDetailProgramParticipantList.kt (1)

22-23: ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ๊ฐ€ ์ ์ ˆํžˆ ๊ตฌํ˜„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋ถ€๋ชจ ์ปดํฌ์ €๋ธ”์—์„œ ๋‹จ์ผ ScrollState๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ์ž์‹ ์ปดํฌ๋„ŒํŠธ๋กœ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์€ ์ค‘์ฒฉ ์Šคํฌ๋กค ๋ฌธ์ œ๋ฅผ ๋ฐฉ์ง€ํ•  ์ˆ˜ ์žˆ๋Š” ์ข‹์€ ์ ‘๊ทผ ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.

Also applies to: 46-47

feature/home/src/main/java/com/school_of_company/home/view/component/StandardProgramListItem.kt (1)

111-112: ๋ฏธ๋ฆฌ๋ณด๊ธฐ ํ•จ์ˆ˜์˜ ์Šคํฌ๋กค ์ƒํƒœ ์ฒ˜๋ฆฌ๊ฐ€ ์ ์ ˆํ•จ

๋ฏธ๋ฆฌ๋ณด๊ธฐ ํ•จ์ˆ˜์—์„œ rememberScrollState()๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์Šคํฌ๋กค ์ƒํƒœ๋ฅผ ์ œ๊ณตํ•˜๋Š” ๊ฒƒ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ตฌํ˜„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

feature/home/src/main/java/com/school_of_company/home/view/component/ProgramListItem.kt (1)

140-141: ๋ฏธ๋ฆฌ๋ณด๊ธฐ ํ•จ์ˆ˜์˜ ์Šคํฌ๋กค ์ƒํƒœ ์ฒ˜๋ฆฌ๊ฐ€ ์ ์ ˆํ•จ

๋ฏธ๋ฆฌ๋ณด๊ธฐ ํ•จ์ˆ˜์—์„œ ์Šคํฌ๋กค ์ƒํƒœ๋ฅผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ œ๊ณตํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

feature/home/src/main/java/com/school_of_company/home/view/HomeDetailStandardProgramParticipantScreen.kt (1)

212-212: ์Šคํฌ๋กค ์ƒํƒœ๊ฐ€ ์ ์ ˆํ•˜๊ฒŒ ์ ์šฉ๋จ

Box ์ปดํฌ๋„ŒํŠธ ๋‚ด์˜ horizontalScroll ์ˆ˜์ •์ž์— scrollState๋ฅผ ์‚ฌ์šฉํ•œ ๊ฒƒ์ด ์ ์ ˆํ•ฉ๋‹ˆ๋‹ค.

feature/home/src/main/java/com/school_of_company/home/view/HomeDetailTrainingProgramParticipantScreen.kt (2)

214-214: ์ˆ˜ํ‰ ์Šคํฌ๋กค ๊ธฐ๋Šฅ์ด ์ ์ ˆํ•˜๊ฒŒ ๊ตฌํ˜„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

ํ—ค๋” ํ–‰์— ์ˆ˜ํ‰ ์Šคํฌ๋กค์„ ์ถ”๊ฐ€ํ•œ ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค. ์Šคํฌ๋กค ์ƒํƒœ๋ฅผ ๊ณต์œ ํ•จ์œผ๋กœ์จ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์ด ํ–ฅ์ƒ๋  ๊ฒƒ์œผ๋กœ ์˜ˆ์ƒ๋ฉ๋‹ˆ๋‹ค.


275-280: ๋ฆฌ์ŠคํŠธ ์ปดํฌ๋„ŒํŠธ์™€ ์Šคํฌ๋กค ์ƒํƒœ ๋™๊ธฐํ™”๊ฐ€ ์ž˜ ๊ตฌํ˜„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

ํ—ค๋”์™€ ๋ฆฌ์ŠคํŠธ ์•„์ดํ…œ ๊ฐ„์˜ ์Šคํฌ๋กค ์ƒํƒœ๋ฅผ ๊ณต์œ ํ•˜์—ฌ ์ผ๊ด€๋œ ์Šคํฌ๋กค ๊ฒฝํ—˜์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

feature/home/src/main/java/com/school_of_company/home/view/HomeDetailProgramScreen.kt (2)

161-161: Box์˜ ๋„ˆ๋น„ ์„ค์ •์ด ์ ์ ˆํ•ฉ๋‹ˆ๋‹ค.

Box์— fillMaxWidth()๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์ผ๊ด€๋œ ๋ ˆ์ด์•„์›ƒ์„ ์œ ์ง€ํ•˜๋„๋ก ํ•œ ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.


243-244: ํ”„๋กœ๊ทธ๋žจ ๋ฆฌ์ŠคํŠธ์˜ ์ˆ˜ํ‰ ์Šคํฌ๋กค ๊ตฌํ˜„์ด ์ผ๊ด€์„ฑ ์žˆ๊ฒŒ ์ ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

StandardProgramList์™€ ProgramList ๋ชจ๋‘์— horizontalScrollState๋ฅผ ์ „๋‹ฌํ•˜์—ฌ ์ผ๊ด€๋œ ์Šคํฌ๋กค ๋™์ž‘์„ ๊ตฌํ˜„ํ•œ ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

Also applies to: 300-301

feature/home/src/main/java/com/school_of_company/home/view/component/ProgramList.kt (2)

3-3: ํ•„์š”ํ•œ import ๋ฌธ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค!

ScrollState ๊ด€๋ จ ๊ธฐ๋Šฅ์„ ์œ„ํ•œ import ๋ฌธ์ด ์ ์ ˆํ•˜๊ฒŒ ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Also applies to: 9-9


24-25: ์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ ๊ฒ€์ฆ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

horizontalScrollState๋ฅผ ์ƒ์œ„ ์ปดํฌ์ €๋ธ”์—์„œ ํ•˜์œ„๋กœ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์€ ์ ์ ˆํ•˜๋‚˜, ๋ถˆํ•„์š”ํ•œ ๋ฆฌ์ปดํฌ์ง€์…˜์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”์ง€ ํ™•์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

๋‹ค์Œ ์Šคํฌ๋ฆฝํŠธ๋กœ ๋‹ค๋ฅธ ํŒŒ์ผ๋“ค์—์„œ ProgramList์˜ ์‚ฌ์šฉ ํŒจํ„ด์„ ํ™•์ธํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค:

Also applies to: 39-40

โœ… Verification successful

Let me check how the scrollState is managed in HomeDetailProgramScreen to verify recomposition concerns.


์Šคํฌ๋กค ์ƒํƒœ ๊ด€๋ฆฌ๊ฐ€ ์ ์ ˆํ•˜๊ฒŒ ๊ตฌํ˜„๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

HomeDetailProgramScreen์—์„œ scrollState๊ฐ€ rememberScrollState()๋ฅผ ํ†ตํ•ด ์ ์ ˆํžˆ ์ƒ์„ฑ๋˜์–ด ์žˆ๊ณ , ์ปดํฌ์ €๋ธ” ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ์ „๋‹ฌ๋˜์–ด ์žฌ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ถˆํ•„์š”ํ•œ ๋ฆฌ์ปดํฌ์ง€์…˜ ์šฐ๋ ค๋Š” ์—†์–ด ๋ณด์ž…๋‹ˆ๋‹ค.

  • scrollState๋Š” ์ปดํฌ์ €๋ธ”์˜ ์ตœ์ƒ์œ„ ๋ ˆ๋ฒจ์—์„œ ํ•œ ๋ฒˆ๋งŒ ์ƒ์„ฑ๋จ
  • ์—ฌ๋Ÿฌ ์ž์‹ ์ปดํฌ๋„ŒํŠธ์—์„œ ๋™์ผํ•œ scrollState๋ฅผ ์žฌ์‚ฌ์šฉํ•˜์—ฌ ๋ฉ”๋ชจ๋ฆฌ ํšจ์œจ์„ฑ ํ™•๋ณด
  • remember๋ฅผ ํ†ตํ•œ ์ƒํƒœ ๋ณด์กด์œผ๋กœ ๋ฆฌ์ปดํฌ์ง€์…˜ ์ตœ์ ํ™”๊ฐ€ ์ด๋ฃจ์–ด์ง
๐Ÿ Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# ProgramList ์ปดํฌ์ €๋ธ”์˜ ์‚ฌ์šฉ ํŒจํ„ด ํ™•์ธ
ast-grep --pattern 'ProgramList($$$)' 

Length of output: 2402


Script:

#!/bin/bash
# Check how scrollState is managed in HomeDetailProgramScreen
ast-grep --pattern 'val scrollState = $$$'

Length of output: 44


Script:

#!/bin/bash
# HomeDetailProgramScreen์—์„œ scrollState ์„ ์–ธ๊ณผ ์‚ฌ์šฉ์„ ํ™•์ธ
rg "scrollState" feature/home/src/main/java/com/school_of_company/home/view/HomeDetailProgramScreen.kt -A 2 -B 2

Length of output: 2384

@audgns10 audgns10 merged commit e5507ab into develop Dec 16, 2024
2 checks passed
@audgns10 audgns10 deleted the refactor/249-program-manager-page-horizontal-scroll-both-item branch December 16, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0๏ธโƒฃ Priority: Critical ์šฐ์„ ์ˆœ์œ„ - ๊ธด๊ธ‰!!!!! โ™ป๏ธ Refactor ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง
Projects
None yet
2 participants