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

Google docs canvas mode handling #782

Closed
birtles opened this issue Sep 30, 2021 · 4 comments
Closed

Google docs canvas mode handling #782

birtles opened this issue Sep 30, 2021 · 4 comments

Comments

@birtles
Copy link
Member

birtles commented Sep 30, 2021

I'm a bit slow at getting to this, but it seems Google docs is ramping up their roll-out of the canvas mode recently.

We need to force Google docs to use the old HTML mode until there is a better way to grab this information.

Rikaikun has done this in: melink14/rikaikun@94b60a6
Yomichan has done this in: FooSoft/yomichan@5d4141a

For comparison, the rikaikun approach is to force to HTML mode when the extension is enabled but show a popup letting you know to disable the extension if you need canvas mode.

The yomichan approach is to add an option for this which appears to default to false.

Personally I think forcing HTML mode by default is preferable. Most users have no idea what a canvas is and they shouldn't need to either. Yomichan tends to focus on computer-savvy options-happy users as far as I can tell so a non-default option probably makes sense for them.

I'm a bit concerned that adding a popup like rikaikun is hard to do right, or at least adds complexity that I'd rather not have to test and maintain (i.e. only show it once, and show it in content too). So I think I lean towards forcing this on, and probably adding an option to turn it off.

@melink14
Copy link

I recently received an update on the google docs canvas project that they plan to disable HTML fallback after they reach 100% canvas rollout before the end of the year.

It may be possible to get something to work using the annotated canvas but it will definitely be more work. T_T

(Also FYI just in case that for the fallback to work you need to register your extension with Google Docs team via form they published earlier in the year)

@birtles
Copy link
Member Author

birtles commented Sep 30, 2021

I recently received an update on the google docs canvas project that they plan to disable HTML fallback after they reach 100% canvas rollout before the end of the year.

Oh, thank you for letting me know! I suspected that would happen eventually but not quite so soon!

It may be possible to get something to work using the annotated canvas but it will definitely be more work. T_T

That's a shame. I was hoping to avoid more major refactorings for a while 😅

(Also FYI just in case that for the fallback to work you need to register your extension with Google Docs team via form they published earlier in the year)

Oh, that's interesting! Just testing it locally, it seems to work with the current extension ID. And I notice that Yomichan simply sets window._docs_force_html_by_ext to true so perhaps they're not actually checking that value?

@melink14
Copy link

Glad you found it though let me know if it was a dead end since I can find the original one in inbox.

(Also FYI just in case that for the fallback to work you need to register your extension with Google Docs team via form they published earlier in the year)

Oh, that's interesting! Just testing it locally, it seems to work with the current extension ID. And I notice that Yomichan simply sets window._docs_force_html_by_ext to true so perhaps they're not actually checking that value?

I wouldn't be that surprised if they decided to not implement the extension ID check and just say they were going to do it; the form wasn't hard to fill out though so doing it in parallel makes sense.

@birtles
Copy link
Member Author

birtles commented Sep 30, 2021

Glad you found it though let me know if it was a dead end since I can find the original one in inbox.

Thanks! Yes, I've filled it out now so hopefully I'm on the list for future updates now.

Oh, that's interesting! Just testing it locally, it seems to work with the current extension ID. And I notice that Yomichan simply sets window._docs_force_html_by_ext to true so perhaps they're not actually checking that value?

I wouldn't be that surprised if they decided to not implement the extension ID check and just say they were going to do it; the form wasn't hard to fill out though so doing it in parallel makes sense.

Yes, agreed. Thanks again!

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

No branches or pull requests

2 participants