Skip to content

Commit 657d43d

Browse files
committed
5.7.0 release
1 parent feb842c commit 657d43d

File tree

98 files changed

+2037
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+2037
-239
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,47 @@
22

33
# Change Log
44

5+
# [v5.7.0](https://github.com/framework7io/framework7/compare/v5.6.0...v5.7.0) - April 25, 2020
6+
* Core
7+
* Card
8+
* Fixed issue when expandable card didn't work when expandable card was opened in another page
9+
* Fixed issue when used with "hide on scroll" Navbar/Toolbar on iOS
10+
* Panel
11+
* New `swipeNoFollow` parameter - fallback option for potentially better performance on old/slow devices. If you enable it, then swipe panel will not follow your finger during touch move, it will be automatically opened/closed on swipe left/right. (default false)
12+
* Popup
13+
* Disabled top/bottom safe areas on "tablet" when opened not as full screen popup
14+
* Now it correctly handles and stack multiple opened "push" popups
15+
* Radio
16+
* Now radio icon can be rendered in the beginning or in the end of the list item, by adding `item-radio-icon-start` or `item-radio-icon-end` class to `item-radio` list element
17+
* Smart Select
18+
* Add support for more data-option-icon properties:
19+
* `data-option-icon` - if it just a string then will create an icon with this class. If it is in the format of `f7:icon_name` then it will create a F7-Icons icon. If it is in the format of `md:icon_name` then it will create a Material Icons icon
20+
* `data-option-icon-ios` - same as `data-option-icon` but will apply only when iOS theme is active
21+
* `data-option-icon-md` - same as `data-option-icon` but will apply only when MD theme is active
22+
* `data-option-icon-aurora` - same as `data-option-icon` but will apply only when Aurora theme is active
23+
* Swiper - updated to latest 5.3.8
24+
* Core
25+
* Fix iOS bug with double bounce on free mode momentum bounce
26+
* A11y
27+
* Fixed focus ring on navigation buttons (#3544)
28+
* Fixed RegExp issue in paginationBulletMessage (#3540, #3541)
29+
* Thumbs
30+
* Added thumbs.autoScrollOffset parameter that allows to set on what thumbs active slide from edge it should automaticall move scroll thumbs
31+
* View
32+
* New `masterDetailResizable` parameter to enable resizable Master Detail layout
33+
* New `viewResize` / `view:resize` event on Master Detail resize
34+
* React/Vue/Svelte
35+
* ListItem
36+
* New `radioIcon` string property to define where to display radio icon - in the beginning or in the end of the list item. Can be `start` or `end`
37+
* Navbar
38+
* Fixed not working `onBackClick` event in Svelte
39+
* Panel
40+
* New `swipeNoFollow` boolean property - fallback option for potentially better performance on old/slow devices. If you enable it, then swipe panel will not follow your finger during touch move, it will be automatically opened/closed on swipe left/right. (default false)
41+
* View
42+
* New `materDetailResizable` boolean property to enable resizable Master Detail layout
43+
* New `viewResize` / `view:resize` event on Master Detail resize
44+
* Minor fixes
45+
546
# [v5.6.0](https://github.com/framework7io/framework7/compare/v5.5.5...v5.6.0) - April 18, 2020
647
* Core
748
* App

packages/core/components/card.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/components/card/card.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ const CardExpandable = {
77
open(cardEl = '.card-expandable', animate = true) {
88
const app = this;
99

10-
if ($('.card-opened').length) return;
1110
const $cardEl = $(cardEl).eq(0);
12-
1311
if (!$cardEl || !$cardEl.length) return;
1412
if ($cardEl.hasClass('card-opened') || $cardEl.hasClass('card-opening') || $cardEl.hasClass('card-closing')) return;
1513

1614
const $pageEl = $cardEl.parents('.page').eq(0);
1715
if (!$pageEl.length) return;
1816

17+
if ($pageEl.find('.card-opened').length) {
18+
return;
19+
}
20+
1921
let prevented;
2022

2123
function prevent() {

packages/core/components/navbar/navbar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ const Navbar = {
491491
}
492492

493493
function handleTitleHideShow() {
494+
if ($pageEl.hasClass('page-with-card-opened')) return;
494495
scrollHeight = scrollContent.scrollHeight;
495496
offsetHeight = scrollContent.offsetHeight;
496497
reachEnd = currentScrollTop + offsetHeight >= scrollHeight;
@@ -613,7 +614,7 @@ export default {
613614
},
614615
},
615616
on: {
616-
'panelBreakpoint panelCollapsedBreakpoint panelResize resize viewMasterDetailBreakpoint': function onPanelResize() {
617+
'panelBreakpoint panelCollapsedBreakpoint panelResize viewResize resize viewMasterDetailBreakpoint': function onPanelResize() {
617618
const app = this;
618619
$('.navbar').each((index, navbarEl) => {
619620
app.navbar.size(navbarEl);

packages/core/components/panel.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/components/panel/panel-class.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import $ from 'dom7';
22
import Utils from '../../utils/utils';
33
import Framework7Class from '../../utils/class';
4-
import SwipePanel from './swipe-panel';
5-
import ResizablePanel from './resizable-panel';
4+
import swipePanel from './swipe-panel';
5+
import resizablePanel from './resizable-panel';
66

77
class Panel extends Framework7Class {
88
constructor(app, params = {}) {
@@ -208,7 +208,7 @@ class Panel extends Framework7Class {
208208
panel.resizable = true;
209209
panel.$el.addClass('panel-resizable');
210210
} else {
211-
ResizablePanel(panel);
211+
resizablePanel(panel);
212212
}
213213
return panel;
214214
}
@@ -225,7 +225,7 @@ class Panel extends Framework7Class {
225225
if (panel.swipeInitialized) {
226226
panel.swipeable = true;
227227
} else {
228-
SwipePanel(panel);
228+
swipePanel(panel);
229229
}
230230
return panel;
231231
}

packages/core/components/panel/panel.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export namespace Panel {
4747
collapsedBreakpoint?: number
4848
/** Enables ability to open/close panel with swipe (default false) */
4949
swipe?: boolean
50+
/** Fallback option for potentially better performance on old/slow devices. If you enable it, then swipe panel will not follow your finger during touch move, it will be automatically opened/closed on swipe left/right. (default false) */
51+
swipeNoFollow?: boolean
5052
/** This parameter allows to close (but not open) panel with swipes. (default false) */
5153
swipeOnlyClose?: boolean
5254
/** Width (in px) of invisible edge from the screen that triggers swipe panel. (default 0) */

packages/core/components/panel/panel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default {
1515
visibleBreakpoint: undefined,
1616
collapsedBreakpoint: undefined,
1717
swipe: false, // or true
18+
swipeNoFollow: false, // or true
1819
swipeOnlyClose: false,
1920
swipeActiveArea: 0,
2021
swipeThreshold: 0,

packages/core/components/panel/swipe-panel.js

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ function swipePanel(panel) {
1818
let isGestureStarted;
1919
let isMoved;
2020
let isScrolling;
21+
let isInterrupted;
2122
const touchesStart = {};
2223
let touchStartTime;
2324
let touchesDiff;
@@ -61,12 +62,13 @@ function swipePanel(panel) {
6162
isMoved = false;
6263
isTouched = true;
6364
isScrolling = undefined;
65+
isInterrupted = false;
6466

6567
touchStartTime = Utils.now();
6668
direction = undefined;
6769
}
6870
function handleTouchMove(e) {
69-
if (!isTouched || isGestureStarted) return;
71+
if (!isTouched || isGestureStarted || isInterrupted) return;
7072
touchMoves += 1;
7173
if (touchMoves < 2) return;
7274
if (e.f7PreventSwipePanel || app.preventSwipePanelBySwipeBack || app.preventSwipePanel) {
@@ -166,23 +168,37 @@ function swipePanel(panel) {
166168
translate = panelWidth;
167169
}
168170
}
171+
const noFollowProgress = Math.abs(translate / panelWidth);
169172
if (effect === 'reveal') {
170-
$viewEl.transform(`translate3d(${translate}px,0,0)`).transition(0);
171-
$backdropEl.transform(`translate3d(${translate}px,0,0)`).transition(0);
173+
if (!params.swipeNoFollow) {
174+
$viewEl.transform(`translate3d(${translate}px,0,0)`).transition(0);
175+
$backdropEl.transform(`translate3d(${translate}px,0,0)`).transition(0);
176+
}
172177

173178
$el.trigger('panel:swipe', Math.abs(translate / panelWidth));
174179
panel.emit('local::swipe panelSwipe', panel, Math.abs(translate / panelWidth));
175180
} else {
176181
if (side === 'left') translate -= panelWidth;
177-
$el.transform(`translate3d(${translate}px,0,0)`).transition(0);
182+
if (!params.swipeNoFollow) {
183+
$el.transform(`translate3d(${translate}px,0,0)`).transition(0);
178184

179-
$backdropEl.transition(0);
180-
backdropOpacity = 1 - Math.abs(translate / panelWidth);
181-
$backdropEl.css({ opacity: backdropOpacity });
185+
$backdropEl.transition(0);
186+
backdropOpacity = 1 - Math.abs(translate / panelWidth);
187+
$backdropEl.css({ opacity: backdropOpacity });
188+
}
182189

183190
$el.trigger('panel:swipe', Math.abs(translate / panelWidth));
184191
panel.emit('local::swipe panelSwipe', panel, Math.abs(translate / panelWidth));
185192
}
193+
194+
if (params.swipeNoFollow) {
195+
const stateChanged = (panel.opened && noFollowProgress === 0) || (!panel.opened && noFollowProgress === 1);
196+
if (stateChanged) {
197+
isInterrupted = true;
198+
// eslint-disable-next-line
199+
handleTouchEnd(e);
200+
}
201+
}
186202
}
187203
function handleTouchEnd(e) {
188204
if (!isTouched || !isMoved) {
@@ -195,7 +211,7 @@ function swipePanel(panel) {
195211
isMoved = false;
196212
const timeDiff = (new Date()).getTime() - touchStartTime;
197213
let action;
198-
const edge = (translate === 0 || Math.abs(translate) === panelWidth);
214+
const edge = (translate === 0 || Math.abs(translate) === panelWidth) && !params.swipeNoFollow;
199215

200216
const threshold = params.swipeThreshold || 0;
201217

packages/core/components/popup.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)