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

Documentation for the VirtualKeyboard API #22949

Merged
merged 9 commits into from
Jan 2, 2023
Merged

Conversation

captainbrosset
Copy link
Contributor

Description

This PR adds the necessary documentation for the VirtualKeyboard API.

Motivation

The VirtualKeyboard API shipped in chromium-based browsers over a year ago (here is the CL where it got enabled).

It then was documented on BCD (here) which means that it's available on caniuse (here). And it was documented by Thomas Steiner on developer.chrome.com (here).

Although this is still only in Chromium-based browsers (mozilla position, webkit position), it's very useful on mobile devices and can be used as a progressive enhancement on supporting browsers. I think this API should absolutely be documented on MDN.

@captainbrosset captainbrosset requested review from a team as code owners December 14, 2022 13:11
@captainbrosset captainbrosset requested review from jpmedley and dipikabh and removed request for a team December 14, 2022 13:11
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs Content:WebAPI Web API docs labels Dec 14, 2022
@captainbrosset
Copy link
Contributor Author

In talking to @tomayac, I learned that @chrisdavidmills was maybe planning on working on this. Chris, would you mind giving this a review then?

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2022

Preview URLs (12 pages)
Flaws (15)

Note! 9 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/Navigator
Title: Navigator
Flaw count: 5

  • macros:
    • /en-US/docs/Web/API/Navigator/securitypolicy does not exist
    • /en-US/docs/Web/API/Navigator/standalone does not exist
  • bad_bcd_links:
    • no explanation!
    • no explanation!
    • no explanation!

URL: /en-US/docs/Web/CSS/env
Title: env()
Flaw count: 9

  • bad_bcd_links:
    • no explanation!
    • no explanation!
    • no explanation!
    • no explanation!
    • no explanation!
    • and 4 more flaws omitted

URL: /en-US/docs/Web/HTML/Global_attributes/virtualkeyboardpolicy
Title: virtualkeyboardpolicy
Flaw count: 1

  • bad_bcd_queries:
    • No BCD data for query: html.global_attributes.virtualkeyboardpolicy
External URLs (7)

URL: /en-US/docs/Web/API/VirtualKeyboard
Title: VirtualKeyboard


URL: /en-US/docs/Web/API/VirtualKeyboard/hide
Title: VirtualKeyboard.hide()


URL: /en-US/docs/Web/API/VirtualKeyboard/show
Title: VirtualKeyboard.show()


URL: /en-US/docs/Web/API/VirtualKeyboard/geometrychange_event
Title: VirtualKeyboard: geometrychange event


URL: /en-US/docs/Web/API/VirtualKeyboard/boundingRect
Title: VirtualKeyboard.boundingRect


URL: /en-US/docs/Web/API/VirtualKeyboard/overlaysContent
Title: VirtualKeyboard.overlaysContent


URL: /en-US/docs/Web/API/VirtualKeyboard_API
Title: VirtualKeyboard API

(comment last updated: 2023-01-02 10:37:10)

@chrisdavidmills
Copy link
Contributor

@captainbrosset Yup, more than happy to. I'll get my review done probably before the end of today.

@captainbrosset
Copy link
Contributor Author

I see that images need to be compressed. I tried running the following suggested commands but the files didn't get changed on disk:

yarn filecheck 'files/en-us/web/api/virtualkeyboard_api/dual-screen.png' --save-compression
yarn filecheck 'files/en-us/web/api/virtualkeyboard_api/viewport-height.png' --save-compression

@chrisdavidmills
Copy link
Contributor

@caugner , any thoughts on why the file compression commands don't appear to be working for @captainbrosset ?

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Hi @captainbrosset ! I've left a bunch of suggestions and comments here, but they are mostly language nitpicks and a few tips on macro usage, etc. These docs are interesting and informative, and I enjoyed reading them. Nice job!

files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard/boundingrect/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/env/index.md Outdated Show resolved Hide resolved
@captainbrosset
Copy link
Contributor Author

Thank you @chrisdavidmills for the thorough review. I'm pushing a new commit which addresses your comments in a second.

@captainbrosset captainbrosset requested a review from a team as a code owner December 15, 2022 11:40
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Dec 15, 2022
@captainbrosset captainbrosset requested review from chrisdavidmills and removed request for jpmedley and dipikabh December 15, 2022 11:41
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

@captainbrosset Much improved, thank you ! I've left a few more comments to point out some more bits I noticed, but not nearly as many this time.

Since I don't have permission to approve this PR, I'm handing it over to @Elchi3 to do the honours ;-)

files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard_api/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard/hide/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/virtualkeyboard/show/index.md Outdated Show resolved Hide resolved
@captainbrosset
Copy link
Contributor Author

The latest comments from @chrisdavidmills should be addressed now.

@Elchi3
Copy link
Member

Elchi3 commented Jan 2, 2023

Not sure if this helps, but I ran the compression locally and maybe you could use these files instead:

dual-screen
viewport-height

@captainbrosset
Copy link
Contributor Author

Thank you @Elchi3! I just pushed a commit with your screenshots. Let's see if that worked ...

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Seems to have worked 🎉
I scrolled through the pages briefly and looks good to me. Chris already provided a more in-depth review. Thanks for writing this up, Patrick! 👍

@Elchi3 Elchi3 merged commit 8c0dfad into mdn:main Jan 2, 2023
@captainbrosset captainbrosset deleted the vk branch January 2, 2023 10:42
@chrisdavidmills
Copy link
Contributor

Nice work @captainbrosset !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs Content:HTML Hypertext Markup Language docs Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants