When using deepLink options, the handleTabChange will fail if using a non-standard markup (if there are DOM levels between the `.tabs-title` and the `a`).
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 [Sun, 19 Aug 2018 15:43:46 +0000 (17:43 +0200)]
docs: remove mentions of unsupported Y Grid from block grids section
Block Grid is not supported for Y Grid and will not be implemented. It would add too much code for a feature that is will not be used in most projects.
Plus, Block Grid classes are not namespaced for the horizontal or vertical grid. Adding block grid classes for the vertical grid would lead of inconstencies or backward incompatibility and increased specificity.
Nicolas Coden [Sat, 18 Aug 2018 21:45:12 +0000 (23:45 +0200)]
fix: avoid viewport height for fullscreen Reveal as it may be incorrect #10879
The CSS viewport is the larger possible view height and does not change with the visible area height. This is an intended behavior for optimization reason. See this article:
Nicolas Coden [Wed, 15 Aug 2018 20:42:05 +0000 (22:42 +0200)]
refactor: move the customizer ZIPing to `customizer:zip` and `customizer:clean`
The `finish` gulp event is an stream internal event and is not suitable to chain tasks.
Changes:
- Move the custom ZIP file generation to the `customizer:zip` task
- Move the cleaning of the customizer build directory to `customizer:clean` task
Nicolas Coden [Wed, 15 Aug 2018 20:35:39 +0000 (22:35 +0200)]
fix: remove broken Sass linting from Sass compilation task and move it to build task
Changes:
- Remove broken Sass linting from the `sass:foundation` task. The `finish` gulp event is an stream internal event and is not suitable to chain tasks.
- Add `lint:graceful`, `lint:graceful:sass` and `lint:graceful:javascript` to check for linting errors without throwing errors and breaking the chain of tasks.
- Call `lint:graceful` on the build task. For now, there is too much linting issues to display them at each Sass/Javascript compilation.
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