You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consumers need to be able to choose whether the aboveTitle slot with no content should still occupy the area designated for it or not. This behavior can be configured via a new prop, preserveAboveTitle.
References
This need is motivated by new additions to the cards family in Kolibri, such as
When the aboveTitle slot has no content, KCard still reserves the space for in the same way as if there was content. The motivation behind this is to be able to achieve consistent alignment of title when there are more cards on the same grid row.
Expected behavior
The behavior described above should still be achievable, however we have an option to configure it via a new Boolean prop, preserveAboveTitle.
If set to true and aboveTitle has no content, the slot's area should still occupy the space designated for it (current behavior).
If set to false and aboveTitle has no content, the slot's area should be completely removed. Also note that in this case, the space above the title needs to be 24px.
Since in the first several production cards the slot is not preserved, let's set the default value to false.
Acceptance criteria
Implemented as specified above
The new prop works for all layouts
The new prop is documented with JSDoc string
There are a few unit tests for it
No regressions in any of the layouts
e.g. ensure that when aboveTitle has content, it should show no matter of preserveAboveTitle value
The text was updated successfully, but these errors were encountered:
Summary
Consumers need to be able to choose whether the
aboveTitle
slot with no content should still occupy the area designated for it or not. This behavior can be configured via a new prop,preserveAboveTitle
.References
This need is motivated by new additions to the cards family in Kolibri, such as
Current behavior
When the
aboveTitle
slot has no content,KCard
still reserves the space for in the same way as if there was content. The motivation behind this is to be able to achieve consistent alignment of title when there are more cards on the same grid row.Expected behavior
The behavior described above should still be achievable, however we have an option to configure it via a new Boolean prop,
preserveAboveTitle
.If set to
true
andaboveTitle
has no content, the slot's area should still occupy the space designated for it (current behavior).If set to
false
andaboveTitle
has no content, the slot's area should be completely removed. Also note that in this case, the space above the title needs to be24px
.Since in the first several production cards the slot is not preserved, let's set the default value to
false
.Acceptance criteria
aboveTitle
has content, it should show no matter ofpreserveAboveTitle
valueThe text was updated successfully, but these errors were encountered: