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

KCheckbox description prop, simplified logic around slot vs label showing #199

Conversation

nucleogenesis
Copy link
Member

@nucleogenesis nucleogenesis commented Mar 18, 2021

Description

Issue addressed

Fixes #35

I also thought that the v-if-else block there was weird because if I gave both a slot and a label it would show neither - so I picked one to be the override.

Now if you give a slot and a label you'll see what is passed to the slot - if you don't give a slot it's expected you give a label.

Before/after screenshots

Before
screenshot-localhost_8000-2021 03 18-14_44_52
After
screenshot-localhost_8000-2021 03 18-14_39_20

Steps to test

  1. yarn link kolibri-design-system in your kolibri local repo
  2. Checkout this PR in kolibri-design-system repo
  3. Run Kolibri dev server
  4. Find an instance of KCheckbox in the code and find it in the app itself
  5. Add a description prop with a value.

At a high level, how did you implement this?

Added the prop and updated the template to display it properly - basically stole the whole thing from KRadioButton.

Does this introduce any tech-debt items?

Nope.

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

@nucleogenesis nucleogenesis requested a review from sairina March 18, 2021 21:50
Copy link
Contributor

@sairina sairina left a comment

Choose a reason for hiding this comment

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

LGTM! Manually tested.

@sairina sairina merged commit 004e82d into learningequality:v0.2.x Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add 'description' prop to KCheckbox
2 participants