Thanks for your interest in contributing to the Ionic Framework! 🎉
Please see our Contributor Code of Conduct for information on our rules of conduct.
If you have a question about using the framework, please ask on the Ionic Forum or in the Ionic Discord.
It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with “needs: reply” and receives no further replies from the author of the issue for more than 14 days, it will be closed.
If you think you have found a bug, or have a new feature idea, please start by making sure it hasn’t already been reported. You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
Next, create a new issue that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
A code reproduction is a small application that is built to demonstrate a particular issue. The code reproduction should contain the minimum amount of code needed to recreate the issue and should focus on a single issue.
A code reproduction of the issue you are experiencing helps us better isolate the cause of the problem. This is an important first step to getting any bug fixed!
Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. In other words, creating a code reproduction of the issue helps us help you.
blank
starter application is a great choice for this. You can create one using the following Ionic CLI command: ionic start myApp blank
To contribute on Windows, do the following:
Configure VS Code to read/save files using line breaks (LF) instead of carriage returns (CRLF). Set it globally by navigating to: Settings -> Text Editor -> Files -> Eol. Set to \n
.
.vscode/settings.json
:
{ "files.eol": "\n" }
core.autocrlf
is set to false
: run git config -l | grep autocrlf
. Switch it to false using: git config --global core.autocrlf false
.ionic-framework
repo, the files may already be cached as LF. To undo this, you need to clean the cache files of the repository. Run the following (make sure you stage or commit your changes first): git rm --cached -r .
then git reset --hard
.Before creating a pull request, please read our requirements that explains the minimal details to have your PR considered and merged into the codebase.
Note: We appreciate you taking the time to contribute! Before submitting a pull request, please take the time to comment on the issue you are wanting to resolve. This helps us prevent duplicate effort or advise if the team is already addressing the issue.
npm install
to install dependencies for this package./core/src/components/
.npm start
from within the core
directory.http://localhost:3333/
.?rtl=true
at the end of the url; for example: http://localhost:3333/src/components/alert/test/basic?rtl=true
.We can use npm pack
to test Ionic Framework changes in an external app outside of this repository. Follow the below steps based on your framework.
Run the following commands to build the core directory and pack the changes:
cd core
npm i
npm run build
npm pack --pack-destination ~
Then, in your Ionic Framework JavaScript app, run the following command to use the built package with the .tgz
file that was created:
npm install file:/~/ionic-core-7.0.1.tgz
Run the following commands to build the core & angular directories and pack the changes:
cd core
npm i
npm run build
npm pack --pack-destination ~
cd ../packages/angular
npm i
npm run sync
npm run build
cd dist/
npm pack --pack-destination ~
Then, in your Ionic Framework Angular app, run the following commands to use the built packages with the .tgz
files that were created:
rm -rf .angular/
npm install file:/~/ionic-core-7.0.1.tgz
npm install file:/~/ionic-angular-7.0.1.tgz
Run the following commands to build the core & react directories and pack the changes:
cd core
npm i
npm run build
npm pack --pack-destination ~
cd ../packages/react
npm i
npm run sync
npm run build
npm pack --pack-destination ~
cd ../react-router
npm i
npm run sync
npm run build
npm pack --pack-destination ~
Then, in your Ionic Framework React app, run the following commands to use the built packages with the .tgz
files that were created:
npm install file:/~/ionic-core-7.0.1.tgz
npm install file:/~/ionic-react-7.0.1.tgz
npm install file:/~/ionic-react-router-7.0.1.tgz
Run the following commands to build the core & vue directories and pack the changes:
cd core
npm i
npm run build
npm pack --pack-destination ~
cd ../packages/vue
npm i
npm run sync
npm run build
npm pack --pack-destination ~
cd ../vue-router
npm i
npm run sync
npm run build
npm pack --pack-destination ~
Then, in your Ionic Framework Vue app, run the following commands to use the built packages with the .tgz
files that were created:
npm install file:/~/ionic-core-7.0.1.tgz
npm install file:/~/ionic-vue-7.0.1.tgz
npm install file:/~/ionic-vue-router-7.0.1.tgz
[!IMPORTANT] If you are using a Windows machine, you will need to configure your local development environment to use the correct line endings.
- Check that the Git setting
core.autocrlf
is set tofalse
: rungit config -l | grep autocrlf
. Switch it to false using:git config --global core.autocrlf false
.- If you’ve already cloned the
ionic-docs
repo, the files may already be cached as LF. To undo this, you need to clean the cache files of the repository. Run the following (make sure you stage or commit your changes first):git rm --cached -r .
thengit reset --hard
.
npm run lint
to lint the TypeScript and Sass.npm run lint.fix
to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.npm run lint.ts
and npm run lint.ts.fix
, respectively.npm run lint.sass
and npm run lint.sass.fix
, respectively.ionic-docs
repo: https://github.com/ionic-team/ionic-docs/tree/main/docs
ionic-docs
PR, please add a link back to the related ionic-framework
PR.ionic-framework
repo. These can be done in the same PR as your fix or feature.
npm run build
and commit all updates to ensure your changes make it into the generated documentation.Usage
: update the component’s usage examples in the component’s usage/
directory.Properties
, Events
, or Methods
: update the component’s TypeScript file (*.tsx
).CSS Custom Properties
: update the component’s main Sass file (*.scss
).test/
folder in the component’s directory.basic/
directory from the component’s test/
directory, rename it, and edit the content in both the index.html
and e2e.ts
file (see Screenshot Tests for more information on this file).preview/
directory is used in the documentation as a demo. Only update this test if there is a bug in the test or if the API has a change that hasn’t been updated in the test.See Ionic’s E2E testing guide for information regarding the tools you can use to test Ionic.
e2e.ts
in the directory of the test.test()
calls that include a call to page.compareScreenshot()
. See Stencil end-to-end testing and existing tests in core/
for examples.test()
should have only one screenshot (page.compareScreenshot()
) call or it should check the expect at the end of each test. If there is a mismatch it will fail the test which will prevent the rest of the test from running, i.e. if the first screenshot fails the remaining screenshot calls would not be called unless they are in a separate test or all of the expects are called at the end.npm run test.screenshot
.
alert
tests: npm run test.screenshot alert
.alert
tests: npm run test.screenshot src/components/alert/test/basic/e2e.ts
.npm run build
inside of the core
directory. This will add your changes to any auto-generated files, if necessary./packages/angular/src
/packages/react/src
/packages/vue/src
Follow the steps in the test directory for each framework:
/packages/angular/test
/packages/react/test
/packages/vue/test
Follow the steps to preview changes in core.
npm run lint
to lint the TypeScript in the relevant directory:
/packages/angular/src
/packages/react/src
/packages/vue/src
npm run lint.fix
to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.npm run test
to run your tests.npm run build
inside of the package’s root directory. This will add your changes to any auto-generated files, if necessary.main
branch as the base
. You may need to click on compare across forks
to find your changes.The team has an internal design process for new Ionic features, which must be completed before the PR can be reviewed or merged. As a result of the design process, community feature PRs are subject to large changes. In some cases, the team may instead create a separate PR using pieces of the community PR. Either way, you will always receive co-author commit credit when the feature is merged.
To expedite the process, please ensure that all feature PRs have an associated issue created, with a clear use case for why the feature should be added to Ionic.
We have very precise rules over how our git commit messages should be formatted. This leads to readable messages that are easy to follow when looking through the project history. We also use the git commit messages to generate our changelog. Our format closely resembles Angular’s commit message guidelines.
We follow the Conventional Commits specification. A commit message consists of a header, body and footer. The header has a type, scope and subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
The header is mandatory and the scope of the header is optional.
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>.
, where the hash is the SHA of the commit being reverted.
If the prefix is feat
, fix
or perf
, it will appear in the changelog. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.
Must be one of the following:
The scope can be anything specifying place of the commit change. Usually it will refer to a component but it can also refer to a utility. For example action-sheet
, button
, css
, menu
, nav
, etc. If you make multiple commits for the same component, please keep the naming of this component consistent. For example, if you make a change to navigation and the first commit is fix(nav)
, you should continue to use nav
for any more commits related to navigation. As a general rule, if you’re modifying a component use the name of the folder.
The subject contains succinct description of the change:
.
at the endJust as in the subject, use the imperative, present tense: “change” not “changed” nor “changes”. The body should include the motivation for the change and contrast this with previous behavior.
The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit Closes.
Breaking Changes should start with the word BREAKING CHANGE:
with a space or two newlines. The rest of the commit message is then used for this.
Does not appear in the generated changelog:
docs(changelog): update steps to update
Appears under “Features” header, toast subheader:
feat(toast): add 'buttons' property
Appears under “Bug Fixes” header, skeleton-text subheader, with a link to issue #28:
fix(skeleton-text): use proper color when animated
closes #28
Appears under “Performance Improvements” header, and under “Breaking Changes” with the breaking change explanation:
perf(css): remove all css utility attributes
BREAKING CHANGE: The CSS utility attributes have been removed. Use CSS classes instead.
Appears under “Breaking Changes” with the breaking change explanation:
refactor(animations): update to new animation system
BREAKING CHANGE:
Removes the old animation system to use the new Ionic animations.
The following commit and commit 667ecc1
do not appear in the changelog if they are under the same release. If not, the revert commit appears under the “Reverts” header.
revert: feat(skeleton-text): add animated property
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
By contributing your code to the ionic-team/ionic GitHub Repository, you agree to license your contribution under the MIT license.