-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP:Results page #34
WIP:Results page #34
Conversation
src/lib/index.ts
Outdated
}, | ||
); | ||
return { | ||
netDifference: proposedSum - existingSum, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this is derived from these, I would be inclined to remove it but it was convenient to do it this way at first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just a function that sums the score of an array? Two calls to that, then the caller can subtract?
src/lib/index.ts
Outdated
proposedScores: string[]; | ||
}; | ||
|
||
export function getCompletedForScorecard( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharing some functionality from elsewhere in order to reuse it and be consistent across our various areas
<div class="results-grid"> | ||
<div | ||
class="header" | ||
style="--background-color: {headerBackgroundColour}; --font-color:{headerFontColour}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like how I've ended up doing this. Wanted to make sure we used the same colours here but it doesn't really work nicely since afaik I have to put this in every element that pulls them through. We should maybe integrate sass more and just have some styles we can apply to set a background + font colour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look into it, if this is always the same, we shouldn't need vars just to plumb into a svelte style
> | ||
Policy Conflicts | ||
</div> | ||
<div class="grid-box">{policyCheckComplete}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I had more time I would do this section like I do for the other rows below. It would make this page less cumbersome and we could easily and neatly switch to a link when there is an action for the user
Net Difference | ||
</div> | ||
|
||
<LevelOfServiceResults title={"Safety"} existing={2} proposed={68} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned this is just stubbed out because we don't have, afaik, a neat answer to where these scores are coming from in our representation of the state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just notes for myself tomorrow, will pick this up then
src/lib/index.ts
Outdated
); | ||
} | ||
|
||
export function getScorecardDifference(scorecardState: ScorecardState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing return type
src/lib/index.ts
Outdated
}, | ||
); | ||
return { | ||
netDifference: proposedSum - existingSum, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just a function that sums the score of an array? Two calls to that, then the caller can subtract?
$state[scorecardKey].proposedScores[idx] != "", | ||
); | ||
} | ||
//@ts-ignore This is a scorecard state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some lint taught me that ts-expect-error
should be used instead, because ts-ignore
can become unused silently
src/routes/route_check/data.ts
Outdated
@@ -121,6 +121,7 @@ export interface State { | |||
pathCheck: Scorecard; | |||
|
|||
pathPlacemakingCheck: Scorecard; | |||
feedback: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to change getEmptyState
const headerFontColour = backgroundAndFontCombinations.green.font; | ||
let headerBackgroundColour = backgroundAndFontCombinations.green.background; | ||
|
||
const policyCheckComplete: boolean = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double check these don't need to be reactive -- whole page should be re-evaluated when switching, but double check SK
); | ||
</script> | ||
|
||
<Breadcrumbs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix merge
<div class="results-grid"> | ||
<div | ||
class="header" | ||
style="--background-color: {headerBackgroundColour}; --font-color:{headerFontColour}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will look into it, if this is always the same, we shouldn't need vars just to plumb into a svelte style
ac83e09
to
6facf1a
Compare
First table of result summary page Add next steps Fix broken wording
6facf1a
to
546f2d3
Compare
check is not helpful yet; they don't share score types
113ce74
to
abf096d
Compare
I got things rebased and passing TS checks. Plenty left to do (started a list in the issue), but solid start -- thanks! |
#24