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

Remove use of react-dimensions package in ScatterPlot component #1223

Merged

Conversation

mszabo-wikia
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

This package is abandoned and doesn't play well with Vite, because one of its dependencies uses this to access the global context in a way that apparently fails in a module context. Replace this dependency with a simple hooks-based implementation.

This package is abandoned and doesn't play well with Vite, because one
of its dependencies uses `this` to access the global context in a way
that apparently fails in a module context. Replace this dependency with
a simple hooks-based implementation.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
@mszabo-wikia mszabo-wikia force-pushed the remove-react-dimensions branch from 81aa05a to 377a7c7 Compare February 27, 2023 23:59
@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Base: 95.44% // Head: 95.35% // Decreases project coverage by -0.09% ⚠️

Coverage data is based on head (377a7c7) compared to base (9c6546d).
Patch coverage: 88.88% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1223      +/-   ##
==========================================
- Coverage   95.44%   95.35%   -0.09%     
==========================================
  Files         243      243              
  Lines        7570     7582      +12     
  Branches     1898     1901       +3     
==========================================
+ Hits         7225     7230       +5     
- Misses        345      352       +7     
Impacted Files Coverage Δ
...ents/SearchTracePage/SearchResults/ScatterPlot.jsx 85.18% <88.88%> (+18.51%) ⬆️
...mponents/TracePage/TraceStatistics/tableValues.tsx 93.79% <0.00%> (-3.45%) ⬇️
...nents/TracePage/TraceTimelineViewer/SpanBarRow.tsx 100.00% <0.00%> (+5.55%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

could you please describe how this was tested (screenshots?)

@mszabo-wikia
Copy link
Contributor Author

So what I did here was checking the dimensions of the scatterplot in a normal situation (fullscreen window) and verifying it's properly set to an absolute value:
Screenshot 2023-03-01 at 01 34 57

Then I reduced the window size and verified that the scatterplot width is reduced as the window shrinks:
Screenshot 2023-03-01 at 01 35 11

Then I restored the original window size (fullscreen) and verified that the scatterplot expands again to fill the available width.

I compared this with the behavior on an existing Jaeger 1.42 instance—the dimensions seem to match.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Thanks!

@yurishkuro yurishkuro merged commit 49f326b into jaegertracing:main Mar 1, 2023
Binrix pushed a commit to Binrix/jaeger-ui that referenced this pull request Apr 18, 2023
…egertracing#1223)

## Which problem is this PR solving?
- Split from jaegertracing#1212

## Short description of the changes
This package is abandoned and doesn't play well with Vite, because one
of its dependencies uses `this` to access the global context in a way
that apparently fails in a module context. Replace this dependency with
a simple hooks-based implementation.

Signed-off-by: Máté Szabó <mszabo@fandom.com>
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