Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'release/v3.2.2'
  • Loading branch information
janschoenherr committed Oct 23, 2019
2 parents f8c5526 + f38efaf commit fbd0007
Show file tree
Hide file tree
Showing 20 changed files with 135 additions and 111 deletions.
30 changes: 0 additions & 30 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
@@ -0,0 +1,42 @@
---
name: Bug Report 🐛
about: Report a bug you have found.
labels: '! Bug'
assignees: ''

---

<!--
👋 Hi, thank you for using UIKit!
Please open an issues only for a bug report or feature request. Make sure no one else else has already opened a similar issue. If you need help or have questions about UIkit, there are few places to start:
- Search our public documentation: https://getuikit.com/docs
- Ask the community in the Discord chat: https://discord.gg/NEt4Pv7
- Look for an answer on Stack Overflow: https://stackoverflow.com/questions/ask?tags=getuikit
-->

### UIkit Version

*Check if the issue is reproducible with the latest stable version.*
3.2.2

### Actual Behavior

*What happened? Screenshots please, if relevant!*

### Expected Behavior

*What should have happened?*

### Reproduction Link

*A minimal Codepen that can reproduce the bug. Start with this [Codepen template](http://codepen.io/anon/pen/XMpryM)*

### Steps to Reproduce the Problem

1.
2.
3.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
@@ -0,0 +1,27 @@
---
name: Feature Request 🌟
about: Suggest an idea for a new feature.
labels: '! Feature'
assignees: ''

---

<!--
👋 Hi, thank you for using UIKit!
Please open an issues only for a bug report or feature request. Make sure no one else else has already opened a similar issue. If you need help or have questions about UIkit, there are few places to start:
- Search our public documentation: https://getuikit.com/docs
- Ask the community in the Discord chat: https://discord.gg/NEt4Pv7
- Look for an answer on Stack Overflow: https://stackoverflow.com/questions/ask?tags=getuikit
-->

### Summary

*What feature are you requesting? What problem does it solve?*

### Priority

*On a scale of 1-5, how important is this feature to you? Please explain.*
15 changes: 15 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog

## 3.2.2 (October 23, 2019)

### Added

- Prevent endless update loops

### Changed

- Improve event.preventDefault behaviour in Toggle Component
- Improve initial boot

### Fixed

- Fix event delegation with `self` filter

## 3.2.1 (October 1, 2019)

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -29,7 +29,7 @@ You have the following options to get UIkit:
- Download the [latest release](https://github.com/uikit/uikit/releases/latest) with pre-built CSS and JS.
- Install with [npm](https://npmjs.com) to get all source files as they are available on Github: ```npm install uikit```
- Install with [yarn](https://yarnpkg.com/) to get all source files as they are available on Github: ```yarn add uikit```
- Directly load UIkit from [CDNJS](https://cdnjs.com): https://cdnjs.com/libraries/uikit
- Directly load UIkit from [jsDelivr](https://www.jsdelivr.com): https://www.jsdelivr.com/package/npm/uikit
- Clone the repo to get all source files including build scripts: `git clone git://github.com/uikit/uikit.git`

## Developers
Expand Down
2 changes: 1 addition & 1 deletion build/release.js
Expand Up @@ -37,7 +37,7 @@ async function updateVersion(version) {
await Promise.all([
run(`npm version ${version} --git-tag-version false`),
replaceInFile('CHANGELOG.md', data => data.replace(/^##\s*WIP/m, `## ${versionFormat(version)} (${dateFormat(Date.now(), 'mmmm d, yyyy')})`)),
replaceInFile('.github/ISSUE_TEMPLATE.md', data => data.replace(pkg.version, version)),
replaceInFile('.github/ISSUE_TEMPLATE/bug-report.md', data => data.replace(pkg.version, version)),
]);

return version;
Expand Down
2 changes: 1 addition & 1 deletion dist/css/uikit-rtl.css
@@ -1,4 +1,4 @@
/*! UIkit 3.2.1 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
/*! UIkit 3.2.2 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
/* ========================================================================
Component: Base
========================================================================== */
Expand Down
2 changes: 1 addition & 1 deletion dist/css/uikit-rtl.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/uikit.css
@@ -1,4 +1,4 @@
/*! UIkit 3.2.1 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
/*! UIkit 3.2.2 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
/* ========================================================================
Component: Base
========================================================================== */
Expand Down
2 changes: 1 addition & 1 deletion dist/css/uikit.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/uikit-icons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/uikit-icons.min.js

Large diffs are not rendered by default.

57 changes: 21 additions & 36 deletions dist/js/uikit.js
@@ -1,4 +1,4 @@
/*! UIkit 3.2.1 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */
/*! UIkit 3.2.2 | http://www.getuikit.com | (c) 2014 - 2019 YOOtheme | MIT License */

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
Expand Down Expand Up @@ -620,14 +620,14 @@
listener = detail(listener);
}

if (selector) {
listener = delegate(targets, selector, listener);
}

if (useCapture && useCapture.self) {
listener = selfFilter(listener);
}

if (selector) {
listener = delegate(targets, selector, listener);
}

useCapture = useCaptureFilter(useCapture);

type.split(' ').forEach(function (type) { return targets.forEach(function (target) { return target.addEventListener(type, listener, useCapture); }
Expand Down Expand Up @@ -2053,26 +2053,29 @@

};

function flush() {
function flush(recursion) {
if ( recursion === void 0 ) recursion = 1;

runTasks(fastdom.reads);
runTasks(fastdom.writes.splice(0, fastdom.writes.length));

fastdom.scheduled = false;

if (fastdom.reads.length || fastdom.writes.length) {
scheduleFlush(true);
scheduleFlush(recursion + 1);
}
}

function scheduleFlush(microtask) {
if ( microtask === void 0 ) microtask = false;

var RECURSION_LIMIT = 5;
function scheduleFlush(recursion) {
if (!fastdom.scheduled) {
fastdom.scheduled = true;
if (microtask) {
Promise.resolve().then(flush);
if (recursion > RECURSION_LIMIT) {
throw new Error('Maximum recursion limit reached.');
} else if (recursion) {
Promise.resolve().then(function () { return flush(recursion); });
} else {
requestAnimationFrame(flush);
requestAnimationFrame(function () { return flush(); });
}
}
}
Expand Down Expand Up @@ -2815,30 +2818,12 @@
return;
}

if (document.body) {

fastdom.read(init);

} else {

(new MutationObserver(function () {

if (document.body) {
this.disconnect();
init();
}

})).observe(document, {childList: true, subtree: true});

}
fastdom.read(init);

function init() {

apply(document.body, connect);

// Safari renders prior to first animation frame
fastdom.flush();

(new MutationObserver(function (mutations) { return mutations.forEach(applyMutation); })).observe(document, {
childList: true,
subtree: true,
Expand Down Expand Up @@ -7970,7 +7955,7 @@
methods: {

index: function() {
return !isEmpty(this.connects) && index(filter(this.connects[0].children, ("." + (this.cls)))[0]);
return !isEmpty(this.connects) ? index(filter(this.connects[0].children, ("." + (this.cls)))[0]) : -1;
},

show: function(item) {
Expand All @@ -7994,7 +7979,7 @@
}
}

if (!active || prev >= 0 && hasClass(active, this.cls) || prev === next) {
if (!active || prev === next) {
return;
}

Expand Down Expand Up @@ -8114,7 +8099,7 @@
var link;
if (closest(e.target, 'a[href="#"], a[href=""]')
|| (link = closest(e.target, 'a[href]')) && (
this.cls
this.cls && !hasClass(this.target, this.cls.split(' ')[0])
|| !isVisible(this.target)
|| link.hash && matches(this.target, link.hash)
)
Expand Down Expand Up @@ -8215,7 +8200,7 @@

}

UIkit.version = '3.2.1';
UIkit.version = '3.2.2';

core(UIkit);

Expand Down
4 changes: 2 additions & 2 deletions dist/js/uikit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "uikit",
"title": "UIkit",
"description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
"version": "3.2.1",
"version": "3.2.2",
"main": "dist/js/uikit.js",
"style": "dist/css/uikit.css",
"sideEffects": [
Expand Down
20 changes: 1 addition & 19 deletions src/js/api/boot.js
Expand Up @@ -9,30 +9,12 @@ export default function (UIkit) {
return;
}

if (document.body) {

fastdom.read(init);

} else {

(new MutationObserver(function () {

if (document.body) {
this.disconnect();
init();
}

})).observe(document, {childList: true, subtree: true});

}
fastdom.read(init);

function init() {

apply(document.body, connect);

// Safari renders prior to first animation frame
fastdom.flush();

(new MutationObserver(mutations => mutations.forEach(applyMutation))).observe(document, {
childList: true,
subtree: true,
Expand Down
6 changes: 3 additions & 3 deletions src/js/core/switcher.js
@@ -1,5 +1,5 @@
import Togglable from '../mixin/togglable';
import {$$, addClass, attr, css, data, endsWith, filter, getIndex, hasClass, index, isEmpty, matches, queryAll, removeClass, toNodes, within} from 'uikit-util';
import {$$, addClass, attr, css, data, endsWith, filter, getIndex, index, isEmpty, matches, queryAll, removeClass, toNodes, within} from 'uikit-util';

export default {

Expand Down Expand Up @@ -102,7 +102,7 @@ export default {
methods: {

index() {
return !isEmpty(this.connects) && index(filter(this.connects[0].children, `.${this.cls}`)[0]);
return !isEmpty(this.connects) ? index(filter(this.connects[0].children, `.${this.cls}`)[0]) : -1;
},

show(item) {
Expand All @@ -123,7 +123,7 @@ export default {
}
}

if (!active || prev >= 0 && hasClass(active, this.cls) || prev === next) {
if (!active || prev === next) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/js/core/toggle.js
@@ -1,6 +1,6 @@
import Media from '../mixin/media';
import Togglable from '../mixin/togglable';
import {closest, hasTouch, includes, isTouch, isVisible, matches, pointerEnter, pointerLeave, queryAll, trigger} from 'uikit-util';
import {closest, hasClass, hasTouch, includes, isTouch, isVisible, matches, pointerEnter, pointerLeave, queryAll, trigger} from 'uikit-util';

export default {

Expand Down Expand Up @@ -66,7 +66,7 @@ export default {
let link;
if (closest(e.target, 'a[href="#"], a[href=""]')
|| (link = closest(e.target, 'a[href]')) && (
this.cls
this.cls && !hasClass(this.target, this.cls.split(' ')[0])
|| !isVisible(this.target)
|| link.hash && matches(this.target, link.hash)
)
Expand Down
8 changes: 4 additions & 4 deletions src/js/util/event.js
Expand Up @@ -13,14 +13,14 @@ export function on(...args) {
listener = detail(listener);
}

if (selector) {
listener = delegate(targets, selector, listener);
}

if (useCapture && useCapture.self) {
listener = selfFilter(listener);
}

if (selector) {
listener = delegate(targets, selector, listener);
}

useCapture = useCaptureFilter(useCapture);

type.split(' ').forEach(type =>
Expand Down

0 comments on commit fbd0007

Please sign in to comment.