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

Fix [FEATURE] Hide repositories with zero issues with gitauto model #235

Closed

Conversation

gitauto-ai[bot]
Copy link
Contributor

@gitauto-ai gitauto-ai bot commented Jul 10, 2024

Original issue: #88

What is the feature

This feature adds an option to hide repositories with zero issues (vacancies) on the Repositories page.

Why we need the feature

Currently, users have to manually sift through repositories with no issues, which can be time-consuming and inefficient. By adding a switch to hide repositories with zero issues, we can improve the user experience by allowing users to focus only on repositories with active issues.

How to implement and why

  1. Add a Switch Component:

    • Use the react-switch component to create a toggle switch.
    • Place this switch on the Repositories page.
  2. Default State:

    • By default, the switch should be in the "off" position, meaning repositories with zero issues are hidden.
  3. Store State in localStorage:

    • Store the state of the switch in localStorage to maintain the user's preference across sessions.
  4. Query String Parameter:

    • Modify the API call to include the hide-empty query string parameter based on the switch's state.
    • Example: hide-empty=true to hide repositories with zero issues.
  5. Update UI:

    • Ensure the UI updates dynamically when the switch is toggled.
    • Fetch the repositories again with the updated query string parameter when the switch state changes.
  6. Code Changes:

    • Modify src/Pages/Repositorios.js to include the switch and handle its state.
    • Update the API call logic in src/Hooks/useFetch.js to include the hide-empty parameter based on the switch state.

By following these steps, we can ensure a seamless and efficient user experience for filtering repositories based on the number of issues.

Test these changes locally

git checkout -b gitauto/issue-#88-c456865c-53a2-49c9-ac4e-7e48c6ce422a
git pull origin gitauto/issue-#88-c456865c-53a2-49c9-ac4e-7e48c6ce422a

Copy link

The files' contents are under analysis for test generation.

@gstraccini gstraccini bot requested a review from guibranco July 10, 2024 02:14
@guibranco
Copy link
Member

@gstraccini review

Copy link
Contributor

gstraccini bot commented Jul 12, 2024

Reviewing this pull request.

Commits included:
SHA: b615a32333da010c7fc20273518015a6fbc2f4f3
! 👀

1 similar comment
Copy link
Contributor

gstraccini bot commented Jul 12, 2024

Reviewing this pull request.

Commits included:
SHA: b615a32333da010c7fc20273518015a6fbc2f4f3
! 👀

@gstraccini gstraccini bot added 🚦awaiting triage Awaiting triage 🤖 bot Issue/Pull request created by bot labels Jul 12, 2024
Copy link

Infisical secrets check: ✅ No secrets leaked!

Scan results:

6:36PM INF scanning for exposed secrets...
6:36PM INF 364 commits scanned.
6:36PM INF scan completed in 955ms
6:36PM INF no leaks found

Copy link

sonarcloud bot commented Jul 15, 2024

@guibranco guibranco closed this Jul 17, 2024
@guibranco guibranco deleted the gitauto/issue-#88-c456865c-53a2-49c9-ac4e-7e48c6ce422a branch July 17, 2024 00:32
@guibranco guibranco removed the 🚦awaiting triage Awaiting triage label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 bot Issue/Pull request created by bot size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant