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
"Stacked" Filter Issue on Satistics Page #995
Comments
FYI. I can reproduce this issue. EDIT: It does remove some of the "stacked" entries when unticking the box, but not all. |
React docs say don't generate the The key is being generated while rendering here stacker.news/pages/satistics/index.js Line 260 in 54bbb0c
|
hmm... maybe we are getting funny data from this query and so Apollo isn't able to integrate here's what i'm seeing: first, i added a now, i've i logged to the console from the render function and we can see in |
I suspect this is an issue with apollo client cache, because this doesn't persist on refresh. It could be a This doesn't mean they that they can't be constructed from deterministic values afaik. It just means for the same item in the list it needs to have the same |
I think you're right. So i tried this: From a cold boot of the app & hard refresh of the page: I went to I refreshed the page and was given 5 elements, 2 have matched "key":
I think you're right. Also, I've only been able to get this duplicated key error in the inspector through messing with I think Apollo uses the |
Yep, this is the problem! That id needs to be unique for the apollo cache to work. We should be able to define a custom id function for it. I think it's just adding a new type policy:
Untested but I reckon that's what we'd do. |
closes stackernews#995 enables apollo cache to work for 'stacked' 'spent' in /statistics page.
closes stackernews#995 enables apollo cache to work for 'stacked' 'spent' in /statistics page.
That worked! |
closes #995 enables apollo cache to work for 'stacked' 'spent' in /statistics page.
@mateusdeap do you have a lightning address I can send |
I'm a bit new to this, would my lightning address on stacker news suffice? If so: mateusdeap@stacker.news |
It should |
Description
Based on the report by SN user Onions here.
On the satistics page, deselecting all filters, including the
stacked
filter, results in the display of data for thestacked
type (see evidence bellow), contrary to the expected behavior of no data presentation.Notably, accessing the satistics page directly from the link https://stacker.news/satistics?inc= correctly shows an empty result, indicating that the issue is in the behavior of selecting/deselecting the filters.
Steps to Reproduce
stacked
filter.stacked
type.Expected behavior
When all filters, including the
stacked
filter, are simultaneously deselected on the satistics page, no data should be displayed.Screenshots
Impact
This inconsistency in the display of data based on filter selection may lead to confusion among users and compromise the reliability of the satistics page.
The text was updated successfully, but these errors were encountered: