feat(factories): createShorthandFactory API update and removing HTML factories#376
feat(factories): createShorthandFactory API update and removing HTML factories#376
Conversation
|
Just additional thought. It would be really beneficial if the user can use the Slot as any other stardust component, because there will be out of the box support for styles, variables, rtl etc. Meaning in any place, where at this moment we are using div in the prototypes, we would use the Slot component. |
|
@mnajdova |
c4bb67d to
6878e49
Compare
Codecov Report
@@ Coverage Diff @@
## master #376 +/- ##
==========================================
- Coverage 88.38% 88.36% -0.03%
==========================================
Files 41 41
Lines 1421 1418 -3
Branches 206 206
==========================================
- Hits 1256 1253 -3
Misses 161 161
Partials 4 4
Continue to review full report at Codecov.
|
6878e49 to
20f5243
Compare
|
The benefit is that there will be out of the box support for styles, variables, rtl etc, which is very important. Otherwise, using divs, labels and any other HTML elements doesn't support this. I already used the Slot in some of the prototypes and I consider it really valuable from user's perspective. Not sure that now the user can use the Slot from the library as we don't export it as a regular component. |
20f5243 to
ea4f516
Compare
95044b6 to
902b447
Compare
|
In reply to @mnajdova 's comment, do we want to expose the |
a6a98f1 to
a6c2bb2
Compare
f45e641 to
0987b5b
Compare
a1d2c33 to
7a3efe4
Compare
7a3efe4 to
c51881a
Compare
# Conflicts: # src/components/Attachment/Attachment.tsx # src/components/Form/FormField.tsx # src/components/Input/Input.tsx # src/components/Slot/Slot.tsx # src/lib/factories.tsx # test/specs/components/Slot/Slot-test.ts
# Conflicts: # src/components/Chat/ChatItem.tsx # src/components/Chat/ChatMessage.tsx # src/components/Segment/Segment.tsx # src/components/Slot/Slot.tsx
levithomason
left a comment
There was a problem hiding this comment.
Merge after removing Slot.createHTMLElement() 👍
d227a54 to
47a59dc
Compare
feat(factories):
createShorthandFactoryAPI update and removing HTML factoriesThis PR focuses on:
lib/factories.tsxcreateShorthandFactoryAPI to usemappedPropas string instead ofmapValueToPropsfunctionSlot.createandSlot.createHTMLElementfunctionsTODO
API Proposal
New
The advantages of the new API is that it will create a Stardust
Slotcomponent and render it as aninputelement (seeasproperty in the usage), which means it will have all Stardust features for: