-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UI Refresh: Apps, LeftDrawer, themed Typography, reorg; Hot-reload es…
…build and more (#1271) * cypress: skip broken tests. tracked in issue #1269 * cypress: skip another test. tracked in issue #1269 * checkpoint * apps: url state. sidebar: title padding cleanup. controlbutton: tooltips fixed. notes: avatar valign top, dateline linebreaks. * tests passing. * tests passing. * layout: working in landscape; checkpoint * layout: left side aligned * unit tests pass * lint passes * versions: move fetch logic to hook, more testing * SideDrawer: mobile bottom drawer mostly working * cypress passing * cypress passinger * cypress passingerer * Delete api.min.js --------- Signed-off-by: Pablo Mayrgundter <[email protected]>
- Loading branch information
1 parent
4408e87
commit 77f8aee
Showing
158 changed files
with
3,511 additions
and
2,156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
describe('apps side drawer', () => { | ||
context('enable/disable feature using url parameter', () => { | ||
beforeEach(() => { | ||
cy.setCookie('isFirstTime', '1') | ||
cy.visit('/') | ||
}) | ||
|
||
it('should not show apps icon when url parameter is not present', () => { | ||
cy.findByRole('button', {name: /Open Apps/}).should('not.exist') | ||
}) | ||
|
||
it.skip('should show apps icon when url parameter is present', () => { | ||
cy.routerNavigate('/share/v/p?feature=apps', {replace: true}) | ||
cy.findByRole('button', {name: /Open Apps/}).should('exist') | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<html> | ||
<head> | ||
<script src="https://unpkg.com/[email protected]/dist/api.min.js"></script> | ||
</head> | ||
<body> | ||
<table> | ||
<tr> | ||
<td> | ||
<iframe src="/" width="1024" height="768" id="share-app"></iframe> | ||
</td> | ||
<td valign="top"> | ||
<!-- <button onclick="window.start()">start</button> --> | ||
<div id="log"><ul id="logItems"></ul></div> | ||
</td> | ||
</tr> | ||
</table> | ||
<script src="mod.js" type="text/javascript"></script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
const {ClientWidgetApi, PostmessageTransport} = mxwidgets() | ||
|
||
|
||
/** @param {string} msg */ | ||
function log(msg) { | ||
const logElt = document.getElementById('logItems') | ||
logElt.innerHTML += `<li>${msg}</li>` | ||
} | ||
|
||
// Define the widget configuration | ||
const widget = { | ||
id: 'bldrs-share', | ||
name: 'Embedded Share App', | ||
type: 'm.custom', | ||
url: 'https://example.com/widget', | ||
creatorUserId: '@user:matrix.org', | ||
origin: '*', | ||
} | ||
|
||
// Reference the iframe element | ||
const iframe = document.getElementById('share-app') | ||
|
||
// Create a PostmessageTransport driver | ||
const driver = new PostmessageTransport(window, iframe.contentWindow) | ||
|
||
// Instantiate the ClientWidgetApi | ||
const clientWidgetApi = new ClientWidgetApi(widget, iframe, driver) | ||
|
||
console.log('clientWidgetApi', clientWidgetApi) | ||
|
||
clientWidgetApi.on('ready', () => { | ||
console.log('ON READY') | ||
clientWidgetApi.updateVisibility(true).then(() => console.log('Widget knows it is visible now')) | ||
// clientWidgetApi.transport.send('com.example.my_action', {isExample: true}) | ||
}) | ||
|
||
/** @param {string} eventName */ | ||
function register(eventName, cb) { | ||
console.log('registering:', eventName) | ||
clientWidgetApi.on(`action:ai.bldrs-share.${eventName}`, (event) => { | ||
cb(eventName, event) | ||
// clientWidgetApi.transport.reply(event, {success: true, response: 'Acknowledged!'}) | ||
}) | ||
} | ||
|
||
const events = [ | ||
'ChangeViewSettings', | ||
'HiddenElements', | ||
'ModelLoaded', | ||
'ChangeViewSettings', | ||
'LoadModel', | ||
'HighlightElements', | ||
'SelectElements', | ||
'UnhideElements', | ||
'HideElements', | ||
] | ||
events.forEach((name) => { | ||
register(name, (eventName, e) => console.log(`HANDLER ON ${eventName}:`, e.detail)) | ||
}) | ||
|
||
register('SelectionChanged', (eventName, e) => { | ||
const data = e.detail.data | ||
const currentSelection = data.current[0] | ||
log(`GUID: ${currentSelection}`) | ||
}) |
Oops, something went wrong.