-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add an option to define a default span
of all fixed grid items via KFixedGrid
prop
#267
Comments
For the sake of simplicity and because it's just some initial thoughts, I opened this issue for |
thanks for this idea. Would you mind posting a couple screenshots of the example provided in the 'value add' section to help visualize? |
@indirectlylit Thank you, I've just posted the screenshots and also tried to update the description to be more clear |
If we wanted to be fancy, maybe we could even try something like this?
|
@sairina This is a proposal for a feature that we might implement or not, and we don't know yet exactly what API would that be, whereas learningequality/kolibri#8988 seems to be rather a bug related to the usage of the grid that's not supported and might not still be supported in the future so I don't see the clear link. What did you mean by "directly affected"? |
Oh that's helpful. I think I misunderstood this KDS proposal. I'll unlink the issues. Thanks! |
Closing since we'll have another component for cards display in a grid. |
Product
Kolibri
Desired behavior
It's possible to define a default
KFixedGridItem
'sspan
via aKFixedGrid
prop (calleditemSpan
in the following example).For example:
could be newly also defined as:
itemSpan
would be treated as a default value for all threeKFixedGridItem
'sspan
values in this grid. If there's aKFixedGridItem
with its ownspan
value defined, such value would take preference over the default value for that particular item.Current behavior
span
needs to be defined onKFixedGridItem
and if it's not defined, the item will span the full width of the gridThe Value Add
In Kolibri, we have the
CardGrid
component and use it in the following way:CardGrid
type 1CardGrid
type 2CardGrid
is responsible for defining how many cards are displayed on one row and therefore, cards components don't need to contain any layout information in regards to its mother grid, which in this case makes implementation much simpler because:span
attribute onKFixedGridItem
, with this approach there is no coupling of card components to the grid component, so any of the cards can be used easily in any of those two grid typesWhen I tried to use
KFixedGrid
/KFixedGridItem
instead ofCardGrid
/CardLink
, I found it challenging for these reasons. I think that having a possibility to define a default item span from withinKFixedGrid
would allow us to be more flexible overall and opened a way for being able to useKFixedGrid
instead ofCardGrid
.You can see Kolibri grid and cards here
Possible Tradeoffs
I am not aware of any tradeoffs since this would be an alternative way of defining layouts. Any thoughts?
The text was updated successfully, but these errors were encountered: