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

chore: do not render extensions in iframe #2480

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bae0012
[wip] convert shell api from post message
a-b-r-o-w-n Apr 1, 2020
7549261
hoist visual designer out of iframe
a-b-r-o-w-n Apr 2, 2020
90d9f37
Fixed issues with Onboarding
tdurnford Apr 2, 2020
8c0c53c
Fixed issues with Onboarding
tdurnford Apr 2, 2020
f91fd76
Merge branch 'chore/remove-extension-container' of https://github.com…
tdurnford Apr 2, 2020
bd97339
Fixed teaching bubble placement
tdurnford Apr 2, 2020
787e9fd
remove copy css step
a-b-r-o-w-n Apr 2, 2020
90cdb9e
convert all usage of shell api to same frame implementation
a-b-r-o-w-n Apr 2, 2020
463e8e1
remove extension container and related files
a-b-r-o-w-n Apr 2, 2020
acb243c
remove unused var
a-b-r-o-w-n Apr 2, 2020
bbdfd14
change FormEditor to PropertyEditor and fix e2e
a-b-r-o-w-n Apr 2, 2020
6f3483b
Merge branch 'master' into chore/remove-extension-container
a-b-r-o-w-n Apr 2, 2020
66a7702
show loading spinner when current dialog is not set
a-b-r-o-w-n Apr 2, 2020
9ffee95
fix build errors
a-b-r-o-w-n Apr 2, 2020
4226fd5
move test tsconfig into __tests__ directory
a-b-r-o-w-n Apr 2, 2020
3180882
revert moving tsconfig to __tests__
a-b-r-o-w-n Apr 2, 2020
f064521
fix path substitution in client tests
a-b-r-o-w-n Apr 2, 2020
5914aa0
Merge branch 'master' into chore/remove-extension-container
yeze322 Apr 3, 2020
904f3e1
Merge branch 'master' into chore/remove-extension-container
a-b-r-o-w-n Apr 3, 2020
9fc03d1
remount the property editor when focus path changes
a-b-r-o-w-n Apr 3, 2020
fa211fc
Merge branch 'master' into chore/remove-extension-container
a-b-r-o-w-n Apr 3, 2020
1b17a9c
do not memoize shell data
a-b-r-o-w-n Apr 3, 2020
c31eb9a
remove route to serve extension container
a-b-r-o-w-n Apr 6, 2020
3faa5bf
fix vertical scroll on visual designer
a-b-r-o-w-n Apr 6, 2020
241f71e
reset current dialog when dialog id changes
a-b-r-o-w-n Apr 6, 2020
d7a98e6
use correct template ref syntax to get template name
a-b-r-o-w-n Apr 6, 2020
fbd230a
fix lg references in todo sample
a-b-r-o-w-n Apr 6, 2020
4484988
Merge branch 'master' into chore/remove-extension-container
a-b-r-o-w-n Apr 6, 2020
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
2 changes: 1 addition & 1 deletion Composer/cypress/integration/NotificationPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ context('Notification Page', () => {
cy.findByText('WelcomeUser').should('exist');
});

cy.withinEditor('FormEditor', () => {
cy.withinEditor('PropertyEditor', () => {
cy.findByText('Condition').should('exist');
cy.findByTestId('expression-type-dropdown-Condition')
.focus()
Expand Down
10 changes: 5 additions & 5 deletions Composer/cypress/integration/ToDoBot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ context('ToDo Bot', () => {
cy.findByTestId('ProjectTree').within(() => {
cy.findByText('__TestTodoSample.Main').click();
});
cy.withinEditor('FormEditor', () => {
cy.withinEditor('PropertyEditor', () => {
cy.findByDisplayValue('__TestTodoSample').should('exist');
});
});
Expand All @@ -23,7 +23,7 @@ context('ToDo Bot', () => {
cy.findByText('addtodo').click();
});

cy.withinEditor('FormEditor', () => {
cy.withinEditor('PropertyEditor', () => {
cy.findByDisplayValue('addtodo').should('exist');
});
});
Expand All @@ -33,7 +33,7 @@ context('ToDo Bot', () => {
cy.findByText('cleartodos').click();
});

cy.withinEditor('FormEditor', () => {
cy.withinEditor('PropertyEditor', () => {
cy.findByDisplayValue('cleartodos').should('exist');
});
});
Expand All @@ -43,7 +43,7 @@ context('ToDo Bot', () => {
cy.findByText('deletetodo').click();
});

cy.withinEditor('FormEditor', () => {
cy.withinEditor('PropertyEditor', () => {
cy.findByDisplayValue('deletetodo').should('exist');
});
});
Expand All @@ -53,7 +53,7 @@ context('ToDo Bot', () => {
cy.findByText('showtodos').click();
});

cy.withinEditor('FormEditor', () => {
cy.withinEditor('PropertyEditor', () => {
cy.findByDisplayValue('showtodos').should('exist');
});
});
Expand Down
9 changes: 5 additions & 4 deletions Composer/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ Cypress.Commands.add('createBot', (bobotId: string, botName?: string) => {
cy.findByTestId(`${bobotId}`).click();
cy.findByTestId('NextStepButton').click();
cy.findByTestId('NewDialogName').type(`{selectall}__Test${botName || bobotId}{enter}`);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
});

Cypress.Commands.add('withinEditor', (editorName, cb) => {
cy.get(`iframe[name="${editorName}"]`).then(editor => {
cy.wrap<HTMLElement>(editor.contents().find('body') as JQuery<HTMLElement>).within(cb);
});
cy.findByTestId(editorName).within(cb);
});

Cypress.Commands.add('visitPage', page => {
cy.findByTestId(`LeftNav-CommandBarButton${page}`).click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(3000);
});

Cypress.on('uncaught:exception', (err, runnable) => {
Cypress.on('uncaught:exception', err => {
// eslint-disable-next-line no-console
console.log('uncaught exception', err);
return false;
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

import React from 'react';
import { render } from 'react-testing-library';
import { DialogWrapper } from '@src/components/DialogWrapper';

import { DialogWrapper } from '../../../src/components/DialogWrapper';

describe('<DialogWrapper />', () => {
const props = {
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/__tests__/jest.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { ActionTypes } from '@src/constants';
import { ActionTypes } from '../src/constants';

declare global {
namespace jest {
Expand Down
80 changes: 0 additions & 80 deletions Composer/packages/client/__tests__/messenger/ApiClient.test.ts

This file was deleted.

77 changes: 0 additions & 77 deletions Composer/packages/client/__tests__/messenger/messenger.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import httpClient from '@src/utils/httpUtil';
import { ActionTypes } from '@src/constants';
import { fetchFolderItemsByPath } from '@src/store/action/storage';
import { Store } from '@src/store/types';
import httpClient from '../../../src/utils/httpUtil';
import { ActionTypes } from '../../../src/constants';
import { fetchFolderItemsByPath } from '../../../src/store/action/storage';
import { Store } from '../../../src/store/types';

jest.mock('@src/utils/httpUtil');
jest.mock('../../../src/utils/httpUtil');

const dispatch = jest.fn();

Expand Down
2 changes: 0 additions & 2 deletions Composer/packages/client/config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ module.exports = {
appBuild: resolveApp('../server/build/public'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
extensionContainerHtml: resolveApp('public/extensionContainer.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
extensionIndexJs: resolveModule(resolveApp, 'src/extension-container/index'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appTsConfig: resolveApp('tsconfig.json'),
Expand Down
21 changes: 0 additions & 21 deletions Composer/packages/client/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ module.exports = function(webpackEnv) {
// initialization, it doesn't blow up the WebpackDevServer client, and
// changing JS code would still trigger a refresh.
].filter(Boolean),
extension: paths.extensionIndexJs,
},
output: {
// The build folder.
Expand Down Expand Up @@ -423,26 +422,6 @@ module.exports = function(webpackEnv) {
: undefined
)
),
// Generates an `extension.html` file with the <script> injected.
new HtmlWebpackPlugin(
Object.assign(
{},
{
inject: true,
// only emit ejs in production because the dev server cannot render ejs templates
filename: isEnvProduction ? 'extensionContainer.ejs' : 'extensionContainer.html',
template: paths.extensionContainerHtml,
chunks: ['extension'],
},
isEnvProduction
? {
minify: {
removeComments: true,
},
}
: undefined
)
),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
Expand Down
2 changes: 0 additions & 2 deletions Composer/packages/client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ module.exports = {
// use commonjs modules for test so they do not need to be compiled
'office-ui-fabric-react/lib/(.*)$': 'office-ui-fabric-react/lib-commonjs/$1',
'@uifabric/fluent-theme/lib/(.*)$': '@uifabric/fluent-theme/lib-commonjs/$1',

'^@src/(.*)$': '<rootDir>/src/$1',
},
testPathIgnorePatterns: [
'/node_modules/',
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import { CreationFlow } from './CreationFlow';
import { ErrorBoundary } from './components/ErrorBoundary';
import { RequireAuth } from './components/RequireAuth';
import { CreationFlowStatus } from './constants';
import { LoadingSpinner } from './components/LoadingSpinner';

initializeIcons(undefined, { disableWarnings: true });

const Onboarding = React.lazy(() => import('./Onboarding'));

// eslint-disable-next-line react/display-name
const Content = forwardRef<HTMLDivElement>((props, ref) => <div css={content} {...props} ref={ref} />);

Expand Down Expand Up @@ -180,7 +180,7 @@ export const App: React.FC = () => {
</RequireAuth>
</ErrorBoundary>
</div>
<Suspense fallback={<LoadingSpinner />}>{!state.onboarding.complete && <Onboarding />}</Suspense>
<Suspense fallback={<div />}>{!state.onboarding.complete && <Onboarding />}</Suspense>
</div>
</Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export const teachingBubbleStyles: Partial<ITeachingBubbleStyles> = {
':hover': {
background: '#f4f4f4',
},
':focus': {
background: '#f4f4f4',
},
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ const CollapsedWelcomeModal = () => {
return (
<div css={content}>
<div>{formatMessage('Welcome')}</div>
<IconButton
iconProps={{ iconName: 'FullScreen' }}
onClick={toggleMinimized}
styles={buttonStyles}
title="Expand"
/>
<IconButton
iconProps={{ iconName: 'ChromeClose' }}
onClick={exit}
styles={{ ...buttonStyles, icon: { color: palette.white, fontSize: '12px' } }}
title="Close"
/>
<div>
<IconButton
iconProps={{ iconName: 'FullScreen' }}
onClick={toggleMinimized}
styles={buttonStyles}
title="Expand"
/>
<IconButton
iconProps={{ iconName: 'ChromeClose' }}
onClick={exit}
styles={{ ...buttonStyles, icon: { color: palette.white, fontSize: '12px' } }}
title="Close"
/>
</div>
</div>
);
};
Expand Down
Loading