-
Notifications
You must be signed in to change notification settings - Fork 71
Front End Workflow
This article demonstrates the workflow for the Kendo UI themes generation, management, and support, and shares general front-end development resources for the Kendo UI suites.
When improving a theme to support a new component:
- Clone the themes repository into the
kendo-themes
folder. - In the component repo, link the theme through NPM by running the
npm link ../kendo-themes/packages/{themeName}
command, wherethemeName
isdefault
,bootstrap
, ormaterial
. - Run the component demos with the
gulp start
orgulp docs
command. - In the theme repo, create a new branch for your component with the
git checkout -b my-component
command. - Run
npm run watch
in the theme directory (kendo-themes/packages/{themeName}
) to build the theme whenever you make changes. - Style away!
- Rebase your branch and make sure there are no merge conflicts.
- Create a Pull Request and assign it to a reviewer.
If a certain component or any of its states (for example, disabled input) lack visual tests, feel free to contribute. If the visual tests differ, make sure that you provide the template markups for both the jQuery and Angular component.
Visual tests help you to fix bugs or add RTL styles.
To guard against regressions and make pull request reviews easier, the CI build automatically creates screenshots of the sample pages in tests/visual/{componentname}.html
for all feature branches.
To use visual tests when developing themes:
- In the root themes folder, run
npm run sass
(ornpm run dart
) to build all themes. - In
kendo-themes/packages/{themeName}
, wherethemeName
isdefault
,bootstrap
, ormaterial
, executenpm run watch
. The command runs the built theme and adds watchers for your local changes and theme output. - Globally install http-server.
- In the
kendo-themes
directory, runhttp-server
and follow the serving URL. - Open
tests/visual/{componentName}.html
and make your changes in the code. - Reload the browser. Your updates will be applied in the visual tests of the component.
- To apply and visualize your changes across all themes, run
npm run watch
in each theme directory and add a query parameter to the serving URL as follows:
tests/visual/{componentName}.html?material
tests/visual/{componentName}.html?bootstrap
- After commit, Travis CI generates an additional commit including binary files for every change in visual tests. To remove the unnecessary commits, run the following commands:
git checkout develop
git pl
git checkout my-branch
git rebase -i origin/develop
in the editor of choice drop the unwanted commits by replacing pick command with drop (or just d) and save. Then push the changes with git push -f
.
Happy visual test coding!