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

feat: add a trust project for live preview in phoenix iframe- browser only #1266

Merged
merged 3 commits into from
Jan 6, 2024

Conversation

abose
Copy link
Member

@abose abose commented Jan 6, 2024

Improve live preview safety.

In desktop builds, each project is securely sandboxed in its own live preview server:port domain.
This setup ensures security within the browser sandbox, eliminating the need for a trust confirmation dialog. We can display the live preview immediately.

In browsers, since all live previews for all projects uses the same phcode.live domain, untrusted projects can access data of past opened projects. So we have to show a trust project? dialog in live preview in browser.

Future plans for browser versions include adopting a similar approach to dynamically generate URLs in the format project-name.phcode.live. This will streamline the workflow by removing the current reliance on users to manually verify and trust each project in the browser.

image

Other fixes

image

QuickViewManager.js:457 [Deprecation] Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

@phoenixide
Copy link
Member

Thank You for making this pull request.

1 similar comment
@phoenixide
Copy link
Member

Thank You for making this pull request.

@phoenixide
Copy link
Member

Thank You for making this pull request.

@abose abose changed the title fix: remove deprecated dom api DOMSubtreeModified feat: add a trust project for live preview in phoenix iframe Jan 6, 2024
Copy link

sonarcloud bot commented Jan 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

47.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@phoenixide
Copy link
Member

Thank You for making this pull request.

@abose abose changed the title feat: add a trust project for live preview in phoenix iframe feat: add a trust project for live preview in phoenix iframe- browser only Jan 6, 2024
@abose abose merged commit 2505ece into main Jan 6, 2024
16 of 17 checks passed
@abose abose deleted the live branch January 6, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants