Add pill radio button#1745
Conversation
|
Preview this change https://demo.audius.co/mjp-pill-radio-button |
| justify-content: center; | ||
| align-items: center; | ||
|
|
||
| /* height: 45px; */ |
There was a problem hiding this comment.
This looks great! a few callouts would love to hear your thoughts:
- Do we want to define a radio-group component?
- Are there use cases where the pill is not a radio button and just a button?
- Do we want :focus styles, like when someone tabs to the button?
- Do we want to move this to stems at some point?
- Do we want to have accessibilty options to have a better label, instead of just a number? so like it would read
5 audio,10 audioetc? there are a few options here if we wanna go there
My take: yes to all of this!
|
…into mjp-pill-radio-button
1-3 sg |
…into mjp-pill-radio-button
dylanjeffers
left a comment
There was a problem hiding this comment.
looks absolutely perfect
| [setValueState, onChange] | ||
| ) | ||
| return ( | ||
| <RadioGroupContext.Provider value={{ name, onChange: handleChange, value }}> |
There was a problem hiding this comment.
love that you added the context and everything
| name, | ||
| onChange, | ||
| children, | ||
| value: valueProp, |
There was a problem hiding this comment.
also love that we are using the valueProp rename + the useControlled
| defaultValue, | ||
| ...divProps | ||
| } = props | ||
| const [value, setValueState] = useControlled({ |
There was a problem hiding this comment.
personally like spaces between large hook blocks :)
| } | ||
| } | ||
|
|
||
| const handleChange = useCallback( |
[ccf1ca9] [C-906] Migrate queue sagas and hls-utils to common (#1805) Dylan Jeffers [fe441af] Consume new Text Button in collapsible content (#1790) Marcus Pasell [2ee3b2d] Add error UI to InProgress page of BuyAudio modal (#1802) Marcus Pasell [139e50e] Add TextButton story (#1803) Marcus Pasell [a4d26cf] Add all the pages to the BuyAudioModal (#1800) Marcus Pasell [15dfb72] Update package.json (#1801) Raymond Jacobson [284431d] [C-817] Deep link /settings on mobile (#1796) Raymond Jacobson [2b7ca95] [PAY-44] Rename getAssociatedTokenAccountInfo and getUserBank (#1794) Reed [ff07bb4] [PAY-580] Add Success Page to BuyAudio Modal (#1791) Marcus Pasell [51269bb] [C-901] Move audioPlayer to saga context (#1797) Dylan Jeffers [dfc6f08] [C-900] Move queue, lineup, feed-page sagas to common (#1795) Dylan Jeffers [4f25517] [C-897] Add explore service to saga context (#1793) Dylan Jeffers [8cc3a29] Move sagaHelpers to common (#1792) Sebastian Klingler [8ee3aa8] Add Text Button type to Stems (#1789) Marcus Pasell [ff4f913] [PAY-552] Change playllenge challenge button text (#1787) Reed [60ed26a] Fix bug with renamed component (#1788) Marcus Pasell [718f35a] Dynamically resize ModalContentPages (#1785) Marcus Pasell [4903c9f] [PAY-577] Add "in progress" page to Buy Audio Modal (#1783) Marcus Pasell [72fc4fd] Migrate queue selectors to common (#1786) Dylan Jeffers [5f3e46e] [C-871] Migrate player state to common (#1784) Dylan Jeffers [8d77abf] [PAY-476] Display error when send to wallet fails (#1780) Reed [6adbdda] [PAY-575] [PAY-574] [PAY-573] [PAY-572] [PAY-581] Coinbase Pay Button and Rewards Page Fixes (#1778) Marcus Pasell [56c3f39] [PAY-458] Buy Audio Modal Input Page (#1777) Marcus Pasell [172d6c4] Cleans up code for Challenge Twitter icon fill color (#1781) Reed [bd1a329] Fix order playlist to use updated playlist (#1774) Isaac Solo [1f178bc] [C-887] Host sourcemaps on s3, fixes cloudflare deploy (#1776) Sebastian Klingler [0551dec] [PAY-571] Move Jupiter out of bundle, attach BuyAudio sagas (#1772) Marcus Pasell [db9cd4a] [C-890] Polyfill TextEncoder, fixes builds (#1775) Dylan Jeffers [de8c73a] Update @coinbase/cbpay-js to v1.2.0 and @solana/web3.js to 1.53.0 (#1773) Marcus Pasell [bdec4b7] Add entity manager address to configInternalWeb3 (#1763) nicoback2 [d3fae31] Wire up initial BuyAudioModal (#1770) Marcus Pasell [fc5e484] Add back modal hook functionality (#1769) Marcus Pasell [ae616cc] Fix @audius/common external warnings, model imports, lint (#1767) Dylan Jeffers [2a121e4] Add entity manager address for prod env (#1766) Isaac Solo [b0c00f1] [C-875] Remove blocklist (#1764) Dylan Jeffers [859df1f] [RN Reloaded] Migrate web common/store and common/hooks to @audius/common (#1675) nicoback2 [bdd9e03] [PAY-546] Add memo instruction to final onramp transfer, fix rent min problem (#1731) Marcus Pasell [635a6ed] [PAY-431] Slide in supporters after loading (#1720) Reed [2af212a] [PAY-438] Fix Twitter icon fill color in matrix mode (#1760) Reed [bd925e1] Add pill radio button (#1745) Marcus Pasell [0392854] Remove eager discprov logs (#1762) Dylan Jeffers [b6733ef] Update @audius/sdk to 0.0.38 (#1757) Isaac Solo [a5e941e] [C-862] Add env to saga context, fix eagerDiscprov in native (#1753) Dylan Jeffers [873ed99] Remove /macro usage for typed-redux-saga (#1751) (#1755) Dylan Jeffers [ca202fe] Update playlist actions to use entity manager (#1674) Isaac Solo [48ae001] Fix margin issue (#1752) Raymond Jacobson
Description
Adds a new component that's an accessible "Pill" radio button

Currently localized to the BuyAudoModal but can easily extract to stems if we need to use elsewhere.
Dragons
Is there anything the reviewer should be on the lookout for? Are there any dangerous changes?
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
How will this change be monitored?
For features that are critical or could fail silently please describe the monitoring/alerting being added.
Feature Flags
Are all new features properly feature flagged? Describe added feature flags.