Skip to content
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

Implement tracking of filter values #1566

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

jlin95
Copy link
Contributor

@jlin95 jlin95 commented Sep 29, 2024

Implemented filter tracking courtesy of Maik's draft implementation in https://github.com/boxwise/boxtribute/pull/1364/files#diff-ef01c5e03077013a4f49a11bf62dba2f8d1a35268b3f6438aa8bb1b1b5346461.

As I couldn't test it locally due to errors in running the frontend, could @fhenrich33 take a peek at running this branch locally and see if the console logs log the correct filter values?

Note: There is a slight deviation between Maik's changes in shared-components/statviz/components/filter/TimeRangeSelect.tsx and mine, see original version here- https://github.com/boxwise/boxtribute/pull/1364/files#diff-ef01c5e03077013a4f49a11bf62dba2f8d1a35268b3f6438aa8bb1b1b5346461L7.

Copy link
Member

@HaGuesto HaGuesto left a comment

Choose a reason for hiding this comment

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

code review

did not find anything besides a typo

functional review

It seems to me that the timerange filter tracking is spamming and calling the track function to often:

  1. If you change the value of the to or from filter, in total for heap calls are sent even though there should be just one. When the from filter is changed also the to filter sends a request. --> There seems to be an issue with the if clauses.
  2. If any other filter is applied, this filter is tracked correctly, but then also changes to the timeRange filter are tracked. --> I assume there is a re-render issue here.

I did a recording of my console
https://www.loom.com/share/056149be95df4dc3a829903f13661b3d?sid=4320e3ed-d241-48aa-ac73-8b32647950d5

@@ -62,12 +63,21 @@ export default function TimeRangeSelect() {

if (toFormValue && new Date(toFormValue) !== to) {
searchParams.delete("to");
searchParams.append("to", date2String(new Date(toFormValue)));
const newToDate = date2String(new Date(toFormValue));
const stringifiedForm = date2String(from);
Copy link
Member

Choose a reason for hiding this comment

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

I think here is a typo. Should probably be called stringifiedFrom.

@jlin95
Copy link
Contributor Author

jlin95 commented Sep 30, 2024

Hey @HaGuesto - I pushed a change again - again it's from Maik's implementation. I hope this works this time!

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.86%. Comparing base (2b6fa05) to head (cceaa05).
Report is 14 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1566   +/-   ##
=======================================
  Coverage   85.86%   85.86%           
=======================================
  Files         229      229           
  Lines       21728    21728           
  Branches     1932     1932           
=======================================
  Hits        18656    18656           
  Misses       3036     3036           
  Partials       36       36           
Flag Coverage Δ
backend 99.02% <ø> (ø)
frontend 82.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aerinsol aerinsol requested a review from HaGuesto October 1, 2024 12:18
@HaGuesto
Copy link
Member

HaGuesto commented Oct 2, 2024

functional review passed

@HaGuesto HaGuesto merged commit 6a42ea2 into master Oct 2, 2024
11 checks passed
@HaGuesto HaGuesto deleted the feature/statviz_heap_tracking_filters branch October 2, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants