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

Persist Grid/List View Selection in URL on Explore Projects Page #6756

Open
ramyaragupathy opened this issue Feb 18, 2025 · 0 comments · May be fixed by #6779
Open

Persist Grid/List View Selection in URL on Explore Projects Page #6756

ramyaragupathy opened this issue Feb 18, 2025 · 0 comments · May be fixed by #6779
Assignees
Labels
scope: frontend type: enhancement Improving an existing functionality ui/ux 👥

Comments

@ramyaragupathy
Copy link
Member

ramyaragupathy commented Feb 18, 2025

The Explore Projects page (https://tasks.hotosm.org/explore) allows users to switch between a grid view and a list view. However, the selected view mode is not captured in the URL. This means:

  • Users cannot share a link that preserves their selected view.
  • Refreshing the page resets the view to the default, instead of maintaining the previous selection.

Expected Behaviour
When a user switches between grid and list views, the URL should update accordingly. For example:
Grid View: https://tasks.hotosm.org/explore?view=grid
List View: https://tasks.hotosm.org/explore?view=list

Reloading the page should retain the selected view mode.

Steps to Reproduce

  1. Go to https://tasks.hotosm.org/explore?omitMapResults=1&status=ARCHIVED.
  2. Switch between grid view and list view using the designated icons.
  3. Observe that the URL does not update to reflect the selected view.
  4. Refresh the page and notice that the view resets.

Proposed Solution

  • Update the frontend logic to append a view query parameter (view=grid or view=list) when the toggle is used.
  • Ensure the page reads the view parameter on load and applies the correct view mode.

This change will improve usability by allowing users to bookmark and share specific views.

@manjitapandey @prabinoid @royallsilwallz

@ramyaragupathy ramyaragupathy added scope: frontend type: feature request Adding functionality that currently does not exist ui/ux 👥 type: enhancement Improving an existing functionality and removed type: feature request Adding functionality that currently does not exist labels Feb 18, 2025
royallsilwallz added a commit that referenced this issue Mar 12, 2025
- Remove redux actions / toggle states
- Replace them with route param
- Related to #6756
@royallsilwallz royallsilwallz linked a pull request Mar 12, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: frontend type: enhancement Improving an existing functionality ui/ux 👥
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants