-
Notifications
You must be signed in to change notification settings - Fork 621
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
feat(webapp): add tracing page #1433
Conversation
* add temporary json to display heatmap * add heatmap settings and display temporary json as a heatmap * fix heatmap axis styles and active cell styles * document the series input data format * print the clicked item coordinates (x, y)
83b36bb
to
fc82933
Compare
5bc7c76
to
1d3c7df
Compare
Codecov Report
@@ Coverage Diff @@
## main #1433 +/- ##
==========================================
- Coverage 68.61% 66.29% -2.31%
==========================================
Files 132 139 +7
Lines 4360 4752 +392
Branches 1179 1288 +109
==========================================
+ Hits 2991 3150 +159
- Misses 1363 1597 +234
+ Partials 6 5 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
size-limit report 📦
|
/create-server |
Monosnap.screencast.2022-08-26.19-20-47.mp4 |
/create-server |
* add area selection * add click selection * add bucket items colors * add resizable selected area
/create-server |
* add /api/exemplars:query?query=app{} response data (datasetA)
/create-server |
/create-server |
webapp/javascript/services/render.ts
Outdated
@@ -70,6 +70,7 @@ interface mergeWithQueryIDProps { | |||
maxNodes: string | number; | |||
} | |||
|
|||
// z.infer<typeof MergeMetadataSchema> ? |
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.
do we still need this here
webapp/javascript/services/render.ts
Outdated
signal?: AbortSignal; | ||
} | ||
): Promise<Result<HeatmapOutput, RequestError | ZodError>> { | ||
// todo use common builder |
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 you're going to leave this comment here can you elaborate on what you mean by this?
const [minTextEl, maxTextEl] = within( | ||
screen.getByTestId('color-scale') | ||
).getAllByRole('textbox'); | ||
// expect(minTextEl.textContent).toBe(`${exemplarsQueryHeatmap.minDepth - 1}`); |
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.
Do we need these here?
}), | ||
})); | ||
|
||
// TODO(dogfrogfog): refactor |
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.
refactor in what way?
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.
Wow, Looks good and quite impressive!!
I would like to see the boundaries more clear though:
A generic Heatmap
that you pass data and callback events. Right now it's too intertwined with tracing stuff. As an illustration, the HeatMap
component should know nothing about the redux store or its state. It should just receive heatmapData
(in whatever format it has) and its callbacks (onSelection I guess?).
})); | ||
|
||
// TODO(dogfrogfog): refactor | ||
describe.skip('Component: Heatmap', () => { |
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.
shouldn't be skipped
webapp/javascript/services/render.ts
Outdated
(acc, [key, value]) => acc + (acc ? `&${key}=${value}` : `${key}=${value}`), | ||
'' | ||
); | ||
const response = await request(`/api/exemplars:query?${queryString}`, { |
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.
@kolesnikovae I am curious about the usage of :
in a url?
state.heatmapSingleView = { | ||
...action.payload, | ||
// refactor types | ||
heatmap: state.heatmapSingleView.heatmap as Heatmap, |
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.
Why is this assertion needed?
useEffect(() => { | ||
if (from && until && query) { | ||
const fetchData = dispatch( | ||
fetchHeatmapSingleView({ | ||
query, | ||
from, | ||
until, | ||
...DEFAULT_HEATMAP_PARAMS, | ||
}) | ||
); | ||
return () => fetchData.abort('cancel'); | ||
} | ||
return undefined; | ||
}, [from, until, query]); |
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 think this is waaaay too much functionality for this single hook. Let's move data fetching to the component/another hook.
Co-authored-by: eduardo aleixo <eh-am@users.noreply.github.com>
Co-authored-by: eduardo aleixo <eh-am@users.noreply.github.com>
* remove comments * use URLSearchParams to build query params * refactor tracing state
* tests * add onSelect handler to Heatmap props
/create-server |
/create-server |
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.
LGTM! Nice work @dogfrogfog
Brief
Changes
Concerns