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

Replicate BrowserSync syncing using Webview, IPC, events #154

Open
2 of 6 tasks
nwittwer opened this issue Jan 28, 2020 · 0 comments
Open
2 of 6 tasks

Replicate BrowserSync syncing using Webview, IPC, events #154

nwittwer opened this issue Jan 28, 2020 · 0 comments
Labels
Help Wanted Extra attention is needed Priority: 2 Urgent, but not critical importance Type: Enhancement Type: Performance

Comments

@nwittwer
Copy link
Collaborator

nwittwer commented Jan 28, 2020

BrowserSync is great, but it may be overkill for the needs of Reflex. Running into difficulties using the proxy function—especially on http sites—and the performance of the server it runs seems to be super slow.

Instead of running BrowserSync's server and having to load that URL, we could instead just handle the events between the Webviews that are already rendered! The performance should be far superior.

We can use IPC to communicate between a Webview—which has access to the underlying document data—and the Electron process. From there, we can emit with an event bus to keep track of events being fired, which element they're on, etc.

Try it out on the webview-event-sync branch.

Reflex should synchronize all these events between Webviews:

  • Scroll
  • Hover
  • Click
  • (Ideally all possible pointer, mouse, and gesture events)

Checklist

  • Don't perform event on origin Webview
  • For clicks, send the DOMElement and be able to find that element on the other Webviews
  • Works on simple and complex sites (i.e. NYTimes)
  1. Who sent the event? (don't duplicate the event for them)
  2. What was the event?
  3. Did the event have a target that we should apply to? (i.e. apply a hover/click)
  4. Apply event to all Webviews (except the origin)
@nwittwer nwittwer added Help Wanted Extra attention is needed Type: Enhancement Type: Performance Priority: 2 Urgent, but not critical importance labels Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed Priority: 2 Urgent, but not critical importance Type: Enhancement Type: Performance
Projects
None yet
Development

No branches or pull requests

1 participant