Skip to content

Commit dca3509

Browse files
committed
Add 3.0-beta.1 changelog
1 parent 5011c0c commit dca3509

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
## Changelog ##
22

3+
### 3.0-beta.1
4+
5+
#### Migrating
6+
7+
To migrate, you only need to change all callback functions to the new arguments (`icon`, `build`, `visible`, `disabled`, item `callback` and global item `callback`). Also if you listen to `contextmenu` events, please check if you still get the correct data.
8+
9+
#### Changed
10+
11+
* Restructured the code to use Webpack with Babel. Build the code with `yarn run webpack`.
12+
* Changed linting to ESLint.
13+
* Moved to [BrowserStack](https://www.browserstack.com/) for browser testing.
14+
* Added JSDoc for generated [API documentation](https://swisnl.github.io/jQuery-contextMenu/3.x/api).
15+
* Added [3.x documentation](https://swisnl.github.io/jQuery-contextMenu/) on GitHub pages.
16+
* The previous `opt` and `root` arguments are now described as `currentMenuData` and `rootMenuData`, which are documented in [ContextMenuData](https://swisnl.github.io/jQuery-contextMenu/3.x/api/ContextMenuData.html).
17+
* Defined a few callback types to illustrate the arguments with which they are called.
18+
* Build callback [ContextMenuBuildCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuBuildCallback__anchor) is now `function(e, $currentTrigger)`.
19+
* Icon callback [ContextMenuIconCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuIconCallback__anchor) is now `function(e, $item, key, item, currentMenuData, rootMenuData)`.
20+
* The visibile, disabled, global callback and item callback [ContextMenuItemCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuItemCallback__anchor) is now `function(e, key, currentMenuData, rootMenuData)`.
21+
* If you define custom menu item types in `$.contextMenu.types` they get called as [ContextMenuItemTypeCallback](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuItemTypeCallback__anchor) with `function(e, item, currentMenuData, rootMenuData)`.
22+
* All events should always include event data containing the ContextMenuData as described in [ContextMenuEvent](https://swisnl.github.io/jQuery-contextMenu/3.x/api/global.html#ContextMenuEvent__anchor). So if you listen to `contextmenu` events you should always have the data available.
23+
24+
#### Fixed
25+
26+
* Add options argument to events.activates. ([Issue #580](https://github.com/swisnl/jQuery-contextMenu/issues/580))
27+
* Fix support for `$(element).contextMenu('update')` which was broken.
28+
* Fixed bug in checking visibility of items for menu visibility. If a menu item was defined as `{ item: { visible: false } }` it would not stop the menu from showing.
29+
330
### 2.6.3
431

532
#### Fixed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $.contextMenu({
3737

3838
have a look at the [demos](http://swisnl.github.io/jQuery-contextMenu/demo.html).
3939

40-
## Version 3.0
40+
## Version 3.0 beta
4141

4242
Version 3.0 is a restructure of the javascript into something more sane written in ES6. It consolidates all API's so callbacks are better documented and more concise. The basics are still the same, but all callbacks are structured differently.
4343

@@ -62,6 +62,8 @@ contextMenu.create({
6262
});
6363
```
6464

65+
Check out [the documentation for 3.0-beta](http://swisnl.github.io/jQuery-contextMenu) for more information.
66+
6567
## HTML5 Compatibility ##
6668

6769
_Update June 2017: [The <menu> element has been deprecated](https://github.com/whatwg/html/issues/2730) in the html spec because of lack of support. This means the menu element won't be coming to browsers anymore, and the polyfill part of this menu is now deprecated._

0 commit comments

Comments
 (0)