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

We currently try to run our on-load logic before gMsgCompose is ready #29

Closed
eyalroz opened this issue Aug 29, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working resolved-on-development

Comments

@eyalroz
Copy link
Owner

eyalroz commented Aug 29, 2020

At some point (possibly before the TB 78 conversion), the default message direction and/or reply direction preference stopped working - at least for text messages - and now all text replies are set to LTR.

@eyalroz eyalroz added the bug Something isn't working label Aug 29, 2020
@eyalroz eyalroz self-assigned this Aug 29, 2020
@eyalroz eyalroz changed the title Replying to text messages does not respect reply direction preference Text message composition does not respect reply direction preference Aug 31, 2020
@eyalroz
Copy link
Owner Author

eyalroz commented Aug 31, 2020

It seems we have multiple issues here, involving:

  1. Composing new text messages.
  2. Replying to messages.
  3. Composing new HTML messages.

... but we'll let this issue focus on our use of gMsgCompose : We currently apply the on-load logic without it being ready. With the previous extension loading mechanism we were able to avoid this.

eyalroz pushed a commit that referenced this issue Aug 31, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
@eyalroz eyalroz changed the title Text message composition does not respect reply direction preference We currently try to run our on-load logic before gMsgCompose is ready Sep 2, 2020
eyalroz pushed a commit that referenced this issue Sep 2, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 2, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 7, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object (and the editor) is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* Specifically, we no longer need a time-out from whatever event listener we run; and we no longer register event listeners for "load" and "compose-window-reopen".
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI, in case it's unavailable.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`
* Renamed some event-listener and related functions.
eyalroz pushed a commit that referenced this issue Sep 7, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object (and the editor) is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* Specifically, we no longer need a time-out from whatever event listener we run; and we no longer register event listeners for "load" and "compose-window-reopen".
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI, in case it's unavailable.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`
* Renamed some event-listener and related functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved-on-development
Projects
None yet
Development

No branches or pull requests

1 participant