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

Add clear filters button #148

Closed
AetherUnbound opened this issue Jun 26, 2022 · 10 comments · Fixed by #256
Closed

Add clear filters button #148

AetherUnbound opened this issue Jun 26, 2022 · 10 comments · Fixed by #256
Labels
frontend Related to the frontend/client-side good first issue Good for newcomers hacktoberfest Good hacktoberfest issues

Comments

@AetherUnbound
Copy link
Collaborator

It would be rad to have a "clear filters" button on the frontend search page, which would just clear the filters in the webpage (not actually submit a new search).

@AetherUnbound AetherUnbound added frontend Related to the frontend/client-side good first issue Good for newcomers labels Jun 26, 2022
@Krish-bhardwaj
Copy link

Hi @AetherUnbound can you assign me this issue and guide me on how to solve this. I am new to open source contributions allow me to solve this problem if possible .

@AetherUnbound
Copy link
Collaborator Author

@Krish-bhardwaj Absolutely! Thank you for offering 🙌🏼 If you have any questions about setting up the dev stack, check out our README.md. I'm happy to email you the sample data we use; we should have some checked into the repo but we haven't done that yet (made #151 to track that).

Here are a few other similar PRs that added functionality to the filter pane: #90, #91, #93.

I think this will primarily involve the frontend, as we only need a button in the filter pain that will clear all the current selections. This will probably mean some javascript to remove the current form values - since this is the "list officers" page, whatever JS that's needed should probably go here: https://github.com/OrcaCollective/OpenOversight/blob/main/OpenOversight/app/static/js/list_officer.js

Similarly, this template should have all of the form fields that need to be manipulated: https://github.com/OrcaCollective/OpenOversight/blob/main/OpenOversight/app/templates/list_officer.html

I think that's all that should be involved - if you would like any more context or if there's anything I can elaborate on more, please let me know!

@gabrielcannes
Copy link

Hi @AetherUnbound I tried to run this project locally to take a shot at this issue (first time trying to contribute to another repository) but I could not get the list_officer.html to run locally with the CSS.
Another problem is that for some reason my function OnClick in the newly added clear button its not been triggered (the syntax is correct because it worked on the developer tools inside the browser). Is there any configuration that I need to do before running this project locally?

@Krish-bhardwaj Krish-bhardwaj removed their assignment Jun 30, 2022
@AetherUnbound
Copy link
Collaborator Author

@gabrielcannes I'm sorry to hear that! I think some of this might be related #151, were you loading any initial data when running locally? I will work on getting a fix for that in today so that mock data is available for testing!

@gabrielcannes
Copy link

@AetherUnbound what do you mean by inicial data?

@AetherUnbound
Copy link
Collaborator Author

@gabrielcannes I've just added some initial data as part of #152, do you mind checking out that branch and seeing if it works? Instructions for setting up the development environment can be found here: https://github.com/OrcaCollective/OpenOversight#development (if you're on the #152 branch, skip step 2)

@gabrielcannes
Copy link

@AetherUnbound thank you, I'll look into it.

@AetherUnbound
Copy link
Collaborator Author

Awesome, let me know if you run into any more trouble!

@gabrielcannes
Copy link

Hi @AetherUnbound I don't think I understood correctly. I installed "just" and tried to run the command just fresh-start and I getting this error:

docker-compose --file=docker-compose.yml --file=docker-compose.dev.yml up -d error: Recipe up could not be run because just could not find the shell: program not found

I think is because I didn't do the second step correctly because I don't know where should I paste the init_data.csv.

Could you please tell me where should I paste the init_data.csv?

Thanks in advance!

@AetherUnbound
Copy link
Collaborator Author

Dang! Couple questions for you:

  1. Are you on Windows by chance? If so, you may need to try running this via Windows Subsystem for Linux
  2. I've just merged Add sample data for initialization #152, do you mind running git checkout main && git pull and trying once more? You shouldn't need to move any files under the new setup!

Let me know if that doesn't work!

@AetherUnbound AetherUnbound added the hacktoberfest Good hacktoberfest issues label Oct 2, 2022
@sea-kelp sea-kelp mentioned this issue Dec 6, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Related to the frontend/client-side good first issue Good for newcomers hacktoberfest Good hacktoberfest issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants