Skip to content

Conversation

@J0onYEong
Copy link
Collaborator

@J0onYEong J0onYEong commented May 12, 2025

변경된 점

  • 코인 디테일 화면 실시간 가격정보, 오더북, 최근거래정보 QTY, 가겨정보 텍스트 표현 변경
  • CoreUtil테스트 모듈 생성

코인 디테일 화면 오더북, 최근거래정보 QTY, 가겨정보 텍스트 표현 변경

거래량에따라 텍스트 길이가 변해 정보확인에서 가시성이 떨어진다고 판단했습니다.

따라서 간소화 로직을 추가하여 표현의 가시성은 높이고 예상하지 못한 UI표현을 최소화 했습니다.

  • 1000미만의 수 = 6자리로 표현 Ex) 0.000001 = 0.0000
  • 1_000이상 = 1.000K
  • 1_000_000이상 = 1.000M
  • 1_000_000_000이상 = 1.000B
변경전 변경후

CoreUtil테스트 모듈 생성

수 간소화 로직은 CoreUtil모듈의 CVNumber의 인스턴스 매서드로 구현했습니다.
해당 로직의 경우 프로젝트 내 모든 영역에서 접근 가능함으로 테스트가 필수적이라고 판단했습니다.
따라서 테스트 모듈을 생성하고 확인이 필요한 케이스에 대한 검증을 진행했습니다.

@J0onYEong J0onYEong requested a review from Copilot May 12, 2025 09:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the coin detail screen by refining the display format for orderbook and recent trade quantities, and it adds a test module to verify the changes.

  • Implements compact formatting logic (K/M/B notation) for numbers in the CVNumber data structure.
  • Updates view configuration for better text scaling in orderbook cells.
  • Introduces unit tests for the new numeric formatting logic.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Projects/Utils/CoreUtil/Tests/CVNumberTests.swift Added tests for verifying the compact numeric formatting.
Projects/Utils/CoreUtil/Sources/DataStructure/CVNumber.swift Implemented a new function for compacting numbers and refactored rounding methods.
Projects/Utils/CoreUtil/Project.swift Added a new test target for CoreUtil.
Projects/Features/CoinDetail/Feature/Sources/Views/OrderbookCellView.swift Adjusted UI properties for proper text scaling.
Projects/Features/CoinDetail/Feature/Sources/CoinDetailPageViewModel.swift Updated the usage of numeric formatting in the view model.
Comments suppressed due to low confidence (2)

Projects/Features/CoinDetail/Feature/Sources/CoinDetailPageViewModel.swift:209

  • The parameter 'bigestQuantity' appears to be a misspelling; consider renaming it to 'biggestQuantity' for clarity.
func transform(bigestQuantity: CVNumber, orderbook: Orderbook, type: OrderbookType) -> OrderbookCellRO {

Projects/Utils/CoreUtil/Sources/DataStructure/CVNumber.swift:129

  • [nitpick] The usage of hardcoded numeric limits (such as the value 5 for the character count) makes the logic harder to maintain. It would be beneficial to extract these magic numbers into named constants.
if let numString = formatter.string(from: base as NSNumber), numString.count <= 5 {

@J0onYEong J0onYEong changed the title [CVW-046] 코인 디테일 화면 오더북, 최근거래정보 QTY, 가겨정보 텍스트 표현 변경 [CVW-046] 코인 디테일 화면 QTY, 가겨정보 텍스트 표현 변경 May 12, 2025
@J0onYEong J0onYEong merged commit c745fd0 into main May 12, 2025
1 of 3 checks passed
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.

2 participants