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

Page Attachment block #3035

Merged
merged 106 commits into from
Sep 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
452ac66
Start adding Page Attachment.
miina Aug 12, 2019
c428127
Continue implementing the embed logic.
miina Aug 12, 2019
b04a4c8
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 13, 2019
006d727
Start adding UI.
miina Aug 13, 2019
5efea98
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 14, 2019
2e46d65
Add basics for UI.
miina Aug 14, 2019
d727355
Make sure Page Attachment can be added only when allowed.
miina Aug 14, 2019
40d5c3e
Allow editing cta text.
miina Aug 14, 2019
d7e8022
Fix attribute source.
miina Aug 14, 2019
2b6b241
Add title input.
miina Aug 14, 2019
51defdf
Fix dynamic rendering in PHP.
miina Aug 14, 2019
2d21ec4
Implement dark theme.
miina Aug 14, 2019
e200267
Improve styling.
miina Aug 14, 2019
ad2adaf
Fix some eslint issues.
miina Aug 14, 2019
db50d02
Display Page Attachment in Block Navigation.
miina Aug 14, 2019
df27d56
Get actual posts content to the attachment.
miina Aug 14, 2019
7fda4f4
Fix comment.
miina Aug 14, 2019
e5d8554
Merge branch 'develop' into add/1973-page_attachment
swissspidy Aug 16, 2019
b5c49b1
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 20, 2019
6347240
Add color options for the text and background.
miina Aug 20, 2019
835d250
Display title as well.
miina Aug 20, 2019
abab342
Add a bit better icon.
miina Aug 20, 2019
292bbe0
Add padding to content.
miina Aug 20, 2019
2678451
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 21, 2019
956c5aa
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 21, 2019
0d37d9d
Ensure that the title can actually be editied in the opened attachment.
miina Aug 21, 2019
e7431d7
Add better default color for dark theme.
miina Aug 21, 2019
21fb00c
Merge branch 'add/1973-page_attachment' of github.com:ampproject/amp-…
miina Aug 21, 2019
1b21019
Start adding PostSelector component.
miina Aug 22, 2019
35ccc4a
Add PostSelector component.
miina Aug 22, 2019
36c9192
Add PropTypes.
miina Aug 22, 2019
6fca143
Add removing post.
miina Aug 22, 2019
c3858c9
Keep attachment open until closed.
miina Aug 22, 2019
d8cac84
Add styling for the post selector.
miina Aug 22, 2019
6fc183c
Disable stylelint line.
miina Aug 22, 2019
462e5f9
Merge branch 'develop' into add/1973-page_attachment
swissspidy Aug 23, 2019
893ac66
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 26, 2019
be537d6
Merge branch 'add/1973-page_attachment' of github.com:ampproject/amp-…
miina Aug 26, 2019
d46e068
Include pages to search, too.
miina Aug 26, 2019
29499ef
Display title in the editor, too.
miina Aug 26, 2019
dad6e22
Remove theme option from the Attachment.
miina Aug 26, 2019
0563f81
Fix phpcs.
miina Aug 26, 2019
3532fcc
Fix style when there is block validation error present.
miina Aug 26, 2019
3d3d623
Add column styles to Page Attachment.
miina Aug 26, 2019
eaf9f40
Remove amp-grid-layer wrapper filter within attachment content.
miina Aug 26, 2019
72bf6c3
Fix style for quote block in the FE.
miina Aug 27, 2019
1050928
Start adding e2e tests.
miina Aug 27, 2019
6666c3e
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 27, 2019
47916c7
Add remaining e2e tests.
miina Aug 27, 2019
62831f5
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Aug 29, 2019
ff5e384
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Sep 1, 2019
e33a398
Move attachment opener to a separate file.
miina Sep 1, 2019
3976c35
Move Attachment content to a separate component.
miina Sep 1, 2019
5274d15
Make removing post and closing attachment reliable.
miina Sep 1, 2019
27bdbd4
Move background color settings to a separate component.
miina Sep 1, 2019
6602d33
Move Page Settings to a separate component.
miina Sep 1, 2019
e75579b
Add missing onkeydown handler.
miina Sep 1, 2019
5800734
Exclude background opacity.
miina Sep 1, 2019
782a1b1
Fix default placeholder text
swissspidy Sep 2, 2019
80b29b5
Fix import order
swissspidy Sep 2, 2019
d813d69
Change case for block type title
swissspidy Sep 2, 2019
ca02a40
Change import order
swissspidy Sep 2, 2019
e25cabb
Remove errant comma
swissspidy Sep 2, 2019
f578159
Remove redundant post fetching.
miina Sep 2, 2019
4acefda
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Sep 2, 2019
19a3e99
Improve selector styling.
miina Sep 2, 2019
f3f3fee
Update case in tests
swissspidy Sep 2, 2019
113ce65
Add possibility to try fetching again.
miina Sep 2, 2019
a0b78cc
Reuse existing unMovableblock property.
miina Sep 2, 2019
716251d
Remove test post ID.
miina Sep 2, 2019
c84835b
Use ALLOWED_MOVABLE_BLOCKS
miina Sep 2, 2019
4ffff07
Update block's name in tests, too.
miina Sep 2, 2019
c34a445
Merge branch 'add/1973-page_attachment' of github.com:ampproject/amp-…
miina Sep 2, 2019
a30adde
Fix phpcs.
miina Sep 2, 2019
999e4fd
Remove redundant isFetching.
miina Sep 2, 2019
7b153b8
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Sep 2, 2019
5a389b7
Merge remote-tracking branch 'origin/develop' into add/1973-page_atta…
miina Sep 3, 2019
a0ee3d2
Merge branch 'develop' into add/1973-page_attachment
swissspidy Sep 9, 2019
6bcc447
Merge branch 'develop' into add/1973-page_attachment
swissspidy Sep 10, 2019
f1be251
Use empty() to check for postId
swissspidy Sep 10, 2019
fd6f83d
Merge branch 'develop' into add/1973-page_attachment
swissspidy Sep 11, 2019
a81e85d
Set global post to use the_title() and the_content()
swissspidy Sep 11, 2019
c228758
Update selectors on frontend
swissspidy Sep 11, 2019
5e47558
Lint fixes
swissspidy Sep 11, 2019
164aca8
Add inner wrapper div
swissspidy Sep 11, 2019
9fd3648
Fix class name
swissspidy Sep 11, 2019
c90bf10
Add missing dev dependency
swissspidy Sep 11, 2019
bc90bca
Docs improvements
swissspidy Sep 11, 2019
5438d09
Make post type list dynamic
swissspidy Sep 11, 2019
f2ee1e8
Add docblock
swissspidy Sep 11, 2019
c6d0e9c
Move docblock directly to class
swissspidy Sep 11, 2019
3360881
Add docblock
swissspidy Sep 11, 2019
cbe3bc8
Make string more generic
swissspidy Sep 11, 2019
30f2910
Make movable block checks more DRY throughout the code base
swissspidy Sep 11, 2019
c7f5130
Close dropdown when pressing ESC
swissspidy Sep 11, 2019
949486a
Merge branch 'develop' into add/1973-page_attachment
swissspidy Sep 11, 2019
64e3e3a
Remove unneeded fragment
swissspidy Sep 11, 2019
438dde3
Extract background media settings into separate functional component
swissspidy Sep 11, 2019
567eb6c
Make Autocomplete component a first class citizen
swissspidy Sep 11, 2019
225a2b1
Add missing dev dependency
swissspidy Sep 11, 2019
2517363
Merge branch 'develop' into add/1973-page_attachment
swissspidy Sep 12, 2019
86fa63b
Merge branch 'develop' into add/1973-page_attachment
swissspidy Sep 12, 2019
c888240
Fix copy / duplicate in attachment blocks.
spacedmonkey Sep 12, 2019
38e49e3
Fix position of closing if statement.
spacedmonkey Sep 12, 2019
86bdb54
Remove todo
spacedmonkey Sep 12, 2019
b6b11ef
Skip tests until we can work out why they fail in travis.
spacedmonkey Sep 12, 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
12 changes: 11 additions & 1 deletion assets/src/stories-editor/components/post-selector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scrollIntoView from 'dom-scroll-into-view';
*/
import { __, sprintf, _n } from '@wordpress/i18n';
import { Component, createRef } from '@wordpress/element';
import { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';
import { UP, DOWN, ENTER, TAB, ESCAPE } from '@wordpress/keycodes';
import { Spinner, withSpokenMessages, Popover } from '@wordpress/components';
import { withInstanceId, withSafeTimeout, compose } from '@wordpress/compose';
import apiFetch from '@wordpress/api-fetch';
Expand Down Expand Up @@ -219,6 +219,16 @@ class PostSelector extends Component {
}
break;
}
case ESCAPE: {
event.stopPropagation();
event.preventDefault();
this.setState( {
showSuggestions: false,
selectedSuggestion: null,
loading: false,
} );
break;
}
default:
break;
}
Expand Down