fix: dual-mode VIP wedge visibility and snatched item disabling#29
Merged
fix: dual-mode VIP wedge visibility and snatched item disabling#29
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refines the dual-select (book + audiobook) flow by tightening FL wedge toggle visibility (especially for VIP torrents) and preventing selection/download of already-snatched items, aligning dual-mode behavior with single-mode behavior.
Changes:
- Hide FL wedge toggles for VIP torrents (desktop dual list + mobile bottom sheet) and consolidate wedge-visibility logic.
- Prevent snatched items from being selectable in dual-select UI, and add handler-level guards to block snatched selections/downloads.
- Remove unused
DualDownloadButtoncomponent and bump version to2.5.3.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Version bump to 2.5.3. |
app/page.jsx |
Adds guards to prevent selecting/downloading snatched items in dual mode. |
app/components/SearchResultItem.jsx |
Blocks click/keyboard selection for snatched items and applies disabled styling in selectable mode. |
app/components/DualSearchResultsList.jsx |
Centralizes wedge visibility logic; hides wedges for VIP/snatched; simplifies header layout. |
app/components/MobileBottomSheet.jsx |
Hides wedge toggles for VIP torrents in dual flow on mobile. |
app/components/DualDownloadButton.jsx |
Removed unused component. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…h PropType Derive effective wedge values at request time to ensure wedges are only purchased for eligible items (not already freeleech, VIP, or snatched), preventing waste when wedge state persists across selection changes. Also add freeleech to resultShape PropTypes in dual-mode components for consistency with SearchResultItem and complete data-shape validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DualSearchResultsList) and mobile (MobileBottomSheet) dual flows.showBookWedge,showAudiobookWedge) and removed an unnecessary separator in the dual-mode header.opacity-50,cursor-not-allowed), non-interactive (no click/keyboard handlers), and guarded at the handler level (handleSelectBook,handleSelectAudiobook,handleDualDownload).Changes
app/components/SearchResultItem.jsxapp/page.jsxapp/components/DualSearchResultsList.jsxapp/components/MobileBottomSheet.jsxapp/components/DualDownloadButton.jsxpackage.json