fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Help test the new GhostText version #172

Closed fregante closed 3 years ago

fregante commented 3 years ago

A brand-new version of GhostText is coming

The GhostText browser extension was rewritten from the ground up in #122 due to new restrictions introduced by browsers every so often.

It hasn't been published yet because it needs to be tested by you 💯

  1. Uninstall the current GhostText version from your browser
  2. Download this zip file: ghosttext-20.11.27.zip
  3. Extract its contents into a folder
  4. Follow these instructions to load it in Chrome or Firefox.

Issues?

Please include what you're testing:

Main changes

subnut commented 3 years ago

@fregante There is no blue glowing border as there was before. Is this intended?

Firefox on Linux GhostText test page here

subnut commented 3 years ago

ISSUE:

Even if the HTTP server is not currently running, GhostText extension shows sucessfully connected and turns ON or, if already ON, the counter increases by one (indicating successful connection)

EXPECTED:

Does not connect / shows error that server is not running


Firefox (latest stable release) on Arch Linux GhostText test page here

subnut commented 3 years ago

@fregante I forgot to mention in the above post that only the extension icon indicates successful connection. The banner showing "Connected! You can switch to your editor" does not appear, nor does the console show "GhostText: Connected! You can switch to your editor" or "Sending -- characters"

Also, as I mentioned above, this issue exists only if the HTTP server is dead. Not if the websocket server is dead (i.e. HTTP server is working and sent the correct response, but the port number of the response does not point to a valid websocket server).

subnut commented 3 years ago

ISSUE:

If a field is currently connected, then clicking the GhostText extension icon and selecting the connected field should disconnect it. It currently does not disconnect.

EXPECTED:

The selected field, if already connected, gets disconnected, but if not connected, then gets connected.


Firefox (latest stable release) on Arch Linux GhostText test page here

subnut commented 3 years ago

Ping @fregante

fregante commented 3 years ago

Thank you for the reports! I’m AFK for the next few days

subnut commented 3 years ago

I’m AFK for the next few days

@fregante How many days more? 😇

subnut commented 3 years ago

Reddit (markdown mode) doesn't work

It is a textarea as mentioned here

Explanation -

The text does appear when we are typing, but as soon as the browser window is focused, all the text is gone from the browser window only. The text does not get deleted in the editor itself

See GIF below for demonstration -

gifcast_201219003652


Firefox on Arch Linux

coltoneakins commented 3 years ago

Testing Report

This is a report testing the newer GhostText rewrite: ghosttext-20.11.27.zip

Context: https://github.com/GhostText/GhostText/issues/172

Please include what you're testing:

Browser? Editor? URL? Any issues that appear in the browser's console? Does the page work with the older version of GhostText? Does it work with Sublime Text 3?

Browser

Firefox 84.0

(Latest stable version on Ubuntu at the time of this writing.)

Editor

Tested with both:

URL

Ace

https://ace.c9.io/

Issues in Browser's Console?

Yes, but the error is minor.

The error may also just relate to the 3rd party plugin for Emacs. As in: this is probably not an error with the extension itself.

Description of Issue

This isssue occurs when text is sent from editor -> browser in Emacs ONLY. This issue does not occur with Sublime Text 3. Browser -> editor is fine and produces no errors.

This error also does not affect the transmission of text. Both the editor and browser send updates to each other with no text loss.

Here is the error. It is sent everytime a character is typed in Emacs -> browser:

Error:

selections is undefined 5 content.js:150

Offending code in content.js line 150:

    receive(event) {
        const {
            text,
            selections
        } = JSON.parse(event.data);
        if (this.field.value !== text) {
            this.field.value = text;
        }

        this.field.selectionStart = selections[0].start; // <-- this is line 150
        this.field.selectionEnd = selections[0].end;
    }

screenshot-ff-ace-doom-emacs-gt-rewrite

I believe this is because the plugin for Emacs does not send any data on the current selection of text in the editor--it only sends the text itself.

Does the page work with the older version of GhostText?

No, the page does not work. screenshot-ff-ace-doom-emacs-gt-old

The page produces the error mentioned in this bug: https://github.com/GhostText/GhostText/issues/104#issue-263692210

This new error mentioned in the report also persists with the old version. However, I think it is because of the implemenetation of the 3rd party plugin for Emacs.

Does it work w/ Sublime Text 3?

Yes, no errors.

screenshot-ff-ace-sublime-text-gt-rewrite



TL;DR

We can probably close this issue: https://github.com/GhostText/GhostText/issues/104

Thank you Federico!

subnut commented 3 years ago

Ping @fregante for updates.....



Happy New Year to everybody :tada:

fregante commented 3 years ago

Thank you for the many reports! It looks like a lot of parts are still broken so it needs further work. The update was even rejected by Google so that confirms it 😬

subnut commented 3 years ago

The update was even rejected by Google so that confirms it

I didn't understand what you meant by that...

kujohn commented 3 years ago

Using the latest Firefox and atomic chrome at editor.p5js.org. 2021-01-08 19 20 18

luisherranz commented 3 years ago

Working great here with last Chrome and VimR. I love it! 😄

I've made a couple of PRs (https://github.com/GhostText/GhostText/pull/176 and https://github.com/GhostText/GhostText/pull/175). One to fix the Chrome focus after disconnection and another to not to ask for a textarea if there's an already selected one.

By the way, it works great with Slack messages! (the previous one didn't).

fregante commented 3 years ago

I opened a PR with some updates. Bear with me

Reddit (markdown mode) doesn't work

@subnut It's possible that Reddit still considers the field "untouched" becuse GhostText didn't send any events, so it blindly resets it. I resolved https://github.com/GhostText/GhostText/issues/42 so this should be

I believe this is because the plugin for Emacs does not send any data on the current selection of text in the editor--it only sends the text itself.

@coltoneakins Indeed! I considered making the error silent, but since selections are part of the API, it should be fixed in the Emacs plugin (which is by third party, so you'll have to open an issue there). I think this is unrelated to Ace editor.

The update was even rejected by Google so that confirms it

I didn't understand what you meant by that...

@subnut for some reason the Chrome team completely rejected the update, but then I tried resubmitting the old version of GhostText and they accepted it (so it's not an issue with the type of extension). I assume they rejected it because they couldn't get it to work.

fregante commented 3 years ago

I'll try publishing the current version. Let's hope they don't reject it, because currently Firefox rejected the 19.x version (#177) and Chrome rejected this 20.x version (https://github.com/GhostText/GhostText/issues/172#issuecomment-755922046)

fregante commented 3 years ago

Version 21.1.1 has been approved by the Chrome store so you should receive the update soon! 👍

Firefox not yet