markafitzgerald1 / cribbage-trainer

Two-player cribbage discard and play improvement tool.
Mozilla Public License 2.0
1 stars 0 forks source link

🤖 test(Storybook): Add SortOrderInput stories #59

Closed markafitzgerald1 closed 5 months ago

markafitzgerald1 commented 5 months ago

TODO:

markafitzgerald1 commented 5 months ago

Cause of Docs rendering of SortOrderInput not consistently setting the background color of selected radio inputs is likely multiple <input/> elements with the same id on the same 'Docs' page.

markafitzgerald1 commented 5 months ago

Cause of Docs rendering of SortOrderInput not consistently setting the background color of selected radio inputs is likely multiple <input/> elements with the same id on the same 'Docs' page.

Initial attempt to embed <input/> in <label/> to avoid explicit id and thus conflicts not resolving the visual issue with the Docs page. Will try some more to see what other possible underlying causes exist here.

markafitzgerald1 commented 5 months ago

Visual issue only occurs when more than one story and thus more than one <SortOrderInput/> rendered on same page. Cause = the name of the <input type="radio"/> elements - it's the same across all instances of <SortOrderInput/>, thus only one radio button can be selected across all radio buttons!

Fix:

markafitzgerald1 commented 5 months ago

Multiple instance of <SortOrderInput/> element selection fixed in bdfb63a8c6a9ca572f512ca018785e3a76f0af62.