Skip to content
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

KCardGrid part 3: Add advanced grid configuration and loading skeletons #796

Merged
merged 15 commits into from
Nov 8, 2024

Conversation

MisRob
Copy link
Member

@MisRob MisRob commented Oct 4, 2024

Description

Adds new features to KCardGrid:

  • Option to override base layouts partially or completely via the new prop layoutOverride
  • Loading skeletons and a way to configure them via the new prop skeletonsConfig
    • New development-only debug prop to help with skeletons configuration

These APIs were previously discussed and agreed on during the beta stage.

See commit messages for details.

Changelog

  • Description: Adds an option to override KCardGrid base layouts partially or completely via the new prop layoutOverride

  • Products impact: new API

  • Addresses: Allows advanced grids customization

  • Components: KCardGrid

  • Breaking: no

  • Impacts a11y: no

  • Guidance: -

  • Description: Adds loading skeletons to KCardGrid and a way to configure them via the new prop skeletonsConfig

  • Products impact: new API

  • Addresses: Ensures smooth loading experience

  • Components: KCardGrid

  • Breaking: no

  • Impacts a11y: no

  • Guidance: -

Steps to test

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical and brittle code paths are covered by unit tests - will do as follow-up
  • The change is described in the changelog section above

Reviewer guidance

  • Is the code clean and well-commented?
  • Are there tests for this change?
  • Are all UI components LTR and RTL compliant (if applicable)?
  • Add other things to check for here

Comments

I got stuck on some issues with mocking composables in KDS that prevented me from completing unit tests. This is being discussed and I plan to follow-up later, together with some other maintenance tasks I am going to do.

@MisRob MisRob force-pushed the k-card-grid-5 branch 8 times, most recently from 76ccd79 to c1debf5 Compare October 6, 2024 20:12
MisRob added 2 commits October 6, 2024 22:13
This simplifies config object format and related language
around breakpoints. Prepares ground for `layoutOverride`
and `skeletonsConfig` public API that will have the same
format.
MisRob added 6 commits October 6, 2024 22:32
Also removes progressive loading experience
from card placeholder since loading state is now
handled by loading skeletons and the previous
logic causes unneccessary hiccup when the placeholder
is displayed very briefly before the image.
to simpler name that's also consistent
with the other grid composable's name.
and remove duplicate value.
to allow text in <code> tag be wrapped.
@MisRob MisRob changed the title [WIP] KCardGrid part 3: Add advanced grid configuration and loading skeletons KCardGrid part 3: Add advanced grid configuration and loading skeletons Oct 6, 2024
@MisRob MisRob added the TODO: needs review Waiting for review label Oct 6, 2024
@MisRob MisRob marked this pull request as ready for review October 6, 2024 20:39
@MisRob
Copy link
Member Author

MisRob commented Oct 7, 2024

For code reviewers, I don't think you need to review the large diff on documentation pages - rather just preview the generated documentation. One of the maintenance tasks I am planning to do in a follow-up PR is to break doc pages and examples to sub-components internally so it's easier to updated in the future.

@rtibbles rtibbles self-assigned this Oct 8, 2024
@MisRob MisRob requested a review from nucleogenesis October 8, 2024 15:53
@MisRob
Copy link
Member Author

MisRob commented Oct 8, 2024

Linking feedback from designers - Slack thread

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main question is just about the form of the layout overrides.

lib/cards/KCardGrid.vue Show resolved Hide resolved
lib/cards/KCardGrid.vue Show resolved Hide resolved
lib/cards/KCardGrid.vue Show resolved Hide resolved
@MisRob MisRob requested a review from rtibbles October 10, 2024 17:50
@MisRob
Copy link
Member Author

MisRob commented Oct 15, 2024

Latest updates

I think this is all I could complete here at this point. We still need to decide on #796 (comment) - I will leave to @rtibbles's consideration whether it's blocking or if it can be addressed as a follow-up if we figure out some changes are needed.

@rtibbles
Copy link
Member

I don't think my comments here are blocking - I think by using the grid and skeletons in practice, we may discover that there are some sensible defaults we end up using, and the more advanced props format doesn't matter as much as it is rarely used - or we come up with a brainwave of a better way.

@marcellamaki marcellamaki added this to the KCard 2.0 and KCardGrid milestone Oct 21, 2024
@MisRob
Copy link
Member Author

MisRob commented Nov 8, 2024

All is ready from my side @rtibbles

Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I say we merge this, get it into an RC and take the API for a few practice laps!

@MisRob MisRob merged commit 16f5c33 into learningequality:develop Nov 8, 2024
8 checks passed
learning-equality-bot bot pushed a commit that referenced this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants