CS342 / 2023-Utah

The CS342 2023 U-STEP Project
MIT License
0 stars 3 forks source link

Gauge creation #89

Closed emmyxth closed 1 year ago

emmyxth commented 1 year ago

Name of the PR

Creation of gauge component

:recycle: Current situation & Problem

Describe the current situation (if possible, with an exemplary (or real) code snippet and/or where this is used) Please link any open issue that is addressed with this PR Didn't have health gauge before, will be used after survey completion/in trends page!

:bulb: Proposed solution

Describe the solution and how this affects the project and internal structure Created gauge component to be integrated with the surveys. Currently has maxValue, minValue, userValue variables that can be used for further iterations. Adapted code from this repository: https://github.com/honkmaster/TTGaugeView

:gear: Release Notes

Add a summary of the feature and possible migration guides if this is a breaking change so this section can be added to the release notes. Include code snippets that provide examples of the feature implemented if it appends or changes the public interface. Currently what it looks like:

UserValue 100 (min: 50, max: 160)

Screenshot 2566-03-06 at 17 42 48

UserValue 50 (min: 50, max: 160)

Screenshot 2566-03-06 at 17 59 34

UserValue 160 (min: 50, max: 160)

Screenshot 2566-03-06 at 17 46 53

:heavy_plus_sign: Additional Information

Provide some additional information if possible

Related PRs

Reference the related PRs

Testing

Are there tests included? If yes, which situations are tested, and which corner cases are missing? No

Reviewer Nudging

Where should the reviewer start? Where is a good entry point?

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

jenlmoore commented 1 year ago

Can you please post a screenshot of your changes?

jenlmoore commented 1 year ago

I also don't see any changes to the code, except for Jiahui's image, in the files changed section. Can you please make sure all of your changes are shown and are correct

jenlmoore commented 1 year ago

Also, we don't want to show the patient a number, rather just where they are on the scale. Please refer to the issue description for more information, which contains this picture as an example: image

emmyxth commented 1 year ago

Sorry, forgot to commit before push! Also, I fixed the gauge to match the spec better. Please see the above screenshot!

codecov[bot] commented 1 year ago

Codecov Report

Merging #89 (2363202) into main (4437fc7) will decrease coverage by 3.50%. The diff coverage is 94.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   85.88%   82.38%   -3.50%     
==========================================
  Files          60       62       +2     
  Lines        2209     2394     +185     
==========================================
+ Hits         1897     1972      +75     
- Misses        312      422     +110     
Impacted Files Coverage Δ
UtahUITests/TrendsTests.swift 100.00% <ø> (ø)
UtahModules/Sources/UtahTrends/GaugeView.swift 93.43% <93.43%> (ø)
...odules/Sources/UtahTrends/TTGaugeViewSection.swift 100.00% <100.00%> (ø)
UtahModules/Sources/UtahTrends/Trends.swift 100.00% <100.00%> (ø)
...odules/Sources/UtahSchedule/EventContextView.swift 92.11% <0.00%> (-7.89%) :arrow_down:
...Modules/Sources/UtahSchedule/UtahTaskContext.swift 43.75% <0.00%> (-6.25%) :arrow_down:
...tahModules/Sources/UtahSchedule/ScheduleView.swift 94.40% <0.00%> (-3.94%) :arrow_down:
...es/Sources/UtahOnboardingFlow/OnboardingFlow.swift 88.47% <0.00%> (-3.20%) :arrow_down:
UtahUITests/SchedulerAndQuestionnaireTests.swift 100.00% <0.00%> (ø)
...ahModules/Sources/UtahSchedule/UtahScheduler.swift 100.00% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4437fc7...2363202. Read the comment docs.

jenlmoore commented 1 year ago

The tests aren't passing, please look at those again and fix them so they pass, thanks. Until then, please keep this PR as a draft as it is not ready

jenlmoore commented 1 year ago

Can you please also show screenshots for differnt scores? Ie. Show what it looks like when a user gets a 1/20 vs. a 10/20 vs. a 15/20 vs. a 20/20, etc. so that we know the functionality works.