Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMP Stories: The Next Iteration #1884

Merged
merged 1,395 commits into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1395 commits
Select commit Hold shift + click to select a range
09f5f24
Add this.onSplit for enabling pasting.
miina May 6, 2019
5e0370d
Add missing JS and CSS files to the build
westonruter May 6, 2019
1fa9ecf
Force pages to have full height when reordering (#2249)
swissspidy May 6, 2019
e253101
Move setting caption out of render method. (#2264)
swissspidy May 6, 2019
7db13c7
Fix broken CSS. (#2262)
swissspidy May 6, 2019
37683f2
Fix not resized image appearing very small in the frontend (#2250)
swissspidy May 6, 2019
050cb52
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 7, 2019
70face8
Merge remote-tracking branch 'origin/amp-stories-redux' into fix/text…
miina May 7, 2019
df0f4ad
Restore element size after calculating the font size.
miina May 7, 2019
f202dcf
Hide the block inserter and the shortcuts when reordering pages
kienstra May 7, 2019
baee787
Fix auto font size displaying larger than the Text block area. (#2267)
swissspidy May 7, 2019
71fbcf3
Merge pull request #2246 from ampproject/fix/text-block-pasting
swissspidy May 7, 2019
adcee00
Use postcss-themes where applicable
swissspidy May 7, 2019
83ca98a
Add some whitespace
swissspidy May 7, 2019
79c0415
object destructuring and doc improvements
swissspidy May 8, 2019
b734f1c
AMP Stories -> Stories
swissspidy May 8, 2019
1785917
Fix rotation + animation conflict. (#2196)
swissspidy May 8, 2019
df8a08b
Enforce using block editor for the story post type
swissspidy May 8, 2019
b51aa6a
Disallow using Classic Editor plugin for stories
swissspidy May 8, 2019
55a519f
Fix whitespace in docs
swissspidy May 8, 2019
4e7a0ce
Merge pull request #2271 from ampproject/amp-story/use-block-editor-a…
westonruter May 8, 2019
8f3ba1f
Merge pull request #2269 from ampproject/amp-story/color-schemes
westonruter May 8, 2019
a307b7e
Restore drag icon when not selected.
miina May 8, 2019
40f3598
Adjust positioning the clone to accommodate rotation.
miina May 8, 2019
e8ce552
Fix getting correct position before setting attributes.
miina May 8, 2019
954a239
Fix sizing the clone properly.
miina May 8, 2019
d3607e1
Open documentation link in new tab/window
swissspidy May 8, 2019
5588970
Try enforcing selecting the bock after drag/drop
miina May 8, 2019
68dd160
Open documentation link in new tab/window (#2272)
swissspidy May 8, 2019
dc44e4d
Keep the block selected after rotation/dragging
miina May 8, 2019
12f8adb
Remove unused import.
miina May 8, 2019
d90950c
Remove unused prop.
miina May 9, 2019
90e6326
Update docs.
miina May 9, 2019
ef1cdb4
Always use rgba value for background color.
miina May 9, 2019
a423fbe
Move block positioning to block sidebar.
miina May 9, 2019
fac7b0c
Add icons for the controls.
miina May 9, 2019
cafecd2
Update webpack dep
swissspidy May 9, 2019
cff2ec8
Use ifCondition and withIsReordering
swissspidy May 9, 2019
b554a84
Merge branch 'amp-stories-redux' into amp-story/rebrand
swissspidy May 9, 2019
0722156
Update docs
swissspidy May 9, 2019
3f6650f
Fix imports
swissspidy May 10, 2019
e764b2f
Update tests.
miina May 10, 2019
37b42a0
Make the experience of rotation and resizing consistent.
miina May 10, 2019
cb3dabd
Display rotatation handle for the block that's rotating.
miina May 10, 2019
45b357e
Merge branch 'amp-story/2252-rework_dragging' of github.com:ampprojec…
miina May 10, 2019
c390850
Fix backgroundPosition to fall back to backgroundPosition
swissspidy May 10, 2019
6bf66a4
Remove unnecessary key attributes
swissspidy May 10, 2019
9b2c96a
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 10, 2019
91d287a
Revert snapshot change.
miina May 10, 2019
5a5ed1a
Update tests
swissspidy May 10, 2019
54aa8d0
Revert unnecessary changes for multiselection.
miina May 10, 2019
72c8307
Fix background opacity. (#2278)
swissspidy May 10, 2019
76145b5
Allow dragging rotated, unselected blocks (#2273)
swissspidy May 10, 2019
0cf155d
Use constants for min/max font size
swissspidy May 10, 2019
08711be
Simplify selector
swissspidy May 10, 2019
a9f2cd4
Show amp-fit-text settings for meta blocks
swissspidy May 10, 2019
4f7fe21
Do ampFitText calculation for meta blocks
swissspidy May 10, 2019
e7a677e
Increase default height for post title block
swissspidy May 10, 2019
08863b8
Use inline display to make font size calculation work
swissspidy May 10, 2019
e774744
Hide the block inserter and the shortcuts when reordering pages (#2266)
swissspidy May 10, 2019
804c84b
Merge pull request #2270 from ampproject/amp-story/rebrand
westonruter May 11, 2019
8f69b1b
Merge branch 'amp-stories-redux' into fix/video-block-defaults
swissspidy May 11, 2019
2a430d4
Add video featured image as poster if available
swissspidy May 11, 2019
f80e6c8
Merge branch 'amp-stories-redux' into amp-story/disable-theme-font-sizes
swissspidy May 11, 2019
f17c14d
Move HOC to subfolder
swissspidy May 11, 2019
61b2375
Fix issue after merge
swissspidy May 11, 2019
c6df331
Stylelint: ignore generated CSS
swissspidy May 11, 2019
2f13969
Stylelint: disable number-leading-zero rule
swissspidy May 11, 2019
32ffbd0
Some CSS CS improvements
swissspidy May 11, 2019
a3e65fd
Prevent video block from causing AMP validation errors in stories (#2…
swissspidy May 11, 2019
144e09b
Remove the logic that stripped attributes disallowed in AMP
kienstra May 11, 2019
4c13a01
Update the DocBlock for the recent change
kienstra May 12, 2019
48a8af7
Fix templates' validation errors.
miina May 13, 2019
ba6b1e7
Extend dropzone area.
miina May 13, 2019
0eaf73e
Fix templates' validation errors. (#2290)
swissspidy May 13, 2019
f9d2d98
Merge branch 'develop' into amp-stories-redux
swissspidy May 13, 2019
03848c8
Calculate resizing based on rotation.
miina May 13, 2019
298c5f4
Merge branch 'develop' into amp-stories-redux
swissspidy May 13, 2019
f39fb77
Rewrite validation error handling
swissspidy May 5, 2019
c75ec7a
Move components out of utils
swissspidy May 13, 2019
59e24cc
Fix data store
swissspidy May 13, 2019
25732c3
Fix webpack config
swissspidy May 13, 2019
76069af
Align arrows
swissspidy May 13, 2019
6879b11
Add class name to toolbar in order to hide alignment options for sele…
swissspidy May 13, 2019
4a13c25
Change selector to also enable hiding video toggles
swissspidy May 13, 2019
d8ef3ca
Remove unused import
swissspidy May 13, 2019
727aeaf
Always add padding to text block in editor
swissspidy May 13, 2019
6d22204
Move CSS to the block’s edit.css file
swissspidy May 13, 2019
4ddf7ec
Extract block size constants
swissspidy May 13, 2019
eabd44b
Extract font size constants
swissspidy May 13, 2019
6fd6a04
Do not add font-size inline style when using amp-fit-text anyway
swissspidy May 13, 2019
6c056b7
Use percentages with decimals
swissspidy May 14, 2019
69b1de6
Update docs
swissspidy May 14, 2019
bbd35d4
Fix applying background color
swissspidy May 14, 2019
4e2c82a
Adjust min block sizes
swissspidy May 14, 2019
3ae3153
Merge branch 'develop' into amp-stories-redux
swissspidy May 14, 2019
39d3a57
Prevent using video icon as poster when no featured image assigned
westonruter May 14, 2019
ab3e0d2
Prevent using video icon as poster when no featured image assigned (#…
swissspidy May 14, 2019
a9a7119
Address AMP Stories embed and Latest Stories styling issues (#2245)
swissspidy May 14, 2019
2df7cdf
Fix block navigation label class name to correct styling
swissspidy May 14, 2019
605f1c8
Merge pull request #2295 from ampproject/amp-story/image-alignment-v2
westonruter May 14, 2019
4fd66e6
Merge pull request #2303 from ampproject/amp-story/block-nav-label-st…
westonruter May 14, 2019
f651a38
Explicitly export variables
swissspidy May 14, 2019
1676ec1
Simplify code using domReady
swissspidy May 14, 2019
d4f62ef
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 14, 2019
70f5303
Initial try for calculating repositioning when resizing.
miina May 14, 2019
d49b54d
Fix and greatly improve validated url edit screen script handling
swissspidy May 14, 2019
10372a6
Merge & resolve conflicts.
miina May 14, 2019
f78edb3
Add controls for moving the block back / front.
miina May 14, 2019
85a5417
maybeSetInitialSize: also set initial height of text blocks based on …
swissspidy May 14, 2019
88a3753
When turning off amp-fit-text, stick with previously used autoFontSiz…
swissspidy May 14, 2019
f1de43e
Revert change to getPercentageFromPixels
swissspidy May 14, 2019
51ee2c3
Merge pull request #2243 from ampproject/amp-story/disable-theme-font…
westonruter May 14, 2019
e95bc41
Restore previous script order
swissspidy May 14, 2019
0b5cbae
Undo unwanted change
swissspidy May 14, 2019
385663e
Don’t wait for domReady to unregister block types
swissspidy May 14, 2019
356503b
Update tests
swissspidy May 14, 2019
8ef45f3
Get color object to pass to getBackgroundColorWithOpacity()
swissspidy May 14, 2019
91ee8f3
Merge pull request #2320 from ampproject/amp-story/2277-opacity-v2
westonruter May 14, 2019
abf6dd2
Merge branch 'amp-stories-redux' into amp-story/text-block-padding
swissspidy May 15, 2019
d61fb62
Explicitly register non-public post type for test_enqueue_block_assets
westonruter May 15, 2019
84a406a
Reset wp_scripts and wp_styles in Test_AMP_Post_Meta_Box
westonruter May 15, 2019
dc4c419
amp-editor-blocks cannot rely on amp-block-editor
swissspidy May 15, 2019
b9d1b33
Depend on amp-editor-blocks in stories editor
swissspidy May 15, 2019
89104ea
Don’t register AMP dependent blocks in the first place
swissspidy May 15, 2019
f5d51e7
Update icons.
miina May 15, 2019
21f5347
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 15, 2019
c4bd3df
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 15, 2019
6621a7a
Make getting percentage value from pixels more precise.
miina May 15, 2019
8b58b2e
Update templates.
miina May 15, 2019
3ccc83d
Remove commented out code.
miina May 15, 2019
3e7c44f
Replace the default image resizing box.
miina May 15, 2019
e5e58aa
Adjust button attributes.
miina May 15, 2019
d6096ea
Merge branch 'develop' into amp-stories-redux
swissspidy May 15, 2019
c195425
Update packages
swissspidy May 15, 2019
e13bb15
Properly render inspector controls
swissspidy May 15, 2019
ea58637
Adjust position of AMP inspector controls
swissspidy May 15, 2019
474d5e8
Fix tests
swissspidy May 15, 2019
9230f8f
Merge branch 'amp-stories-redux' into amp-story/2181-move_order_changing
swissspidy May 15, 2019
6978673
Merge branch 'amp-stories-redux' into fix/block-validation-handling
swissspidy May 15, 2019
fd3e5e9
Optimize SVGs and remove fill attribute
swissspidy May 15, 2019
c03a53a
Fix overall styling and a11y of block order controls
swissspidy May 15, 2019
2abd61f
capital_P_dangit
swissspidy May 15, 2019
b1993bf
Refactoring and improving validation error handling (#2285)
swissspidy May 15, 2019
d9f053b
Add tests for getBlockOrderDescription
swissspidy May 15, 2019
b585f2e
Move block positioning to block sidebar. (#2279)
swissspidy May 15, 2019
f17da4f
Merge branch 'amp-stories-redux' into amp-story/2252-rotated_block_fixes
swissspidy May 15, 2019
f58a622
Merge branch 'amp-stories-redux' into amp-story/2281-fit-text-font-size
swissspidy May 15, 2019
8d3fb8f
Merge branch 'amp-story/2281-fit-text-font-size' into amp-story/text-…
swissspidy May 15, 2019
33ed2f3
Remove unnecessary needsTextSettings check
swissspidy May 15, 2019
4614dae
Remove duplicate consts
swissspidy May 15, 2019
d939085
Change story title placeholder
swissspidy May 15, 2019
097bc4b
Use offsetHeight for post title block too
swissspidy May 15, 2019
e0ef549
Apply same changes to other meta blocks as well
swissspidy May 16, 2019
13fd710
Somewhat fake auto height by adjusting while typing
swissspidy May 16, 2019
ca1fc05
Greatly simplify createSkeletonTemplate
swissspidy May 16, 2019
33a7d6d
Use variables for dropzone.
miina May 16, 2019
eca05ef
Create separate function for pythagorean.
miina May 16, 2019
e3c656f
Use 100% height for images in the editor, too.
miina May 16, 2019
172649b
Fix display for image block.
miina May 16, 2019
2b862fc
Fix CS.
miina May 16, 2019
f6f94bf
Improve calculation of the new width and height.
miina May 16, 2019
ed72813
Add tests.
miina May 16, 2019
436a3b8
Fix assigning incorrect attributes to image block.
miina May 16, 2019
1e8d4df
Fix some docs
swissspidy May 16, 2019
af6a995
Return early in isAMPEnabled for amp stories
swissspidy May 16, 2019
b1b5169
Some more docs improvements
swissspidy May 16, 2019
e20e4bd
Properly attach validation errors to nested blocks
swissspidy May 16, 2019
9808422
Fix assigning incorrect attributes to image block. (#2331)
swissspidy May 16, 2019
58763bb
Merge branch 'amp-stories-redux' into amp-story/2307-improve-skeleton…
swissspidy May 16, 2019
f949e76
Keep layout-relevant block attributes
swissspidy May 16, 2019
dd2730f
Update packages
swissspidy May 16, 2019
ba14b1b
Merge branch 'amp-stories-redux' into amp-story/2252-rotated_block_fixes
swissspidy May 16, 2019
47234c4
Merge branch 'amp-stories-redux' into amp-story/text-block-padding
swissspidy May 16, 2019
8cc6e18
Improved layout for amp-fit-text
swissspidy May 16, 2019
baffe1d
Lower default autoFontSize
swissspidy May 16, 2019
1398fb8
Bring back tooltips for story controls
swissspidy May 16, 2019
ad20f5c
Merge branch 'develop' of github.com:ampproject/amp-wp into amp-stori…
westonruter May 16, 2019
2e24d23
Add amp-fit-text editor styling for meta blocks
swissspidy May 16, 2019
0260177
Increase default block height for text blocks
swissspidy May 16, 2019
0f6a46a
Change meta block height update condition
swissspidy May 16, 2019
943dc86
Adjust minimum sizes.
miina May 16, 2019
1907c8e
Reset ampFitText to default
swissspidy May 17, 2019
ce80b2f
Properly bring back tooltip for inserter too
swissspidy May 17, 2019
2cfbffd
Greatly simplify createSkeletonTemplate (#2329)
swissspidy May 17, 2019
18b32db
Bring back tooltips for story controls (#2336)
swissspidy May 17, 2019
8c513db
If the Latest Stories CSS isn't present in the editor, add it as a <l…
kienstra May 17, 2019
ab2b669
Add comments describing the need to add the stylesheet
kienstra May 17, 2019
422f5c2
Re-use registered STORY_CARD_CSS_SLUG style
westonruter May 17, 2019
c7594a9
Move exporting of latest stories block data to latest stories component
westonruter May 17, 2019
469cca9
Prevent registering Latest Stories block when stories not enabled
westonruter May 17, 2019
1e64b2f
Use componentDidMount
swissspidy May 17, 2019
cc06129
Prevent adding inline script when not needed
westonruter May 17, 2019
542e585
Use amp-block-editor instead of amp-editor-blocks
westonruter May 17, 2019
94ce95d
Fix test for ampLatestStoriesBlockData
westonruter May 17, 2019
b21d6de
Remove unnecessary hook
swissspidy May 17, 2019
a8cfb30
Fix Latest Stories block styling; prevent registering block when Stor…
swissspidy May 17, 2019
9649e24
Improve text block size handling (#2296)
swissspidy May 17, 2019
03f2375
Merge branch 'amp-stories-redux' into amp-story/2252-rotated_block_fixes
swissspidy May 17, 2019
f4e65ca
Update templates after #2296
swissspidy May 17, 2019
3b7c8fb
Merge amp-stories-redux % resolve conflicts.
miina May 20, 2019
332b7a5
Fix properties for setting image width and height.
miina May 20, 2019
a49d338
Merge pull request #2351 from ampproject/amp-story/2350-fix_media_lib…
miina May 20, 2019
a5ed5be
Force selecting the block after resizing / rotating.
miina May 20, 2019
102b03b
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 20, 2019
4bb6faa
Remove unused property.
miina May 20, 2019
41a34cc
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 20, 2019
b08e562
Add the Latest Stories hook
kienstra May 20, 2019
88826ef
Merge pull request #2355 from ampproject/update/latest-stories-hook
westonruter May 21, 2019
7ea9a7e
Merge remote-tracking branch 'origin/amp-stories-redux' into amp-stor…
miina May 21, 2019
a322334
Merge pull request #2310 from ampproject/amp-story/2252-rotated_block…
miina May 21, 2019
e21da73
Merge branch 'develop' into amp-stories-redux
swissspidy May 21, 2019
b5aba54
Merge & resolve conflicts.
miina May 21, 2019
dc8ef63
Apply same padding on frontend as in editor
swissspidy May 21, 2019
c1517c3
Correctly use amp-fit-text on frontend for meta blocks
swissspidy May 21, 2019
270ca5c
Update WordPress JS packages
swissspidy May 21, 2019
9d2092f
Update tests, skip currently failing ones
swissspidy May 21, 2019
2fd4981
ESLint fixes
swissspidy May 21, 2019
16e17e6
Do not try to download Chromium by default
swissspidy May 21, 2019
c949a0e
Merge pull request #2364 from ampproject/fix/no-chromium-download
westonruter May 21, 2019
a748160
Fix dragging after resizing / rotation (#2352)
swissspidy May 21, 2019
2559602
Merge branch 'amp-stories-redux' of github.com:ampproject/amp-wp into…
westonruter May 21, 2019
7247341
Update title page template
swissspidy May 21, 2019
8fae309
Travis: run nvm without specific version in order to use nvmrc file
swissspidy May 21, 2019
98e0c76
Update snapshots
swissspidy May 21, 2019
ec0d121
Update webpack config
swissspidy May 21, 2019
c4d442f
Add temporary patch for dependency-extraction-webpack-plugin
swissspidy May 21, 2019
c559fee
Run build to create json files for script dependencies
swissspidy May 21, 2019
33c4598
Remove unused amp-admin-pointer.js file
swissspidy May 21, 2019
201dd57
On second thought, ignore deps.json files
swissspidy May 21, 2019
2572ceb
Further FE/Editor disparity improvements (#2360)
swissspidy May 21, 2019
898b2bc
Update script dependencies to use JSON files as source of truth
swissspidy May 21, 2019
67ec852
Add lint:php:fix script
swissspidy May 21, 2019
b5af2b1
Update tests
swissspidy May 21, 2019
a80b4f2
Update Gruntfile
swissspidy May 21, 2019
301f8a0
Fix wp_enqueue_script call
swissspidy May 21, 2019
f141916
Update another test
swissspidy May 21, 2019
a5a6f05
Merge branch 'amp-stories-redux' into amp-story/update-packages
swissspidy May 21, 2019
ce85484
Add wrapper script for phpcbf to convert 1 exit code to 0 exit code
westonruter May 21, 2019
cc28abd
Update list of files to be cleaned
swissspidy May 21, 2019
9a9beca
Clean files _before_ JS build
swissspidy May 21, 2019
cd73f8d
Merge pull request #2363 from ampproject/amp-story/update-packages
westonruter May 21, 2019
3f7deab
Merge branch 'develop' of github.com:ampproject/amp-wp into amp-stori…
westonruter May 21, 2019
85f8c1f
Only run WordPress 5.2 in PHP>=5.6
westonruter May 21, 2019
c264d37
Don't add the Latest Stories data in the AMP Story editor
kienstra May 21, 2019
c8a9ec0
Increase default minimum block height for meta blocks
swissspidy May 21, 2019
f367840
Merge pull request #2368 from ampproject/amp-story/2189-meta-minimum-…
westonruter May 21, 2019
98f0308
Update a unit test for the change in c264d37
kienstra May 21, 2019
1ec1916
Unregister the post type after each test
kienstra May 21, 2019
123e01c
Merge pull request #2369 from ampproject/update/restrict-adding-data
westonruter May 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .babelrc

This file was deleted.

1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extends @wordpress/browserslist-config
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/*.min.js
**/node_modules/**
**/vendor/**
**/assets/js/*-compiled.js
**/assets/js/*.js
!assets/js/amp-service-worker-runtime-precaching.js
build/*
215 changes: 14 additions & 201 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,203 +1,16 @@
{
"root": true,
"extends": [
"wordpress",
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react"
],
"env": {
"browser": true
},
"globals": {
"wp": true,
"window": true,
"document": true,
"Set": true
},
"settings": {
"react": {
"pragma": "wp",
"version": "16.6"
}
},
"rules": {
"no-magic-numbers": [2, { "ignoreArrayIndexes": true, "ignore": [ -1, 0, 1 ] }],
"array-bracket-spacing": [
"error",
"always"
],
"brace-style": [
"error",
"1tbs"
],
"camelcase": [
"error",
{
"properties": "never"
}
],
"comma-dangle": [
"error",
"never"
],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": [
"error",
"always"
],
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"func-call-spacing": "error",
"indent": [
"error",
"tab",
{
"SwitchCase": 1
}
],
"key-spacing": "error",
"keyword-spacing": "error",
"lines-around-comment": "off",
"no-alert": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-console": "error",
"no-debugger": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-else-return": "error",
"no-eval": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"no-multi-spaces": "error",
"no-multi-str": "off",
"no-negated-in-lhs": "error",
"no-nested-ternary": "error",
"no-redeclare": "error",
"no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.name=/^__|_n|_x$/]:not([arguments.0.type=/^Literal|BinaryExpression$/])",
"message": "Translate function arguments must be string literals."
},
{
"selector": "CallExpression[callee.name=/^_n|_x$/]:not([arguments.1.type=/^Literal|BinaryExpression$/])",
"message": "Translate function arguments must be string literals."
},
{
"selector": "CallExpression[callee.name=_nx]:not([arguments.2.type=/^Literal|BinaryExpression$/])",
"message": "Translate function arguments must be string literals."
}
],
"no-shadow": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-unreachable": "error",
"no-unsafe-negation": "error",
"no-unused-expressions": "error",
"no-unused-vars": "error",
"no-useless-return": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": [
"error",
"always"
],
"padded-blocks": [
"error",
"never"
],
"quote-props": [
"error",
"as-needed"
],
"react/display-name": "off",
"react/no-children-prop": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"semi": "error",
"semi-spacing": "error",
"space-before-blocks": [
"error",
"always"
],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": [
"error",
"always"
],
"space-infix-ops": [
"error",
{
"int32Hint": false
}
],
"space-unary-ops": [
"error",
{
"overrides": {
"!": true,
"yield": true
}
}
],
"valid-jsdoc": [
"error",
{
"prefer": {
"arg": "param",
"argument": "param",
"extends": "augments",
"returns": "return"
},
"preferType": {
"array": "Array",
"bool": "boolean",
"Boolean": "boolean",
"float": "number",
"Float": "number",
"int": "number",
"integer": "number",
"Integer": "number",
"Number": "number",
"object": "Object",
"String": "string",
"Void": "void"
},
"requireParamDescription": false,
"requireReturn": false
}
],
"valid-typeof": "error",
"yoda": "off"
}
"root": true,
"extends": [ "plugin:@wordpress/eslint-plugin/recommended", "plugin:jest/recommended" ],
"settings": {
"react": {
"pragma": "wp",
"version": "16.6"
}
},
"globals": {
"browser": true,
"page": true,
"wp": true,
"Set": true
}
}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
node_modules
wiki
amp.zip
assets/js/*-compiled.js
assets/css/*-compiled.css
assets/css/*-compiled-rtl.css
assets/css/*.map
assets/js/*.js
assets/js/*.deps.json
!assets/js/amp-service-worker-runtime-precaching.js
assets/js/*.map
built
/amphtml
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
assets/css/*-compiled.css
assets/css/*-compiled-rtl.css
7 changes: 7 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "stylelint-config-wordpress",
"rules": {
"selector-type-no-unknown": [ true, { "ignore": ["custom-elements"] } ],
"number-leading-zero": null
}
}
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ cache:
- $HOME/phpunit-bin
- $HOME/deployment-targets

env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

install:
- nvm install 8.11.4 && nvm use 8.11.4
- nvm install
- composer install
- export DEV_LIB_PATH=vendor/xwp/wp-dev-lib/scripts
- source "$DEV_LIB_PATH/travis.install.sh"
- npx grunt shell:webpack_production
- npm run build:js

script:
- source "$DEV_LIB_PATH/travis.script.sh"
Expand All @@ -40,13 +42,13 @@ jobs:
include:
- stage: test
php: "7.3"
env: WP_VERSION=5.0
env: WP_VERSION=latest
- php: "5.4"
env: WP_VERSION=4.9 DEV_LIB_SKIP=phpcs
- php: "5.5"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
env: WP_VERSION=5.0 DEV_LIB_SKIP=phpcs
- php: "5.6"
env: WP_VERSION=4.9 DEV_LIB_SKIP=phpcs
env: WP_VERSION=5.1 DEV_LIB_SKIP=phpcs
- php: "5.6"
env: WP_VERSION=latest DEV_LIB_SKIP=phpcs
- php: "7.0"
Expand Down
Loading