-
Notifications
You must be signed in to change notification settings - Fork 10
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
Updates to the JS Report #96
base: main
Are you sure you want to change the base?
Conversation
Make the report use the entier browser. Also change the text and section columns to autoresize
The value getter for section should return the string, not the whole row.
It can be useful to view all requriements across every specification.
www/src/App.js
Outdated
const requirements = specifications.flatMap((spec) => spec.requirements); | ||
const total = { | ||
id: "AllSpecifications", | ||
stats: specifications.reduce((total, {stats}) => { | ||
Object.keys(stats).forEach((statName) => { | ||
const stat = total[statName] || new StatsClass() | ||
total[statName] = stat; | ||
stat.onStat(stats[statName]); | ||
}); | ||
return total; | ||
}, {}), | ||
requirements, | ||
} |
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.
Can you move this to result.js
so that we're not recomputing stats every time you load this page? Or at least cache the value.
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.
Sure, it is not a lot of work and everything is local,
so I was not too worried, but :)
www/src/App.js
Outdated
specifications | ||
.map((spec) => spec.requirements) |
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.
This isn't doing anything
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.
woops
www/src/stats_class.js
Outdated
@@ -0,0 +1,46 @@ | |||
|
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.
nit: just call this file stats.js
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.
sure
www/src/App.js
Outdated
import specifications from "./result"; | ||
import { Stats as StatsClass } from "./stats_class"; |
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.
nit: Why does the name need Class
at the end?
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.
Line 7 import Stats
from "./spec"
Enlarging the DataGrid to use the entire browser.
Changing the section and text column to use all available width.
Fix filtering by section
Add a requirements view that lists all requirements across all specifications.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.