π Thanks for taking the time to contribute!
When thinking of contributing, the most important thing is to use your best judgement.
Knockout is maintained by volunteers whose time is limited, so the more you can do up front, the faster something will get analyzed and fixed.
This project adheres to the Contributor Covenant code of conduct. By participating, you are agreeing to uphold this code.
Have a look on StackOverflow, in the source, on gitter.im, and in the documentation, to see if someone else has already reported the issue.
Second, include as many details as possible. Good details likely include:
- Use a clear, descriptive title.
- Note the platform, browser, and library versions.
- Describe the exact steps to reproduce the problem β not necessarily just what you did but how you did it.
- Provide a specific example, preferably on a Javascript sandbox like jsFiddle, jsBin, or CodePen.
- Describe the problem observed.
- Explain the expected results.
If the issue is an enhancement, consider also including:
- Explain why it would be useful.
- List other applications that have the enhancement.
All TKO documentation lives in tko.io/src/content/docs/.
To contribute documentation:
-
Edit files in
tko.io/src/content/docs/[category]/where category is:bindings/- All binding handlersobservables/- Observable and observable array docscomputed/- Computed observable docscomponents/- Component system docsbinding-context/- Binding context and custom bindingsadvanced/- Advanced topics (lifecycle, providers, parsers)
-
Each file requires frontmatter:
--- title: Page Title ---
For section overview pages, also add sidebar metadata:
sidebar: label: Overview order: 0
-
Test locally:
cd tko.io bun run devThen visit
http://localhost:4321To test the production build and search:
bun run build bun run preview
Then visit the preview URL shown in the terminal.
-
Submit a PR with your changes
The documentation site is automatically deployed to GitHub Pages when changes are merged to main.
A good pull request might include:
- Thoughtfully worded, well-structured tests in the
spec/folder that pass for all supported browsers - Inline documentation
- Commit messages that follow the style (from Atom):
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally
- When only changing documentation, include
[ci skip]in the commit description - Consider starting the commit message with an applicable emoji:
- π¨
:art:when improving the format/structure of the code - π
:racehorse:when improving performance - π±
:non-potable_water:when plugging memory leaks - π
:memo:when writing docs - π§
:penguin:when fixing something on Linux - π
:apple:when fixing something on Mac OS - π
:checkered_flag:when fixing something on Windows - π
:bug:when fixing a bug - π₯
:fire:when removing code or files - π
:green_heart:when fixing the CI build - β
:white_check_mark:when adding tests - π
:lock:when dealing with security - β¬οΈ
:arrow_up:when upgrading dependencies - β¬οΈ
:arrow_down:when downgrading dependencies - π
:shirt:when removing linter warnings
- π¨
Do your best to mimic the local style.