Added unsubscribe feature UI #15

Merged
anna-st-40 merged 24 commits from unsubscribe into main 2025-04-18 18:27:27 -04:00
anna-st-40 commented 2025-04-18 17:38:39 -04:00 (Migrated from github.com)
No description provided.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-04-18 17:39:28 -04:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR introduces an unsubscribe feature UI along with several context and modal updates to support new email sender actions. Key changes include:

  • Adding a clearSelectedSenders method to the selected senders context.
  • Implementing an unsubscribe flow in the modal with new components and updated action hooks.
  • Updating provider imports and global context wrapping for consistency.

Reviewed Changes

Copilot reviewed 29 out of 33 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/providers/selectedSendersContext.tsx Added clearSelectedSenders to allow resetting sender selection.
src/providers/modalContext.tsx Updated modal state types to accommodate new unsubscribe states.
src/providers/allGlobalProviders.tsx Wrapped providers with a new ActionsProvider for action management.
src/providers/actionsContext.tsx Introduced ActionsProvider using a mode flag for mocking.
src/components/toggleSwitch.tsx New toggle switch component introduced for unsubscribe options.
src/components/sendersContainer.tsx Updated import path for senders context.
src/components/senderLine.tsx Updated sender selection logic; now relies on context state for UI.
src/components/modalPopup.tsx Added unsubscribe flow logic including confirm, pending, continue, success, and error states.
src/components/actionButton.tsx Updated provider imports and UI text for unsubscribe vs delete actions.
src/App.tsx Updated global providers import to use the new providers folder.
project-managment/epics.md Added epic descriptions to align with new unsubscribe feature.
playwright.config.ts Added Playwright configuration for UI tests.
jest.config.cjs Removed unused Jest configuration.
.github/workflows/* Added/updated CI pipeline and Playwright workflow configurations.
Files not reviewed (4)
  • jest.config.json: Language not supported
  • package.json: Language not supported
  • src/components/modalPopup.css: Language not supported
  • src/components/toggleSwitch.css: Language not supported
Comments suppressed due to low confidence (1)

src/components/senderLine.tsx:15

  • [nitpick] The local state 'isSelected' is maintained although the rendering now relies solely on the 'selectedSenders' from context. Consider removing this redundant state to prevent potential inconsistencies.
const [isSelected, setIsSelected] = useState<boolean>(false);
## Pull Request Overview This PR introduces an unsubscribe feature UI along with several context and modal updates to support new email sender actions. Key changes include: - Adding a clearSelectedSenders method to the selected senders context. - Implementing an unsubscribe flow in the modal with new components and updated action hooks. - Updating provider imports and global context wrapping for consistency. ### Reviewed Changes Copilot reviewed 29 out of 33 changed files in this pull request and generated 1 comment. <details> <summary>Show a summary per file</summary> | File | Description | | --------------------------------------- | ------------------------------------------------------------- | | src/providers/selectedSendersContext.tsx | Added clearSelectedSenders to allow resetting sender selection. | | src/providers/modalContext.tsx | Updated modal state types to accommodate new unsubscribe states. | | src/providers/allGlobalProviders.tsx | Wrapped providers with a new ActionsProvider for action management. | | src/providers/actionsContext.tsx | Introduced ActionsProvider using a mode flag for mocking. | | src/components/toggleSwitch.tsx | New toggle switch component introduced for unsubscribe options. | | src/components/sendersContainer.tsx | Updated import path for senders context. | | src/components/senderLine.tsx | Updated sender selection logic; now relies on context state for UI. | | src/components/modalPopup.tsx | Added unsubscribe flow logic including confirm, pending, continue, success, and error states. | | src/components/actionButton.tsx | Updated provider imports and UI text for unsubscribe vs delete actions. | | src/App.tsx | Updated global providers import to use the new providers folder. | | project-managment/epics.md | Added epic descriptions to align with new unsubscribe feature. | | playwright.config.ts | Added Playwright configuration for UI tests. | | jest.config.cjs | Removed unused Jest configuration. | | .github/workflows/* | Added/updated CI pipeline and Playwright workflow configurations. | </details> <details> <summary>Files not reviewed (4)</summary> * **jest.config.json**: Language not supported * **package.json**: Language not supported * **src/components/modalPopup.css**: Language not supported * **src/components/toggleSwitch.css**: Language not supported </details> <details> <summary>Comments suppressed due to low confidence (1)</summary> **src/components/senderLine.tsx:15** * [nitpick] The local state 'isSelected' is maintained although the rendering now relies solely on the 'selectedSenders' from context. Consider removing this redundant state to prevent potential inconsistencies. ``` const [isSelected, setIsSelected] = useState<boolean>(false); ``` </details>
@ -1,15 +1,241 @@
import "./modalPopup.css";
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-04-18 17:39:28 -04:00

The 'toBlock' state is declared without destructuring its value and setter. Change it to 'const [toBlock, setToBlock] = useState(false);' so that the boolean value can be properly used when checking whether to block the sender.

  const [toBlock, setToBlock] = useState(false);
The 'toBlock' state is declared without destructuring its value and setter. Change it to 'const [toBlock, setToBlock] = useState(false);' so that the boolean value can be properly used when checking whether to block the sender. ```suggestion const [toBlock, setToBlock] = useState(false); ```
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
InboxWhiz/gmail-declutter-extension!15
No description provided.