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

Docs: Improve KTextbox component documentation with examples #604

Merged

Conversation

GarvitSinghal47
Copy link
Contributor

Fixes #596

Description

This pull request enhances the documentation of our component by adding initial examples for selected props. Not all variations are included, but we've added examples for 'invalid' and 'invalidText' with notes for user guidance, 'disabled', 'number' with 'min' and 'max' attributes, 'textarea', and 'label'. This improvement aims to make the component documentation more comprehensive and user-friendly. Further updates and discussions on additional examples can be made after these initial changes.

Changelog

  • [#PR no]
    • Description: Add initial examples for selected props in component documentation
    • Products impact: none
    • Addresses: none
    • Components: Documentation
    • Breaking: no
    • Impacts a11y: no
    • Guidance: These changes enhance the documentation by providing initial examples for selected props. Further updates and discussions can be conducted after these initial changes.

Steps to test

  1. Navigate to the component documentation.
  2. Look for examples provided for the mentioned props: 'invalid', 'invalidText', 'disabled', 'number', 'textarea', and 'label'.
  3. Verify that the examples are correctly displayed and include any necessary guidance notes.

Implementation notes

At a high level, how did you implement this?

These changes involve updating the documentation markdown files to include examples for the selected props.

Does this introduce any tech-debt items?

No, these changes do not introduce any tech debt items.

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)?

After review

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

Comments

@MisRob
Copy link
Member

MisRob commented Apr 1, 2024

Thank you, @GarvitSinghal47. Could you retarget to release-v4 branch?

@MisRob MisRob requested a review from nucleogenesis April 1, 2024 04:58
@MisRob MisRob added the TODO: needs review Waiting for review label Apr 1, 2024
@GarvitSinghal47 GarvitSinghal47 changed the base branch from develop to release-v4 April 5, 2024 19:56
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

Thank you @GarvitSinghal47 this is great. I left a couple comments and only one is blocking re: adding a note about the focus-ability of disabled inputs.

Also looks like the linter found something as well.

docs/pages/ktextbox.vue Outdated Show resolved Hide resolved
docs/pages/ktextbox.vue Show resolved Hide resolved
@MisRob
Copy link
Member

MisRob commented Apr 15, 2024

Thanks both @GarvitSinghal47 and @nucleogenesis, looking great and good suggestions.

This is nothing blocking, just a suggestion for possible improvement. I think it's always helpful to show how code for examples look like. Demonstration of this can be seen in some newer documentation pages, e.g. that of for KImg. KDS system has a documentation component for this purpose ready - you can see how <DocsShowCode language=...> is being used

Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

The latest changes LGTM! Love seeing the code examples there :) thanks Garvit -- I'll leave it to @MisRob to decide when to merge from here.

docs/pages/ktextbox.vue Outdated Show resolved Hide resolved
@MisRob
Copy link
Member

MisRob commented Apr 24, 2024

Thanks both, it's looking great overall. Just one last thing before we merge.

Co-authored-by: Michaela Robosova <[email protected]>
@GarvitSinghal47 GarvitSinghal47 requested a review from MisRob April 24, 2024 16:15
Copy link
Member

@MisRob MisRob left a comment

Choose a reason for hiding this comment

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

Thanks @GarvitSinghal47 and @nucleogenesis, this is a valuable improvement of the documentation

@MisRob MisRob merged commit 4f8977a into learningequality:release-v4 Apr 25, 2024
8 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.

Add examples to KTextbox documentation
3 participants