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

Added Unicode autocorrect and font conversion #2

Merged
merged 15 commits into from
Nov 24, 2020

Conversation

tdulcet
Copy link
Collaborator

@tdulcet tdulcet commented Oct 28, 2020

Note that for the "Use Unicode smart quotes" option, you said you wanted it use the quotes for each language/locale, although I am unsure how you want to implement this, so it still only uses the English smart quotes.

In addition, for rugk/awesome-emoji-picker#106 you said you wanted to include advertisements between both add-ons on the settings page and as a tip. I included a note about the Awesome Emoji Picker on the settings page, although I am unsure how you want to do the tip since it does not have a browser action popup.

Many of my comments from rugk/awesome-emoji-picker#93 also apply to this PR. The autocorrect feature supports Firefox for Android, but the font conversion does not since the Context Menu API is not yet supported (bug 1595822).

The user can press backspace (⌫) to undo any autocorrections. Please let me know if you would like me to make any changes.

@rugk
Copy link
Owner

rugk commented Oct 28, 2020

Note that for the "Use Unicode smart quotes" option, you said you wanted it use the quotes for each language/locale, although I am unsure how you want to implement this, so it still only uses the English smart quotes.

Yeah, I'd also consider this a feature for a later version. I also need to think about how to best implement this. Maybe let the user select the language? Or somehow use the browser language? Or can we detect which spellchecking language the user has choosen for an input field?
Anyway, this is a different issue. (If you want to open one in this repo, feel free to do so.)

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding data-i18n="": Ah the localisation is still missing, yeah? Is this intentional?

As far as I can see, this PR generally looks good. My remarks are mostly only small code style things.
I'll see to try that out in practice later.

And again, thanks for implementing this! 😃 IMHO this will be a very handy add-on and certainly useful. 😊

src/options/options.css Show resolved Hide resolved
src/options/options.html Show resolved Hide resolved
src/thunderbirdmanifest.json Outdated Show resolved Hide resolved
src/thunderbirdmanifest.json Outdated Show resolved Hide resolved
src/manifest.json Outdated Show resolved Hide resolved
src/options/modules/CustomOptionTriggers.js Outdated Show resolved Hide resolved
src/content_scripts/autocorrect.js Outdated Show resolved Hide resolved
src/content_scripts/autocorrect.js Outdated Show resolved Hide resolved
src/common/modules/UnicodeFontHandler.js Outdated Show resolved Hide resolved
src/common/modules/data/Fonts.js Outdated Show resolved Hide resolved
@tdulcet
Copy link
Collaborator Author

tdulcet commented Oct 29, 2020

Regarding data-i18n="": Ah the localisation is still missing, yeah? Is this intentional?

Yes and yes. I just left that there as I assumed you would want to localize it after you decided on the wording.

I'll see to try that out in practice later.

I had an issue with the submodules not automatically downloading when I cloned the repository. I actually had to manually download each one:

git submodule add https://github.com/TinyWebEx/Localizer/ "src/common/modules/Localizer"
git submodule add https://github.com/TinyWebEx/TestHelper "src/tests/helper"
git submodule add https://github.com/TinyWebEx/AddonSettings "src/common/modules/AddonSettings"
git submodule add https://github.com/TinyWebEx/Logger "src/common/modules/Logger"
git submodule add https://github.com/TinyWebEx/MessageHandler "src/common/modules/MessageHandler"
git submodule add https://github.com/TinyWebEx/BrowserCommunication "src/common/modules/BrowserCommunication"
git submodule add https://github.com/TinyWebEx/RandomTips "src/common/modules/RandomTips"
git submodule add https://github.com/TinyWebEx/AutomaticSettings "src/common/modules/AutomaticSettings"

Hopefully this will not happen to you. Also note that the autocorrect feature will not work until you change that line in your BrowserCommunication library.

And again, thanks for implementing this! 😃 IMHO this will be a very handy add-on and certainly useful. 😊

No problem! I am glad you find it useful. Please let me know if you need me to do anything else.

I believe I made all of your requested changes in 7208857. I also backported the applicable changes to rugk/awesome-emoji-picker#93 in rugk/awesome-emoji-picker@8ff9ee3, since there is obviously a lot of code duplication between the two PRs and many of changes applied to both.

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah great, only minor changes.

src/common/modules/UnicodeFontHandler.js Outdated Show resolved Hide resolved
src/common/modules/UnicodeFontHandler.js Outdated Show resolved Hide resolved
src/content_scripts/autocorrect.js Show resolved Hide resolved
src/content_scripts/autocorrect.js Show resolved Hide resolved
@rugk
Copy link
Owner

rugk commented Oct 30, 2020

Yes and yes. I just left that there as I assumed you would want to localize it after you decided on the wording.

Will do, yes thanks. 😊

And thanks for the backports BTW. 😊

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small things only 🎉

src/common/modules/AutocorrectHandler.js Outdated Show resolved Hide resolved
src/common/modules/AutocorrectHandler.js Outdated Show resolved Hide resolved
src/common/modules/AutocorrectHandler.js Outdated Show resolved Hide resolved
src/common/modules/UnicodeFontHandler.js Outdated Show resolved Hide resolved
src/common/modules/UnicodeFontHandler.js Outdated Show resolved Hide resolved
src/content_scripts/autocorrect.js Outdated Show resolved Hide resolved
src/content_scripts/autocorrect.js Outdated Show resolved Hide resolved
src/content_scripts/autocorrect.js Show resolved Hide resolved
src/options/modules/CustomOptionTriggers.js Outdated Show resolved Hide resolved
src/options/options.css Show resolved Hide resolved
@rugk
Copy link
Owner

rugk commented Nov 18, 2020

since there is obviously a lot of code duplication between the two PRs and many of changes applied to both.

Note that if you think it would be useful to make a common JS module (even if it is just for a content script), then we can do so. I'm always in favor of avoiding code duplication.

@rugk
Copy link
Owner

rugk commented Nov 18, 2020

Made a PR for Chrome/ium compatibility you've mentioned. Is TinyWebEx/BrowserCommunication#4 enough?

@tdulcet
Copy link
Collaborator Author

tdulcet commented Nov 19, 2020

Made a PR for Chrome/ium compatibility you've mentioned. Is TinyWebEx/BrowserCommunication#4 enough?

Yes, I tested that and it works great!

I believe I made all of your requested changes in 12c24cf. I also backported the applicable changes to rugk/awesome-emoji-picker#93 in rugk/awesome-emoji-picker@4f11cf0.

Copy link
Owner

@rugk rugk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from these few comments, ready to merge, IMHO. I may still test the changes in practice through…

src/common/modules/UnicodeFontHandler.js Outdated Show resolved Hide resolved
@rugk
Copy link
Owner

rugk commented Nov 19, 2020

Testing some things currently. First question: Sorry, but still don't get the difference between 1/4 → ¼ and the ”fraction” replacement, i.e. the first and the third checkbox in the settings. Is not ¼ also a fraction?

Also pushed some changes in your branch. Will do more later.

@tdulcet
Copy link
Collaborator Author

tdulcet commented Nov 20, 2020

First question: Sorry, but still don't get the difference between 1/4 → ¼ and the ”fraction” replacement, i.e. the first and the third checkbox in the settings. Is not ¼ also a fraction?

No problem. The first checkbox replaces 1/4 with ¼, while the third replaces 0.25 (or any number that ends in .25) with ¼. Also see rugk/awesome-emoji-picker#93 (comment) and your reply.

@rugk
Copy link
Owner

rugk commented Nov 20, 2020

Yeah, I had in mind I already asked this, but was confused again. 🙈
As such, i guess for UX reasons, I'll try to make that difference more clear.

@rugk
Copy link
Owner

rugk commented Nov 20, 2020

Note the "it should work without a browser restart" comment is still open. 😃

@tdulcet
Copy link
Collaborator Author

tdulcet commented Nov 20, 2020

Note the "it should work without a browser restart" comment is still open. 😃

Resolved with 0d91cfb. 🙂

@rugk rugk merged commit 80c68e4 into main Nov 24, 2020
@rugk rugk deleted the Unicode-correction-and-font-conversion branch November 24, 2020 09:58
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.

Unicode correction and font conversion
2 participants