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

Major goal- and step-loading refactor. #1004

Merged
merged 11 commits into from
Feb 10, 2021
Merged

Major goal- and step-loading refactor. #1004

merged 11 commits into from
Feb 10, 2021

Conversation

imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Feb 9, 2021

Backend:

  • update functions that handle UserEdit goals and goal steps.

Frontend:

  • update backend.tsx function correspondingly;
  • make GoalTimeline/GoalDisplay/ create new goals to avoid mutating suggestion list, disable buttons to completed goals;
  • cleanup GoalTimeline/GoalsActions.tsx, especially goal loading and step advancing functions;
  • in MergeDupStepComponent.tsx, don't refresh words (leave that to general goal actions), load filler text if nothing to merge (will need a proper page);
  • in types/goals.tsx, give empty first step by default, replace v1 (time-based) with v4 (random) to prevent duplicate hashes when goal history loaded

Closes #186 *
Closes #588
Closes #990
First 1.5 boxes of #931
Related to #393, #458 , #725 (*more needed to handle in-progress multi-step goals)


This change is Reviewable

@codecov-io
Copy link

codecov-io commented Feb 9, 2021

Codecov Report

Merging #1004 (9b1243b) into master (8be4660) will decrease coverage by 0.04%.
The diff coverage is 57.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1004      +/-   ##
==========================================
- Coverage   49.62%   49.58%   -0.05%     
==========================================
  Files         236      236              
  Lines        6480     6508      +28     
  Branches      393      391       -2     
==========================================
+ Hits         3216     3227      +11     
- Misses       2974     2995      +21     
+ Partials      290      286       -4     
Flag Coverage Δ
backend 55.28% <58.69%> (-0.15%) ⬇️
frontend 43.32% <56.36%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/backend/index.tsx 5.00% <0.00%> (ø)
...nts/GoalTimeline/GoalDisplay/HorizontalDisplay.tsx 10.00% <0.00%> (ø)
...nents/GoalTimeline/GoalDisplay/VerticalDisplay.tsx 76.92% <0.00%> (ø)
src/goals/CreateCharInv/CreateCharInv.tsx 100.00% <ø> (ø)
...ergeDupGoal/MergeDupStep/MergeDupStepComponent.tsx 0.00% <0.00%> (ø)
src/goals/MergeDupGoal/MergeDupStep/index.tsx 0.00% <ø> (ø)
.../MergeDupGoal/MergeDupStep/MergeDupStepReducer.tsx 51.89% <50.00%> (-0.05%) ⬇️
src/components/GoalTimeline/GoalsActions.tsx 63.38% <51.51%> (-14.24%) ⬇️
Backend/Models/UserEdit.cs 81.60% <55.55%> (-0.54%) ⬇️
Backend/Services/UserEditApiServices.cs 62.22% <55.55%> (-20.14%) ⬇️
... and 5 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 8be4660...9b1243b. Read the comment docs.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 19 of 19 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @imnasnainaec)


Backend/Controllers/UserEditController.cs, line 223 at r1 (raw file):

Console.WriteLine(stepEdit.StepIndex);

Remove the debugging statements, here and below.


Backend/Models/UserEdit.cs, line 79 at r1 (raw file):

public int? StepIndex { get; set; }

The intended use of undefined should be documented here.


src/components/GoalTimeline/tests/GoalTimelineComponent.test.tsx, line 50 at r1 (raw file):

"Goes default for a non-existent goalType

My brain didn't like this, re-word?

Copy link
Collaborator Author

@imnasnainaec imnasnainaec left a comment

Choose a reason for hiding this comment

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

Reviewable status: 15 of 19 files reviewed, 3 unresolved discussions (waiting on @jasonleenaylor)


Backend/Controllers/UserEditController.cs, line 223 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…
Console.WriteLine(stepEdit.StepIndex);

Remove the debugging statements, here and below.

Done.


Backend/Models/UserEdit.cs, line 79 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…
public int? StepIndex { get; set; }

The intended use of undefined should be documented here.

Done.


src/components/GoalTimeline/tests/GoalTimelineComponent.test.tsx, line 50 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…
"Goes default for a non-existent goalType

My brain didn't like this, re-word?

Done.

Copy link
Contributor

@jasonleenaylor jasonleenaylor left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r2, 4 of 4 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@imnasnainaec imnasnainaec merged commit 9082ec6 into master Feb 10, 2021
@imnasnainaec imnasnainaec deleted the merge-dup-load-3 branch February 10, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment