Browse Source

Merge branch 'master' into t/ckeditor5-dev/289

Kamil Piechaczek 8 years ago
parent
commit
a043f05105

BIN
docs/assets/img/closing-a-pr.gif


+ 8 - 0
docs/builds/guides/integration/configuration.md

@@ -86,6 +86,14 @@ ClassicEditor
 	The above is a strict UI-related configuration. Removing a toolbar item does not remove the feature from the editor internals. If your goal with the toolbar configuration is to remove features, the right solution is to also remove their relative plugins. Check [Removing features](#Removing-features) above for more information.
 </info-box>
 
+### Listing available items
+
+You can use the following snippet to retrieve all toolbar items available in your editor:
+
+```js
+Array.from( editor.ui.componentFactory.names );
+```
+
 ## Other configuration options
 
 See {@link module:core/editor/editorconfig~EditorConfig} to learn about all available configuration options.

+ 5 - 6
docs/framework/guides/architecture/intro.md

@@ -647,14 +647,13 @@ toolbar.on( 'execute', evt => {
 
 ### Keystrokes and focus management
 
-<<<<<<< HEAD
 _Coming soon..._
-=======
+
 The framework offers built–in classes that help manage keystrokes and focus in the UI. They are particularly useful when it comes to bringing accessibility features to the application.
 
 #### Focus tracker
 
-The {@link module:utils/focustracker~FocusTracker `FocusTracker`} class can observe a number of HTML elements and determine if one of them is focused: either by the user (clicking, typing) or using the `HTMLElement.focus()` DOM method.
+The {@link module:utils/focustracker~FocusTracker `FocusTracker`} class can observe a number of HTML elements and determine if one of them is focused either by the user (clicking, typing) or using the `HTMLElement.focus()` DOM method.
 
 ```js
 import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
@@ -683,11 +682,11 @@ focusTracker.on( 'change:isFocused', ( evt, name, isFocused ) => {
 } );
 ```
 
-This information is useful when implementing a certain type of UI which behavior depends on the focus, e.g. contextual panels and floating balloons containing forms should hide when the user decides to abandon them.
+This information is useful when implementing a certain type of UI whose behavior depends on the focus, for example, contextual panels and floating balloons containing forms should hide when the user decides to abandon them.
 
 #### Keystroke handler
 
-The {@link module:utils/keystrokehandler~KeystrokeHandler `KeystrokeHandler`} listens to the keystroke events fired by an HTML element or any of its descendants and executes pre–defined actions when the keystroke is pressed. Usually, each [view](#Views) creates own keystroke handler instance which takes care of the keystrokes fired by the elements the view has rendered.
+The {@link module:utils/keystrokehandler~KeystrokeHandler `KeystrokeHandler`} listens to the keystroke events fired by an HTML element or any of its descendants and executes pre–defined actions when the keystroke is pressed. Usually, each [view](#Views) creates its own keystroke handler instance which takes care of the keystrokes fired by the elements the view has rendered.
 
 ```js
 import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler';
@@ -722,7 +721,7 @@ keystrokeHandler.set( 'Tab', ( keyEvtData, cancel ) => {
 <info-box>
 	There is also an {@link module:core/editingkeystrokehandler~EditingKeystrokeHandler `EditingKeystrokeHandler`} class which has the same API as `KeystrokeHandler` but it offers direct keystroke bindings to editor commands.
 
-	Usually, the editor provides such keystroke handler under the {@link module:core/editor/standardeditor~StandardEditor#keystrokes `editor.keystrokes`} property so any plugin can register keystrokes associated with editor commands, e.g. the {@link module:undo/undo~Undo `Undo`} plugin registers `editor.keystrokes.set( 'Ctrl+Z', 'undo' );` to execute its "undo" command.
+	Usually, the editor provides such keystroke handler under the {@link module:core/editor/standardeditor~StandardEditor#keystrokes `editor.keystrokes`} property so any plugin can register keystrokes associated with editor commands. For example, the {@link module:undo/undo~Undo `Undo`} plugin registers `editor.keystrokes.set( 'Ctrl+Z', 'undo' );` to execute its "undo" command.
 </info-box>
 
 When multiple callbacks are assigned to the same keystroke, priorities can be used to decide which one should be handled first and whether other callbacks should be executed at all:

+ 153 - 0
docs/framework/guides/contributing/git-commit-message-convention.md

@@ -0,0 +1,153 @@
+---
+category: framework-contributing
+order: 30
+---
+
+# Git commit message convention
+
+Every commit made *directly* to the `master` branch must follow the below convention. Based on commits in the `master` branch CKEditor 5's release tools will generate changelog entries for the current release.
+
+<info-box>
+	Commits in the ticket branches are not analyzed for the changelog and do not have to follow any specific convention (other than finishing sentences with periods). In case of ticket branches, **only merge commits are analyzed**.
+
+	Therefore, this guide is mainly targeted to core team members. However, it may help you to understand how to write a suggested commit message when creating a PR for CKEditor 5.
+</info-box>
+
+## Convention
+
+Commit message template:
+
+```
+Type: A short sentence about the commit. Closes #XXX.
+
+Optional description.
+
+NOTE: Special note to be marked in the changelog.
+
+BREAKING CHANGE: If any breaking changes were done, they need to be listed here.
+BREAKING CHANGE: Another breaking change if needed. Closes #YYY.
+```
+
+### Commit types
+
+| Type | Release | Description | Changelog |
+| --- | --- | --- | --- |
+| Feature | `minor` | A new feature. | Visible |
+| Fix | `patch` | A bug fix. Should also be used for enhancements if they do not introduce new features at the same time. | Visible |
+| Other | `patch` | An enhancement – when it is neither a bug fix nor a feature. For example – public API refactoring. Use it also if you do not want to admit that it was a bug ;). | Visible |
+| Code style | `patch` | Our beloved code style improvements (used in the broad meaning of general code quality). | Hidden |
+| Docs | `patch` | Updated documentation. | Hidden |
+| Internal | `patch` | Other kinds of internal changes. | Hidden |
+| Tests | `patch` | Changes in test files. | Hidden |
+| Revert | `patch` | Revert of some commit. | Hidden |
+| Release | `patch` | A special type of commit used by the release tools. | Hidden |
+
+Each commit can contain additional notes which will be inserted to the changelog:
+
+| Type | Is backward compatible? |
+| --- | --- |
+| `NOTE` | Yes |
+| `BREAKING CHANGES` or `BREAKING CHANGE` | No |
+
+If any visible change contains the `BREAKING CHANGE` note, the next release will be marked as `major` automatically.
+
+### Example commits
+
+A new feature without any breaking changes.
+
+```
+Feature: Added support for RTL languages. Closes #1.
+
+RTL content will now be rendered correctly.
+
+NOTE: Make sure to set `config.contentDirection` correctly.
+```
+
+A bug fix for an existing feature (closes two tickets):
+
+```
+Fix: The editor will be great again. Closes #3. Closes #4.
+```
+
+Commit with updated the documentation:
+
+```
+Docs: Updated the README.
+```
+
+Commit which provides / changes the tests:
+
+```
+Tests: Introduced missing tests. Closes #5.
+```
+
+An enhancement which is not backward compatible. Public API has been changed:
+
+```
+Other: Extracted `utils.moo()` to a separate package. Closes #9.
+
+BREAKING CHANGE: The `util.moo()` method is now available in the `moo` packages. See #9.
+```
+
+For the commits above the changelog will look like this:
+
+```md
+Changelog
+=========
+
+## [1.0.0](https://github.com/ckeditor/ckeditor5-dev/compare/v1.0.0...v0.0.1) (2017-01-04)
+
+### Bug fixes
+
+* The editor will be great again. Closes [#3](https://github.com/ckeditor/ckeditor5-dev/issue/3). Closes [#4](https://github.com/ckeditor/ckeditor5-dev/issue/4). ([a0b4ce8](https://github.com/ckeditor/ckeditor5-dev/commit/a0b4ce8))
+
+### Other changes
+
+* Extracted `utils.moo()` to a separate package. Thanks to [@CKEditor](https://github.com/CKEditor). ([e8cc04f](https://github.com/ckeditor/ckeditor5-dev/commit/e8cc04f))
+
+### Features
+
+* Added support for RTL languages. Closes [#1](https://github.com/ckeditor/ckeditor5-dev/issue/1). ([adc59ed](https://github.com/ckeditor/ckeditor5-dev/commit/adc59ed))
+
+   RTL content will now be rendered correctly.
+
+### BREAKING CHANGES
+
+* The `util.moo()` method is now available in the `moo` packages. See [#9](https://github.com/ckeditor/ckeditor5-dev/issue/9).
+
+### NOTE
+
+* Make sure to set `config.contentDirection` correctly.
+```
+
+## Handling pull requests
+
+When making a pull request its author may (it is recommended in the pull request template) propose a merge commit message.
+
+The reviewer's duty is to validate the proposed message and apply necessary changes (the PR's description can be edited).
+
+Things like:
+
+* language and grammar of the message,
+* type of the change,
+* mentioned issue(s) number,
+* breaking changes,
+* and any additional information
+
+should be checked and added if missing.
+
+As a reviewer, remember that the message will end up in the changelog and must be understandable in a broad context of the entire editor. It is not for you – it is for other developers.
+
+When closing a PR remember to copy the source of the message to the textarea with the merge commit message:
+
+{@img assets/img/closing-a-pr.png Screencast how to copy a source version of the suggested commit message when closing a PR.}
+
+### Giving credit
+
+When closing a non-core contributor's PR make sure to add an information about the contributor to the commit message. For example:
+
+```
+Feature: Added support for RTL languages. Closes #1.
+
+Thanks to @someone!
+```