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

Fix User Statistics page not allowing federated filter #564

Merged
merged 3 commits into from
Mar 9, 2024

Conversation

e-five256
Copy link
Member

@e-five256 e-five256 commented Mar 8, 2024

If you navigate to /settings/stats while logged in to an account, you'll see a normal stats page for users that we use for magazines and the overall site as well.

However, if you attempt to use the dropdown that says Local and change it to Federated, the page will be reloaded and the URL will get ?withFederated=1 and the dropdown will stay Local. This is because the route and controller did not allow for setting federated status on the user stats page

This fixes the route and passes that through the controller into the stat manager, just like magazine/overall do

There might be a bit of an investigation into why it was this way. Was it just never hooked up, or was there an issue? I don't see how this would be worse than magazine or overall stats. We could go the opposite way and just remove the dropdown from the user stat page so only local statistics are possible to view


I tested this with my dev environment... which only has local posts. So although I didn't see any issues with errors, I can't tell whether the numbers would be accurate as all my content is local

@e-five256 e-five256 added the bug Something isn't working label Mar 8, 2024
@e-five256 e-five256 merged commit a114d69 into main Mar 9, 2024
7 checks passed
@e-five256 e-five256 deleted the e5/stats-user-federated branch March 9, 2024 12:58
@e-five256
Copy link
Member Author

In hindsight I probably now see why ernest just hardcoded it to local only: posts you make are always local so the federated selection always show the same stats as local

Knowing that, we could just remove the drop down completely so it's less confusing. There might be more complicated options like making the stats based off the magazine you're replying to being local or federated, because that's sort of what I expected the metric to be, how often you post to local content vs remote content, but maybe that's more confusing and just have a page of your stats is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants