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

Legacy widget's preview functionality is broken when the page is moved #34384

Merged
merged 23 commits into from
Aug 31, 2021
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b138bfe
Load preview using the new REST API endpoint.
anton-vlasenko Aug 19, 2021
a646738
1. Use previewLoaded instead of srcdoc attribute to check if the prev…
anton-vlasenko Aug 19, 2021
25e7310
1. Rename renderPreview function (code review feedback).
anton-vlasenko Aug 20, 2021
7f3b4a1
Fix bug related to isPreviewFetched state.
anton-vlasenko Aug 20, 2021
710924a
Don't call fetchPreviewHTML with arguments because we use closures now.
anton-vlasenko Aug 20, 2021
988afae
useEffect should always return a cleanup function.
anton-vlasenko Aug 20, 2021
9b5b66a
Don't call useEffect on each component rerender.
anton-vlasenko Aug 20, 2021
7129e21
1. Use an optional chaining operator instead of typeof to improve rea…
anton-vlasenko Aug 23, 2021
e159cdb
1. Don't use a custom message as it increases the bundle size and the…
anton-vlasenko Aug 24, 2021
351ad12
An attempt to fix the failing test.
anton-vlasenko Aug 24, 2021
a51602f
2nd attempt to fix the failing test.
anton-vlasenko Aug 24, 2021
7c63c4a
3rd attempt to fix the failing test.
anton-vlasenko Aug 24, 2021
8772bf4
4rd attempt to fix the failing test.
anton-vlasenko Aug 24, 2021
123c0af
5th attempt to fix the failing test.
anton-vlasenko Aug 24, 2021
7c8f6c5
A small change to trigger CI checks.
anton-vlasenko Aug 24, 2021
864d41b
Remove irrelevant comment.
anton-vlasenko Aug 25, 2021
dbf2cb4
Change REST API endpoint url because it was changed in https://github…
anton-vlasenko Aug 25, 2021
cf65b1a
1. Fix parameter names (we should use id and instance parameters).
anton-vlasenko Aug 25, 2021
3930f67
1. Fix parameter names (we should use id and instance parameters).
anton-vlasenko Aug 25, 2021
b360549
1. Revert endpoint and use /render again (because it was changed in t…
anton-vlasenko Aug 26, 2021
6be25ae
Fix request parameters.
anton-vlasenko Aug 26, 2021
145a379
Get rid of the id_base parameter.
anton-vlasenko Aug 30, 2021
8b1507f
Don't send request parameters if the instance is empty.
anton-vlasenko Aug 30, 2021
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
Prev Previous commit
Next Next commit
An attempt to fix the failing test.
  • Loading branch information
anton-vlasenko committed Aug 30, 2021
commit 351ad12d0b2473b8070dcfb4d16a87789e9c2e57
4 changes: 2 additions & 2 deletions packages/e2e-tests/specs/widgets/editing-widgets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ describe( 'Widgets screen', () => {
// Wait for the Legacy Widget block's preview iframe to load.
const frame = await new Promise( ( resolve ) => {
const checkFrame = async ( candidateFrame ) => {
const url = await candidateFrame.url();
if ( url.includes( 'legacy-widget-preview' ) ) {
const title = await candidateFrame.title();
if ( 'Legacy Widget Preview' === title ) {
page.off( 'frameattached', checkFrame );
page.off( 'framenavigated', checkFrame );
resolve( candidateFrame );
Expand Down