creativecommons / creativecommons/cc-resource-archive

[Bug] The filters use URLs to display the filtered resources

Open
#270 3 comments 0 reactions 0 assignees View on GitHub
💻 aspect: code 🛠 goal: fix 🟧 priority: high 🧹 status: ticket work required
Dominant language
Dockerfile
Stars
66
Forks
137
PR merge metrics
No merged PRs in 30d

Description

## Description
While choosing any filter for the resources (for ex. `Topic = Licenses`), the url of the page gets changed from `url` to `url/all/topic=license`. So when we press the cross [x] to revert the changes, the page goes to `url/all` and not on just `url`.

## Reproduction

1. Go to the [Resource Archive](https://resources.creativecommons.org/) site
2. Click on any of the filters.
3. Click the [x] alongside your chosen filter.
4. Now the url has changed from (initially) `https://resources.creativecommons.org/` to (finally) `https://resources.creativecommons.org/all/?`

## Expectation
The filtering of resources should follow a `class-based system` and not the changing of URL. the chosen filters should be toggled as class name in the concerned resources and only those resources will be displayed.

## Screenshots

The url normally looks like:
![image](https://github.com/creativecommons/cc-resource-archive/assets/136724527/f83ec840-37af-4dfe-8368-076435988015)

After choosing a filter `Topic = Licenses`:
![image](https://github.com/creativecommons/cc-resource-archive/assets/136724527/0d0f6fcb-0013-40c4-9e9e-f44d3700c084)

Now clicking on the `[x]` alongside the chosen filter:
![image](https://github.com/creativecommons/cc-resource-archive/assets/136724527/181a5cd7-1c1d-4396-af6b-226344a99657)

## Resolution

- [x] I would be interested in resolving this bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.