Skip to content

Conversation

@IanMatthewHuff
Copy link
Member

For #4948

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • The wiki is updated with any design decisions/details.
@IanMatthewHuff IanMatthewHuff requested a review from rchiodo April 11, 2019 21:45
}

private getInputExecutionCount = (cellVMs: ICellViewModel[]) : number => {
this.updateExecutionCount(cellVMs);
Copy link

Choose a reason for hiding this comment

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

updateExecutionCount [](start = 13, length = 20)

Seems weird that this get function is updating state. Maybe do the steps separately? getInputExecutionCount didn't update any state before.

Copy link

Choose a reason for hiding this comment

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

I think then I'd call it updateCurrentExecutionCount and have it call the getInputExecutionCount and subtract 1?


In reply to: 274679371 [](ancestors = 274679371)

Copy link

Choose a reason for hiding this comment

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

Or maybe just stick this on the state instead of in a member variable?


In reply to: 274680128 [](ancestors = 274680128,274679371)

Copy link

Choose a reason for hiding this comment

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

Cause what happens if there's no input box?


In reply to: 274680321 [](ancestors = 274680321,274680128,274679371)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, not great. How about this? The basic atomic action (get execution count) get its own function. Get input doesn't set any state and does the +1. Execution count is set just where we are going to request a new set of variables which is where we need it set. I don't believe that this should be in state as it's only used in communications it's not actually part of the react rendering code or passed down as a prop.


In reply to: 274680448 [](ancestors = 274680448,274680321,274680128,274679371)

Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

🕐

Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

:shipit:

@IanMatthewHuff IanMatthewHuff merged commit cb64ab2 into microsoft:master Apr 11, 2019
@IanMatthewHuff IanMatthewHuff deleted the dev/ianhu/variableExecutionCount branch April 11, 2019 22:41
@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants