-
Notifications
You must be signed in to change notification settings - Fork 186
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
Migrate Rankings Table to React #10569
base: main
Are you sure you want to change the base?
Conversation
I think that means I am done? |
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.
It takes about a minute to load the data when I change any filters. Is that just a running-locally problem?
hideAllButton | ||
hideClearButton | ||
/> | ||
<RegionSelector |
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 component should be moved to components/wca
(maybe in separate PR; the dispatchFilter
prop should probably be changed to onChange
, since you don't need a reducer/dispatcher to use this reusable component).
Yes and no. It is quite slow to compute rankings always, which is why we precompute the pages in prod after every cad, but current local state makes it about 5 * worse because of the Debugging output and it also currently serializes the competition object very expensively |
@thewca-bot deploy staging |
@thewca-bot deploy staging |
Just improved the speed by 10x |
Co-authored-by: Kevin Matthews <[email protected]>
fixed the mobile issues |
Some more issues:
|
Co-authored-by: Kevin Matthews <[email protected]>
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'm still confused why there was a duplicate key before - doesn't that mean that a result was showing up in the table twice? I don't understand how switching to react table fixed it either.
Well I assumed that there was a edge case where the current key wasn't unique enough and react table takes care of that |
Also I wasn't just switching to React Table to fix that. I was talking to Gregor and the goal is to use it everywhere |
a4f14ae
to
7f711e9
Compare
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.
Please also merge main
so that you can get the linter to rumble about your JSX files 😉
app/webpacker/components/CompetitionsOverview/CompetitionsFilters.js
Outdated
Show resolved
Hide resolved
My point is that a duplicate key would mean a result was showing up twice, since the key was using the id, which seems wrong - how could such an edge case exist? The switch to react table doesn't change that fact. |
Did you actually see any duplicate results? I assume this is a problem with the query when one average contains two singles that are shown in the results view. I can dig deeper tomorrow |
No, but I didn't look very closely/carefully. This was for displaying 3x3x3 single. If the id of a result is coming from the average, then that could explain it. But in that case, it indicates that the key needs to be updated. If moving to react table has resolved the issue, despite a duplicate key existing, then surely it's not using the key and we can remove the key (I see it's still in the code)? (And if it is using the key, then how is it not getting duplicates?) Basically, it might (currently) work, but there's definitely a (potentially minor) underlying issue somewhere, because the key isn't unique. |
We completely forgot about this one!
This already works fine if we just want to get rid of the bootstrap table. But I think we should also just invest the time and fix up the filters to get the speed boost from not rerendering the page