Nicolas Coden [Sun, 2 Sep 2018 19:42:27 +0000 (21:42 +0200)]
chore: remove redundant "pkg.browser" field
According to the specification for `pkg.browser`, there is no reason for us to use this field as the package itself it only for browsers (or any environement with a DOM). Without the field, ESM-compliant transpilers/bundlers will pick `module`, and the others will pick `main`.
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 [Sun, 26 Aug 2018 21:35:54 +0000 (23:35 +0200)]
fix: return to initial state when reseting hash in Accordion & Tabs #11100
When deep-linking is enabled and the user goes back in the history up to when no hash is set, display the initially-selected content/tab instead of staying with the content/tab that was selected the first.
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.