reflex-app / reflex-app/reflex

Replicate BrowserSync syncing using Webview, IPC, events

Open
#154 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Help Wanted Priority: 2 Type: Enhancement Type: Performance
Dominant language
Vue
Stars
34
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the webview-event-sync branch and the existing Webview, IPC, and event-bus flow. Compare the current scroll and click synchronization with the unchecked hover and event checklist. Done means events are synchronized across Webviews without repeating them in the origin, clicks identify their DOM targets, and the approach works on simple and complex sites.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.