NineChronicles icon indicating copy to clipboard operation
NineChronicles copied to clipboard

fix material count in material navigation popup

Open eugene-doobu opened this issue 1 year ago • 4 comments

Description

재화 popup ui에 소수점이 있는 경우 무시하지 않고 보여줍니다

How to test

화면 상단의 소지중인 재화 혹은 포인트 UI를 클릭해서 팝업창을 확인합니다

Related Links

https://github.com/planetarium/NineChronicles/issues/4212

eugene-doobu avatar Feb 22 '24 08:02 eugene-doobu

This PR has 5 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Small
Size       : +3 -2
Percentile : 2%

Total files changed: 1

Change summary by file extension:
.cs : +3 -2

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a balance between between PR complexity and PR review overhead. PRs within the optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification) of this PR in relation to all other PRs within the repository.


Was this comment helpful? :thumbsup:  :ok_hand:  :thumbsdown: (Email) Customize PullRequestQuantifier for this repository.

이거 crystal 개수에도 영향을 줄까요? crystal 은 소수점 아래로 18자리까지 있어서 잘못하면 지옥도가 펼쳐질 수 있습니다.

{
            "currency": {
              "ticker": "CRYSTAL"
            },
            "quantity": "7428000049.9999999994252"
          },

이런게 존재할 수 있습니다.

U-lis avatar Feb 22 '24 08:02 U-lis

이거 crystal 개수에도 영향을 줄까요? crystal 은 소수점 아래로 18자리까지 있어서 잘못하면 지옥도가 펼쳐질 수 있습니다.

{
            "currency": {
              "ticker": "CRYSTAL"
            },
            "quantity": "7428000049.9999999994252"
          },

이런게 존재할 수 있습니다.

일단은 소수점 4자리까지만 출력하도록 제한하였습니다

eugene-doobu avatar Feb 22 '24 09:02 eugene-doobu

수정된 코드의 클래스 이름을 봐서는 NCG에만 쓰이는게 아니라 다른 재화들에도 사용이 되고, 이 경우엔 소수점표시가 필요없는데도 소수점이 표시된다던지할 가능성이 있어보이는데 괜찮을까요?

출력 조건을 명확히 확인해보도록 하겠습니다

eugene-doobu avatar Feb 23 '24 05:02 eugene-doobu

수정된 코드의 클래스 이름을 봐서는 NCG에만 쓰이는게 아니라 다른 재화들에도 사용이 되고, 이 경우엔 소수점표시가 필요없는데도 소수점이 표시된다던지할 가능성이 있어보이는데 괜찮을까요?

재화 타입에 따라 구분해서 NCG, Crystal 같이 소수점 표시가 필요한 재화만 GetQuantityString()으로 받아오고 있습니다. pr에서 수정된 Show() 메서드에서는 그런 countText를 받아서 소수점 없애는 역할만 해서 없던 소수점이 생길 일은 없습니다.

tyrosine1153 avatar Mar 04 '24 03:03 tyrosine1153