PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
35 stars 89 forks source link

Improve author filtering #1574

Closed NishantSatere closed 1 month ago

NishantSatere commented 1 month ago

Description

Fixes #1555. Instead of redirecting the user to the bottom of the page upon filtering by author, the page should refresh and maintain its position at the top, or even better, it should redirect the user to the top where the newly filtered posts are displayed. This adjustment will enhance the user experience by allowing immediate access to the relevant, filtered content without the need to scroll up manually.

Changes

I have implemented a line of code that ensures redirection to the top of the page whenever any checkbox is toggled. This solution effectively addresses the issue by providing users with instant access to the filtered content without disrupting their browsing experience.

Screenshots

Please include concise visuals (videos, screenshots, etc.) demonstrating the code in action and the impact of changes. Many on the team use a free tool called Loom to capture and share short clips, but feel free to utilize any tool you'd like. Screenshots of the code itself can also be helpful, but are usually not necessary.

Authors checkbox video demo:

https://github.com/PolicyEngine/policyengine-app/assets/100207648/1b6d11d8-4fea-4757-a28f-f31066ce7116

Tests

Location checkbox demo:

https://github.com/PolicyEngine/policyengine-app/assets/100207648/409d9a26-ac0b-461e-b49e-2d2f6a4921d5

Topic checkbox demo:

https://github.com/PolicyEngine/policyengine-app/assets/100207648/64b4ee6a-659b-44e9-b5b4-1eebf1de72c3

anth-volk commented 1 month ago

Thanks for this contribution, @NishantSatere! Before I review, could you add a line like "Fixes #1555" to the PR description? This helps to auto-close the issue when merged. Additionally, does this address #1554? If so, please add that, as well.

NishantSatere commented 1 month ago

i have changed the description of the PR and also i am working on the issue #1554, but i have some doubts, want to discuss with you @anth-volk . How can i connect with you ?.

anth-volk commented 1 month ago

If you could send a link to an account of yours on another platform, I could send you a link to join our Slack. How does that sound to you?

MaxGhenis commented 1 month ago

Please change the description not the title. See other PRs as examples.

anth-volk commented 1 month ago

Also, to be clear, I was hoping you could add "Fixes #1555" to the description, not the title. I've made the edit accordingly.

NishantSatere commented 1 month ago

Yes, can you please send the link of slack

anth-volk commented 1 month ago

I can, but I would prefer not to send it publicly. Can you link a public account (say, LinkedIn?) where you'd be willing to receive it? Unfortunately, GitHub has no message sending feature.

NishantSatere commented 1 month ago

LinkedIn: https://www.linkedin.com/in/nishant-satere-397b77257/

anth-volk commented 1 month ago

@NishantSatere Just reached out to you there. Looking forward to chatting.