Nicolas Coden [Mon, 20 Aug 2018 20:54:18 +0000 (22:54 +0200)]
fix: fix DropdownMenu body handler check to ignore the element itself
> `andSelf()` is deprecated and should be replaced with `addBack()`
> -- @SassNinja
Also, `andSelf` cannot be used that way. This commit replace it with the opposite approach: checking if the target is the child of the element or the element itself using `closest()`.
Nicolas Coden [Sun, 19 Aug 2018 21:50:03 +0000 (23:50 +0200)]
fix: avoid stopping event propagation when not necessary
Stopping the event propagation prevent the user to watch for the event at an higher level. If it was needed to prevent a duplicate behavior in a component, others methods should be used like debouncing the event.
Changes:
- Remove `stopPropagation` and `stopImmediatePropagation` from everywhere we do not want to cancel the event (AccordionMenu, Drilldown, DropdownMenu, Tabs, Tooltip).
- Update `DropdownMenu._removeBodyHandler` to also ignore click events on the element itself.
Others changes:
- Clean up `DropdownMenu._events` a bit.
- Add explainaitions where `stopPropagation` is still used (Triggers).
See https://github.com/zurb/foundation-sites/issues/11457
Nicolas Coden [Sun, 19 Aug 2018 21:41:23 +0000 (23:41 +0200)]
fix: prevent double Keyboard events handling without stopping propagation
Stopping the event propagation prevent the user to watch for the event at an higher level. If it was needed to prevent a duplicate behavior in a component, others methods should be used like debouncing the event.
Changes:
- Save and check for `event.zfIsKeyHandled` in Keyboard utility to prevent to handle twice the same event in different components.
- Remove `event.stopPropagation` from components' keyboard handlers (Accordion, DropdownMenu, OffCanvas and Tabs).
See https://github.com/zurb/foundation-sites/issues/11457
Nicolas Coden [Sun, 19 Aug 2018 21:33:22 +0000 (23:33 +0200)]
docs: add docs about "mobile scroll" bug #9707 in OffCanvas
Add documentation for the OffCanvas private methods `_recordScrollable` and `_stopScrollPropagation` to explicitely justify the need for `stopPropagation`.
Nicolas Coden [Sat, 4 Aug 2018 17:59:32 +0000 (19:59 +0200)]
feat: add Orbit element "data-slide-active-label" to target the bullet span to move
Add the Orbit element `[data-slide-active-label]` to explicitely set which Orbit bullet children describe the active slide and should be moved to the new active slide.
Nicolas Coden [Thu, 2 Aug 2018 22:34:27 +0000 (00:34 +0200)]
fix: fix Dropdown Menu top level item properties #11412
Changes:
- Only apply top-level styles to top-level items. This increase specificity but this markup structure is alreaddy assumed elsewhere in the component.
- Remove the default `$white` background on top-level items: it was never applied before #11377 and could now cause visual changes.
Nicolas Coden [Mon, 30 Jul 2018 22:13:00 +0000 (00:13 +0200)]
fix: set the Drilldown height for on the currently opened (sub)menu #11416
Changes:
- Save the currently opened sub-menu as `$currentMenu`
- When calculating the Drilldown wrapper height, use the currently opened menu height instead of the primary menu.
Nicolas Coden [Mon, 9 Jul 2018 21:46:05 +0000 (23:46 +0200)]
chore: update sourcemaps of distributed JS plugins
Sourcemaps for distribution main files and build JS plugins were added in https://github.com/zurb/foundation-sites/pull/11012 but distribution JS plugins were forgotten. This commit change the `deploy:plugins` gulp task to generate and copy sourcemaps for JS plugin alongside their source files.
Changes:
* Split `deploy:plugins` into `deploy:plugins:sources` and `deploy:plugins:sourcemaps`
* Generate sourcemaps for minified plugins in `deploy:plugins:sources`
* Copy sourcemaps for plugins to dist folder in `deploy:plugins:sourcemaps`
Nicolas Coden [Sat, 7 Jul 2018 20:06:52 +0000 (22:06 +0200)]
chore: upgrade gulp to v4.0.0
Changes:
- bump gulp version
- update lockfiles
- use `gulp.series` and `gulp.parallel` instead of `run-sequence` and deprecated task dependencies
- remove unused dependencies in gulpfiles
Nicolas Coden [Tue, 3 Jul 2018 20:03:28 +0000 (22:03 +0200)]
docs: improve gitflow model for supported versions
Currently, supported versions are hosted on `support/<version>`. This bramch is intended to receive all commits and pull requests for compatible patches in order to prepare a release. The release would be made on the same bramch.
The issue with this model is that unline latest versions, support versions are not released on a "safe" branch. In order to resolve this issue and harmonize the way versions are prepared and released, the current commit move `support/<version>` to `develop/<version>` and add `master/<version>`.
Changes:
* Update CONTRIBUTING documentation to describe the `develop/...`+`master/...` approach
* Update GitHub pull request template to advise `develop/...` instead
Nicolas Coden [Sun, 1 Jul 2018 20:00:40 +0000 (22:00 +0200)]
refactor: simplify Input Group border-radius selector
We should assume as little as possible to HTML structure inside our components. People should be able to freely use the classes of components/elements we provide without limited by self-references and dependencies.
This commit simplify the selector used to apply border-radius on Input Group childreens to make all childreens affected, with a single exception for `.input-group-button` where sub-childreens are affected too.
Nicolas Coden [Sun, 1 Jul 2018 17:46:22 +0000 (19:46 +0200)]
fix: remove run-sequence from gulp `deploy:dist` task to detect its end
`run-sequence` doesn't match well with multile streams from `gulp-filter` and prevent us to use the stream end event or gulp to automatically detect the stream end. This commit refactor the `deploy:dist` task and move its logics to `deploy:dist:files` in order to make gulp dealing directly with the `gulp-filter` stream and detect its end.
Nicolas Coden [Thu, 28 Jun 2018 17:32:12 +0000 (19:32 +0200)]
fix: remove $-zf-size from non-responsive XY Grid classes generation
`$-zf-size` is only set within breakpoints. Breakpoints are not expected to be used around the `xy-vertical-grid-classes()` mixin.
Note: a more appropriate fix would be to rely on the `xy-cell()` mixin instead of `xy-cell-static()` to fully support explicit/implicit/null breakpoint option. However this may introduce breaking changes, so this will be kept for v6.6.0.
Nicolas Coden [Tue, 26 Jun 2018 20:43:59 +0000 (22:43 +0200)]
chore: resolve jQuery devDependency CVE
Update the internal jQuery version (used for tests) to the latest version to resolve a CVE.
As Foundation supports jQuery `>=2.2.0`, the jQuery peer dependency is not changed. PeerDependencies versions in `package.json` should only reflect the actual compatibility with the package, regardless of promotion or "potential" security issue. It's up to the end developer to choose the package version corresponding to its own needs and to the risks comming with its own usage.
Nicolas Coden [Mon, 25 Jun 2018 22:55:50 +0000 (00:55 +0200)]
fix: add back Bower dependencies
Bower dependencies in `bower.json` were removed in #11073 in the migration from Bower to npm.
These dependencies should not have been removed as the Bower package still require `jquery` and `what-input`. Someone installing `foundation-sites` with bower should still have these packages included. We simply don't use Bower anymore in development mode and don't promote its usage in the documentation.
Removing `bower install` commands was sufficiant for this migration and Bower dependencies in `bower.json` were unrelated.
See https://github.com/zurb/foundation-sites/pull/11073