-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Preset and add creation #1015
base: main
Are you sure you want to change the base?
Preset and add creation #1015
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeSelectModal
and StreamModal
are always used as a pair, so I packaged them as a pair for ease of use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked the style of the add stream button on the home page and wanted to use it elsewhere, so I've packaged it into this component
9b93cab
to
49ffd03
Compare
<> | ||
<Modal className="streams-modal" onClose={onClose}> | ||
<Modal onClose={onClose}> | ||
<Card className="type-select-card"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class wasn't declared in any CSS so I removed it
49ffd03
to
9ed8b27
Compare
Recording.2025-01-16.135310.mp4Recording.2025-01-16.135434.mp4 |
I think the flow for the stream creation makes a lot of sense. Unsure about the presets. After a preset is created there really isn't any point in running it since it will partially update the amplipi to the same state that it is already in. |
7e01cfd
to
259e28e
Compare
@@ -118,6 +121,8 @@ const PresetsModal = ({ onClose }) => { | |||
<div className="presets-modal-header">Select Preset</div> | |||
<div className="presets-modal-body"> | |||
<List>{presetItems}</List> | |||
<RectangularAddButton onClick={() => {setCreateModalOpen(true); onClose();}} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed @linknum23's concerns by adding the onClose function to preset creation via the preset select modal, now the selection modal will close as soon as the creation modal opens, and so you do not have to close multiple modals to either abort or approve this line of action
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1015 +/- ##
==========================================
- Coverage 50.67% 49.81% -0.86%
==========================================
Files 40 41 +1
Lines 7154 7303 +149
==========================================
+ Hits 3625 3638 +13
- Misses 3529 3665 +136
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ls into the components folder and reuse them on the home page
259e28e
to
cd63887
Compare
What does this change intend to accomplish?
Closes #707
Moved stream and preset creation workflows to the components folder, then spread them to relevant places (preset creation on presets settings page and presets modal on home page, stream creation in all places streams can be selected)
Checklist
./scripts/test