-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Integrate controller into shell #6
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
base: master
Are you sure you want to change the base?
Conversation
…into feat/shell
| .where({ 'metadata.externalId': externalId }) | ||
| .indexFields(['metadata.externalId']) | ||
| .limitBy(1), | ||
| { as: `io.cozy.files/${externalId}` } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://github.com/cozy/cozy-guidelines?tab=readme-ov-file#naming-of-queries
because here, you named like getById so we'll share wrong cache (because cache is based on the as attributes)
| const path = currentlyOpenedFile | ||
| ? currentlyOpenedFile.path.replace(currentlyOpenedFile.name, '') | ||
| : '' | ||
| const sanitizedPath = path.endsWith('/') ? path.slice(0, -1) : path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty sure you have all you want in cozy-client. Either is models/file or Filecollection I don't know
| controllerApp.current.contentWindow.postMessage( | ||
| 'selectedFile:' + currentlyOpenedFile.id, | ||
| '*' | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you don't use cozy bridge for that? You should talk to @zatteo
| if (e.data === 'loaded') { | ||
| if (!controllerHasLoaded) { | ||
| setControllerHasLoaded(true) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah cozy-bridge alredy do that
| id="controllerApp" | ||
| src={controllerAppUrl} | ||
| ></iframe> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end, maybe it should be the bridge itself that render the iframe. Like that no need to create iframe on every container.
This PR allows LaSuite Docs to run in a shell environment with a container app installed.
Known issues
Required flags
docs.embedded-app-urlhttps://docs.example.comRequired deployments
Changes