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

790 ransack clear filters #936

Merged
merged 2 commits into from
Dec 6, 2024
Merged

790 ransack clear filters #936

merged 2 commits into from
Dec 6, 2024

Conversation

igorSimash
Copy link
Contributor

@igorSimash igorSimash commented Nov 2, 2024

Resolves: #790

Code reviewers

Summary of issue

There is no logic to clear filters in account/calculators, categories, products etc. pages.

Summary of change

Added button to ransack form that links user to clear (without any filters) page.
image

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

@igorSimash igorSimash requested a review from loqimean November 2, 2024 22:26
@igorSimash igorSimash changed the title added clear filters btn for ransack form 790 ransack clear filters Nov 2, 2024
@igorSimash igorSimash linked an issue Nov 2, 2024 that may be closed by this pull request
app/views/account/shared/_search_form.html.erb Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.16%. Comparing base (3bff2f0) to head (d858f3e).
Report is 90 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #936   +/-   ##
========================================
  Coverage    91.16%   91.16%           
========================================
  Files           70       70           
  Lines          973      973           
========================================
  Hits           887      887           
  Misses          86       86           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@loqimean loqimean force-pushed the develop branch 4 times, most recently from 03a3caf to 7d2dc81 Compare December 2, 2024 12:04
@SleekMutt SleekMutt merged commit bbb06b3 into develop Dec 6, 2024
5 checks passed
@SleekMutt SleekMutt deleted the 790-ransack-clear-filters branch December 6, 2024 17:15
Copy link

github-actions bot commented Dec 6, 2024

😰 RSpec failure

374 examples, 1 failure, 15 pending
Example Description Message
./spec/requests/dashboard_request_spec.rb:8 Account::DashboardController when the user is signed in GET :index returns a success response expected "\n<html lang="EN" xml:lang="en">\n\n <meta content="text/html; charset=UT...oftserve-academy">SoftServe Academy

\n \n \n\n\n\n\n" to include "hello Adriana O'Hara" Diff: @@ -1,118 +1,235 @@ -hello Adriana O'Hara + + + + + + <title>ZeroWaste</title> + + + + + + + <script type="importmap" data-turbo-track="reload">{ + "imports": { + "@rails/request.js": "/assets/requestjs-24f0bfeb89309154df2f9632869e41d6d8bb4cac1fc34c9d11c13a9e77c1594d.js", + "application": "/assets/application-7eddd099edfddf660d70443eb9ba8d2787176c1c517ab08403f88dcbc5733866.js", + "@hotwired/turbo-rails": "/assets/turbo.min-4cfe7c6aaeb9120821760aa53763dff54fbc561e500da6482fc43c54c7384929.js", + "@hotwired/stimulus": "/assets/stimulus.min-dd364f16ec9504dfb72672295637a1c8838773b01c0b441bd41008124c407894.js", + "@hotwired/stimulus-loading": "/assets/stimulus-loading-3576ce92b149ad5d6959438c6f291e2426c86df3b874c525b30faad51b0d96b3.js", + "bootstrap": "https://ga.jspm.io/npm:[email protected]/dist/js/bootstrap.esm.js", + "@fortawesome/fontawesome-free": "https://ga.jspm.io/npm:@fortawesome/[email protected]/js/all.js", + "@popperjs/core": "https://ga.jspm.io/npm:@popperjs/[email protected]/lib/index.js", + "@rails/actioncable": "/assets/actioncable.esm-b66d83871f0a453b10ba8b4c147c2bafa655caaa5d13fa34e9bf361c1c2aedb7.js", + "toastify-js": "https://ga.jspm.io/npm:[email protected]/src/toastify.js", + "controllers/application": "/assets/controllers/application-e4006907e21e3ab0126280bc32522cbb5d89e1857b64cf4849b7e5c01ea3313a.js", + "controllers/burger_controller": "/assets/controllers/burger_controller-870db91e6265c7aa30485233ce0d9bda529e2af4df406ec2f2bed53415d04192.js", + "controllers/handle_browser_tab_controller": "/assets/controllers/handle_browser_tab_controller-e11f96a604b2fe7ed3817d5ebd65e640c96fb8b0db283af04ea07c80f5dca9af.js", + "controllers": "/assets/controllers/index-2db729dddcc5b979110e98de4b6720f83f91a123172e87281d5a58410fc43806.js", + "controllers/input_child_info_controller": "/assets/controllers/input_child_info_controller-bc2c3695ea86735c0c9208f4863ad2a71d3fb596404bdfdfe448d1d8c999db92.js", + "controllers/loader_controller": "/assets/controllers/loader_controller-7a507ee98dd905e8d61a38fcaa989c21cb190bdfc4153a52d0ea076e56f31c8b.js", + "controllers/mhc_calculator_controller": "/assets/controllers/mhc_calculator_controller-7422f9f94a3862bbafa4b4e317b3d9b2fe8aafa7485e78bd7395712c594202a6.js", + "controllers/pad_results_controller": "/assets/controllers/pad_results_controller-132569700074d16be4e234899e5c50e7c456b0ee90925889733e2f0aa044a863.js", + "controllers/password_visibility_controller": "/assets/controllers/password_visibility_controller-56136c51d047bf89c62823c6c4e73a39f6078b6b68697c6a7957925d9e931338.js", + "controllers/price_form_controller": "/assets/controllers/price_form_controller-24511bb5bf60d7f35ffb294c01bf72c4aceb114cff7f693d224cc83324b61fb8.js", + "controllers/results_controller": "/assets/controllers/results_controller-7a66b276ba7b35cc764c665cfc75429fb25a173b12acf2c919c60e6c1ae39dca.js", + "controllers/stimulus_application": "/assets/controllers/stimulus_application-a665f2d36152acf808833a9ef11a086df76940fdb55882475e3879268a358dab.js", + "channels/consumer": "/assets/channels/consumer-b0ce945e7ae055dba9cceb062a47080dd9c7794a600762c19d38dbde3ba8ff0d.js", + "channels": "/assets/channels/index-5245f8c2362983a98c8558936d9e6323ca952cfe4782e687c2f4814bc91fe950.js", + "turbo_streams/toast": "/assets/turbo_streams/toast-95c79ed45ef982219f2f014c34ab48a75f8edeaa752d536eb883668556d65d5d.js", + "helpers/toast_helper": "/assets/helpers/toast_helper-21ace87fd72963f90bf26ee52da478f20c27509aca5dfe40b51928183d3fb7f8.js" + } +}</script> + + + + + + + + + +<script src="/assets/es-module-shims.min-4ca9b3dd5e434131e3bb4b0c1d7dff3bfd4035672a5086deec6f73979a49be73.js" async="async" data-turbo-track="reload"></script> +<script type="module">import "application"</script> + + + + +
+
+ + ZeroWaste logo +
+ +
+ +
+ +
+ + +
+ + + + +
+
+
+ + +
+

hello Adriana O'Hara

+
+ +
+
+

© 2024 Zero Waste Lviv

+

Created with by SoftServe Academy

+
+
+ + + +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Search bar] Default state is not performed after reloading the page
4 participants