Clear All repos button implementation#518
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a localized "Clear All" control to the popup’s repository selection area and wires it to clear, persist, and visually reflect an empty repository selection state, including dynamic visibility of the control based on current selections. Sequence diagram for Clear All repositories behaviorsequenceDiagram
actor User
participant PopupUI
participant PopupScript
participant BrowserStorage
User->>PopupUI: Click clearAllReposBtn
PopupUI->>PopupScript: clearAllReposBtn click event
PopupScript->>PopupScript: Set selectedRepos = []
PopupScript->>PopupScript: updateRepoDisplay()
PopupScript->>PopupScript: repoTags innerHTML placeholder
PopupScript->>PopupScript: repoCount set repoCountNone
PopupScript->>PopupScript: clearAllReposBtn add class hidden
PopupScript->>PopupScript: saveRepoSelection()
PopupScript->>BrowserStorage: storage.local.set(selectedRepos = [])
BrowserStorage-->>PopupScript: Persisted selection
PopupScript-->>PopupUI: Updated UI rendered
PopupUI-->>User: Empty selection and hidden Clear All button
Flow diagram for Clear All button visibility and state updatesflowchart TD
A[selectedRepos changed] --> B{selectedRepos length > 0}
B -- No --> C[Set repoTags placeholder]
C --> D[Set repoCount to repoCountNone]
D --> E[Add hidden class to clearAllReposBtn]
E --> F[UI shows no repositories and no Clear All button]
B -- Yes --> G[Render tags for each selected repository]
G --> H[Set repoCount with selectedRepos length]
H --> I[Remove hidden class from clearAllReposBtn]
I --> J[UI shows repositories and Clear All button]
K[User clicks clearAllReposBtn] --> L[Set selectedRepos to empty array]
L --> M[Call updateRepoDisplay]
M --> N[Call saveRepoSelection]
N --> O[Persist empty selection in storage]
O --> A
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@vedansh-5 sir thank you sir |
|
@Mateeb-Haider Thank you |
|
Thanks for the contribution! A process note. We have automatic Copilot PR reviews enabled on this repository. These reviews are only triggered if the contributor has GitHub Copilot enabled and an active license on their own account. Please enable Copilot in your GitHub settings if you have access. In many regions, free licenses are available through educational institutions or developer programs. Enabling Copilot helps us speed up the auto review process and reduces manual review overhead for the core team. |
There was a problem hiding this comment.
Pull request overview
Implements a “Clear All” control in the popup’s repository filter UI so users can remove all selected repository tags at once, with i18n support across locales.
Changes:
- Added a “Clear All” button next to the selected repository count/status area in the popup UI.
- Implemented click handling to clear
selectedRepos, re-render the selected tags, and persist the cleared selection. - Added
clearAllBtntranslations across supported locale message catalogs.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/scripts/popup.js | Adds DOM hook-up and click handler to clear selected repos; toggles button visibility based on selection count. |
| src/popup.html | Adds the “Clear All” button next to repo status/count in the repo filter UI. |
| src/_locales/en/messages.json | Adds clearAllBtn message for English. |
| src/_locales/de/messages.json | Adds clearAllBtn translation. |
| src/_locales/es/messages.json | Adds clearAllBtn translation. |
| src/_locales/fr/messages.json | Adds clearAllBtn translation. |
| src/_locales/he/messages.json | Adds clearAllBtn translation. |
| src/_locales/hi/messages.json | Adds clearAllBtn translation. |
| src/_locales/id/messages.json | Adds clearAllBtn translation. |
| src/_locales/it/messages.json | Adds clearAllBtn translation. |
| src/_locales/ja/messages.json | Adds clearAllBtn translation. |
| src/_locales/ml/messages.json | Adds clearAllBtn translation. |
| src/_locales/my/messages.json | Adds clearAllBtn translation. |
| src/_locales/nb/messages.json | Adds clearAllBtn translation. |
| src/_locales/pt/messages.json | Adds clearAllBtn translation. |
| src/_locales/pt_BR/messages.json | Adds clearAllBtn translation. |
| src/_locales/ru/messages.json | Adds clearAllBtn translation. |
| src/_locales/te/messages.json | Adds clearAllBtn translation. |
| src/_locales/uk/messages.json | Adds clearAllBtn translation. |
| src/_locales/vi/messages.json | Adds clearAllBtn translation. |
| src/_locales/zh_CN/messages.json | Adds clearAllBtn translation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mariobehling
left a comment
There was a problem hiding this comment.
Please address AI reviews or comment if not applicable.
Ok sir |
|
@mariobehling sir |
📌 Fixes
Fixes #411
📝 Summary of Changes
📸 Screenshots / Demo (if UI-related)
Before:
Users could only remove repositories one by one.
After:
A "Clear All" button is available next to the selected repository tags, allowing users to remove all selections at once.
✅ Checklist
👀 Reviewer Notes
This is a small UI enhancement focused on improving usability.
The existing functionality for removing individual repositories remains unchanged.
The "Clear All" button only resets the selected repository state and does not affect other extension settings.
Summary by Sourcery
Add a dedicated control in the popup to clear all selected repositories at once and keep the selection state and UI in sync.
New Features:
Enhancements:
Summary by Sourcery
Add a control in the popup UI to clear all selected repositories at once and keep the selection state and display in sync.
New Features:
Enhancements:
Summary by Sourcery
Add a control in the popup UI to clear all selected repositories at once and keep the selection state and display in sync.
New Features:
Enhancements: