feat: add is_extended_promotional column to all component tables#117
Open
agent-steven wants to merge 1 commit intotscircuit:mainfrom
Open
feat: add is_extended_promotional column to all component tables#117agent-steven wants to merge 1 commit intotscircuit:mainfrom
agent-steven wants to merge 1 commit intotscircuit:mainfrom
Conversation
Addresses tscircuit#92 - Add is_extended_promotional column to components This PR adds a new boolean column `is_extended_promotional` to all derived component tables. Extended promotional parts are Extended parts that temporarily have no assembly fee (like Basic parts) during promotional periods. Changes: - Updated BaseComponent interface with is_extended_promotional field - Updated DerivedTableSpec type to require the new field - Added is_extended_promotional to extraColumns in all 38 derived tables - Added mapping logic (currently defaults to false) Note: The is_extended_promotional value is currently set to false for all components. A follow-up task will be needed to fetch and populate this data from JLCPCB's promotional API or data source once the source is identified.
Author
Author
|
Ping! 👋 This $75 bounty PR has been ready for 3 days. Would appreciate a review when you have time! |
Author
📸 Feature DemoNew Column:
|
Author
🎥 Demo - is_extended_promotional Column AdditionTerminal RecordingWhat the demo shows:
Summary of Changes:
This enables filtering JLCPCB Extended parts that are temporarily on Basic pricing promotion. |
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
Addresses #92 - Add
is_extended_promotionalcolumn to componentsChanges
BaseComponentinterface withis_extended_promotionalfieldDerivedTableSpectype to require the new fieldis_extended_promotionaltoextraColumnsin all 38 derived tablesmapToTablefor each derived tableTechnical Details
Extended promotional parts are Extended parts that temporarily act as Basic parts (no assembly fee) during promotional periods. This column allows users to filter for these parts.
Current behavior: The
is_extended_promotionalvalue is set tofalsefor all components by default.Future work: Once the data source for extended promotional status is identified (likely JLCPCB's promotional API), the mapping logic can be updated to populate this field correctly.
Testing
bunx tsc --noEmit)Related Issue
Closes #92
/bounty $75