Skip to content

Commit 030f5b7

Browse files
committed
Merge branch 'develop' into feat/getting-started-onboarding
# Conflicts: # src/components/modal-design-library/modal.js # src/plugins/global-settings/colors/index.js
2 parents f19831d + eadb634 commit 030f5b7

File tree

40 files changed

+107
-35
lines changed

40 files changed

+107
-35
lines changed

src/block-components/linking/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const _Linking = () => {
4444
return <div
4545
className="stk-linking-wrapper"
4646
>
47-
<Tooltip position="bottom" text={
47+
<Tooltip placement="bottom" text={
4848
<>
4949
{ __( 'When linked, styling this block would also style other linked blocks in adjacent columns.', i18n ) }
5050
<br />

src/block/carousel/frontend-carousel.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,15 @@ class _StackableCarousel {
9393
const clone = original.cloneNode( true )
9494
clone.classList.add( `stk-slide-clone-${ slideIndex + 1 }` )
9595
clone.style.zIndex = -1
96+
97+
clone.style.willChange = 'transform'
98+
clone.style.transform = 'translateX( 0 )'
9699
original.style.willChange = 'transform'
97100
original.style.transform = 'TranslateX( 0 )'
98101

99102
// prevents flickering when changing the value of TranslateX
100103
original.style.transition = 'transform 0s'
104+
clone.style.transition = 'transform 0s'
101105

102106
this.clones.push( clone )
103107

@@ -117,11 +121,14 @@ class _StackableCarousel {
117121
}
118122
step++
119123
} else if ( step === 2 ) {
120-
const numSlides = this.slideEls.length
121-
const slideClientRect = this.slideEls[ 0 ].getBoundingClientRect()
122-
const slideWidth = slideClientRect.width
124+
// Calculate the difference between the first slide and the first clone
125+
// This is used to calculate the translateX values for the slides and clones
126+
const slideOffsetLeft = this.slideEls[ 0 ].offsetLeft
127+
const cloneOffsetLeft = this.clones[ 0 ].offsetLeft
123128

124-
this.slideTranslateX = `calc((${ slideWidth }px * ${ numSlides }) + (var(--gap) * ${ numSlides }))`
129+
const diff = Math.abs( slideOffsetLeft - cloneOffsetLeft )
130+
this.slideTranslateX = ( this.isRTL ? -diff : diff ) + 'px'
131+
this.cloneTranslateX = ( this.isRTL ? diff : -diff ) + 'px'
125132

126133
step++
127134
} else if ( step === 3 ) {
@@ -297,12 +304,12 @@ class _StackableCarousel {
297304
const needToSwap = this.needToSwapCount( slide )
298305
let startIndex = 0
299306
let endIndex = 0
300-
let slideTranslateXValue = 0
307+
let useSlideTranslateX = false
301308
if ( needToSwap > 0 && this.swappedSlides < needToSwap ) {
302309
startIndex = this.swappedSlides
303310
endIndex = needToSwap
304311

305-
slideTranslateXValue = this.slideTranslateX
312+
useSlideTranslateX = true
306313

307314
this.swappedSlides = endIndex
308315
} else if ( this.swappedSlides > needToSwap ) {
@@ -317,7 +324,10 @@ class _StackableCarousel {
317324
const runSteps = () => {
318325
if ( step === 0 ) {
319326
this.slideEls.slice( startIndex, endIndex ).forEach( slide => {
320-
slide.style.transform = `TranslateX(${ slideTranslateXValue })`
327+
slide.style.transform = `translateX(${ useSlideTranslateX ? this.slideTranslateX : 0 })`
328+
} )
329+
this.clones.slice( startIndex, endIndex ).forEach( clone => {
330+
clone.style.transform = `translateX(${ useSlideTranslateX ? this.cloneTranslateX : 0 })`
321331
} )
322332
step++
323333
requestAnimationFrame( runSteps )

src/block/design-library/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const settings = {
2424
},
2525
supports: {
2626
stkSaveBlockStyle: false,
27+
inserter: false, // Always hide design library from block inserter
2728
},
2829
example: {
2930
attributes: {

src/block/map/location-control.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const LocationControl = props => {
6262
onChange={ value => {
6363
props.onTextChange( value )
6464
} }
65+
__next40pxDefaultSize
6566
/>
6667
)
6768
}

src/components/advanced-autosuggest-control/editor.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
.ugb-advanced-autosuggest-control {
22
margin-bottom: 16px;
3+
4+
.stk-inspector-control__reset-button {
5+
transform: translateY(-3px);
6+
}
37
}
48
.ugb-advanced-autosuggest-control__select {
59
> * {
610
position: relative;
711
}
812
input {
913
width: 100%;
14+
height: 40px; // Follow new WP standard.
1015
}
1116
.react-autosuggest__suggestions-container {
1217
position: absolute;

src/components/advanced-focal-point-control/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const AdvancedFocalPointControl = props => {
4242
{ ...propsToPass }
4343
value={ value || FOCAL_DEFAULT_VALUE }
4444
onChange={ typeof props.onChange === 'undefined' ? onChange : props.onChange }
45+
__nextHasNoMarginBottom
4546
/>
4647
<ResetButton
4748
allowReset={ props.allowReset }

src/components/advanced-range-control/editor.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
flex: 1;
1616
display: flex;
1717
align-items: center;
18+
height: 40px; // Follow new WP standard.
1819
.components-range-control {
1920
flex: 1;
2021
margin: 0 !important;

src/components/advanced-range-control/range-control.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ const StackableRangeControl = memo( props => {
163163
? props.sliderMax
164164
: ( props.max === Infinity ? 100 : props.max ) // Dont' allow Infinity on the slider since it will not move.
165165
}
166+
__next40pxDefaultSize
167+
__nextHasNoMarginBottom
166168
/>
167169
{ withInputField && isNumberControlSupported && (
168170
<NumberControl
@@ -177,6 +179,8 @@ const StackableRangeControl = memo( props => {
177179
value={ value }
178180
placeholder={ placeholderValue }
179181
type="text"
182+
__next40pxDefaultSize
183+
__nextHasNoMarginBottom
180184
/>
181185
) }
182186
{ _children }

src/components/advanced-select-control/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const AdvancedSelectControl = memo( props => {
3535
role="listbox"
3636
value={ typeof props.value === 'undefined' ? value : props.value }
3737
onChange={ typeof props.onChange === 'undefined' ? onChange : props.onChange }
38+
__nextHasNoMarginBottom
39+
__next40pxDefaultSize
3840
/>
3941
<ResetButton
4042
allowReset={ props.allowReset }

src/components/advanced-text-control/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const AdvancedTextControl = memo( props => {
6666
value={ internalValue }
6767
onChange={ internalOnChange }
6868
className={ classnames( propsToPass.className, 'ugb-advanced-text-control' ) }
69+
__nextHasNoMarginBottom
70+
__next40pxDefaultSize
6971
/>
7072
</DynamicContentControl>
7173
<ResetButton

0 commit comments

Comments
 (0)