Code Insights: Add num samples display option#46653
Conversation
Bundle size report 📦
Look at the Statoscope report for a full comparison between the commits 268213b and 02c985e or learn more. Open explanation
|
yep that should be pending #46283 and #saving sort #42459
yeah, I agree a 0 default value is weird. We just need to align on what default we want to provide here- we don't have to make the field nullable on the backend but in that case we want to provide a useful default for every call from the frontend |
There was a problem hiding this comment.
we can make this non-nullable but in that case we should agree on a sensible default, like 30 which is the default max samples we save
There was a problem hiding this comment.
also to play both cases, the reason this is nullable is also so that if a user changes the sample size default then we return the max that they can see
|
@leonore @chwarwick I think this setting name is confusing, this doesn't work like setting where you specify number of points for each series, instead it works like upper boundary (exactly how it works for series numbers). For example, I have an insight with 12 points, when I type 20 in number samples field I still will get 12 points right? because there is no other points on the backend. So I think we should
|
There was a problem hiding this comment.
I wonder if this wording will make people think this is actually limiting captured history? Maybe something like:
Number of series points to display (max 90)
There was a problem hiding this comment.
What about "Max number of series points to display" based on this comment https://github.com/sourcegraph/sourcegraph/pull/46653#issuecomment-1397451495
There was a problem hiding this comment.
Works for me, was just thinking it needed something that indicated it's just about the display
...eb/src/enterprise/insights/pages/insights/creation/search-insight/utils/insight-sanitizer.ts
Outdated
Show resolved
Hide resolved
3797492 to
f0117e0
Compare
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 02c985e...268213b.
|
leonore
left a comment
There was a problem hiding this comment.
I took the liberty of changing the default in the backend in this PR, hope that's okay.
I tested this locally and couldn't reproduce the sort & limit filters not getting saved anymore- did you fix this in this PR? (if so can we add a changelog entry for that too?)
Co-authored-by: leo <leo.p@sourcegraph.com>
Closes https://github.com/sourcegraph/sourcegraph/issues/45823
Fixes https://github.com/sourcegraph/sourcegraph/issues/38926
Fixes https://github.com/sourcegraph/sourcegraph/issues/42459
Context
This PR adds yet another drill down filter field. Sort and Limit number points field, it works actually like max (limit) filter, points count on the chart can't be greater than filter value.
Backend problem
Test plan
App preview:
Check out the client app preview documentation to learn more.