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

Complete KImg #538

Merged
merged 8 commits into from
Feb 27, 2024
Merged

Complete KImg #538

merged 8 commits into from
Feb 27, 2024

Conversation

MisRob
Copy link
Member

@MisRob MisRob commented Jan 31, 2024

Description

Completes the implementation of the new KImg component.

Note there are minor deviations from the original specification, namely:

  • placeholderColor prop renamed to backgroundColor
    • Since the color in not used solely for the placeholder area but also as the background color of the letterbox
  • kolibriFly prop not implemented
    • Since this logic is now provided by the KLogo component
  • default and placeholder slot merged only into one slot, placeholder
    • I originally suggested having two but after thinking about it again, it seemed to be slightly confusing to me so I simplified it
  • extra #topLeft, #topRight, #bottomLeft, and #bottomRight slots
    • I added these slots in support of the upcoming KCard work. I am not entirely sure if they will be needed, because recently I noticed we actually don't place content over card thumbnail images in the new card designs. But since the card designs are WIP and it won't harm anything, I am leaving the slots here for now. They won't be exposed in KCard if it's not in the designs.

Issue addressed

Changelog

  • #538
    • Description: Complete KImg implementation
    • Products impact: new API
    • Addresses: KImg Component #368
    • Components: KImg
    • Breaking: no
    • Impacts a11y: yes
    • Guidance: One of the benefits of using KImg is that it throws a11y related warnings

Steps to test

  • Since this work completes KImg, please review the component code and documentation page as a whole (plus it'd be quite meaningless to focus on checking the PR diff anyways as I needed to tweak previous code to support new features and we don't really use this component anywhere yet). Read KImg Component #368 and linked issues for expected API.

  • Is the documentation page clear? https://deploy-preview-538--kolibri-design-system.netlify.app/kimg/

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
  • 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

After review

  • The changelog item has been pasted to the CHANGELOG.md

@MisRob MisRob changed the title Add new features to KImg Complete KImg Jan 31, 2024
@MisRob MisRob force-pushed the kimg-scaling branch 5 times, most recently from ac800c3 to 77c1423 Compare February 1, 2024 13:38
@MisRob MisRob marked this pull request as ready for review February 1, 2024 14:07
@MisRob MisRob added the TODO: needs review Waiting for review label Feb 1, 2024
Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

This looks fantastic, @MisRob - the documentation is so clear, and the KImg file itself is also really easy to read. I would love to hear @akolson's thoughts as I know he did some of the speccing with you, so he may have a few additional notes or insights that I don't. But, for me, I don't see any blockers and I really appreciate you pushing on this to get it merged.

@AllanOXDi - no need to formally review here but I think if you read through, and ask any questions you have about the code as you do, this will be some helpful foundational context for the KCard work that is upcoming, as they are related :)

Copy link
Member

@akolson akolson left a comment

Choose a reason for hiding this comment

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

HI @MisRob! This looks really amazing. The component is so well documented and implemented in the simplest possible way❤️ . No further comments -- I can't wait to see it in action. Thanks

@MisRob
Copy link
Member Author

MisRob commented Feb 16, 2024

Thanks both, that's kind. We have a co-review planned next week with @AllanOXDi. If all goes well, I will merge after that.

@MisRob
Copy link
Member Author

MisRob commented Feb 27, 2024

I'll merge so it's available for components that need it. @AllanOXDi we can still co-review later on when there's more time.

@AllanOXDi
Copy link
Member

Sure! I am available for co rearview.

@MisRob MisRob merged commit 99d8195 into learningequality:release-v3 Feb 27, 2024
4 checks passed
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.

4 participants