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

feat: keyboard placeholder #19406

Merged
merged 3 commits into from
Dec 19, 2023
Merged

feat: keyboard placeholder #19406

merged 3 commits into from
Dec 19, 2023

Conversation

pauldambra
Copy link
Member

When the keyboard opens or closes on the mobile app, we want to send a custom event, and see that happen so our users understand what their users see

Comment on lines +121 to +122
x?: number
y?: number
Copy link
Member Author

Choose a reason for hiding this comment

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

description and reality didn't line up in the schema

Copy link
Contributor

github-actions bot commented Dec 19, 2023

Size Change: 0 B

Total Size: 2 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 2 MB

compressed-size-action

* @description width and height are the dimensions of the element, the only accepted units is pixels. You can omit the unit.
* @description the width dimension of the element, either '100vw' i.e. viewport width. Or a value in pixels. You can omit the unit when specifying pixels.
*/
width: number | '100vw'
Copy link
Member Author

Choose a reason for hiding this comment

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

since I was allowing this for the custom event I thought I'd allow it here too.

We may never send it but 🤷

Comment on lines +305 to +316
* @description x and y are the top left corner of the element, if they are present then the element is absolutely positioned, if they are not present then the keyboard is at the bottom of the screen
*/
x?: number
y?: number
/*
* @description the height dimension of the keyboard, the only accepted units is pixels. You can omit the unit.
*/
height: number
/*
* @description the width dimension of the keyboard, the only accepted units is pixels. You can omit the unit. If not present defaults to width of the viewport
*/
width?: number
Copy link
Member Author

Choose a reason for hiding this comment

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

setting x and y is possible but not expected
setting width is possible but not expected

@pauldambra pauldambra requested a review from a team December 19, 2023 13:35
Comment on lines +86 to +96
function isKeyboardEvent(x: unknown): x is keyboardEvent {
return (
typeof x === 'object' &&
x !== null &&
'data' in x &&
typeof x.data === 'object' &&
x.data !== null &&
'tag' in x.data &&
x.data.tag === 'keyboard'
)
}
Copy link
Member

Choose a reason for hiding this comment

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

😅

Copy link
Member Author

Choose a reason for hiding this comment

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

What? it's my most elegant code 🙈 🤣

Copy link
Member

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

Looking forward to testing this.
Mostly interested in how the content is going to be pushed up or is it gonna be an overlay?

@pauldambra
Copy link
Member Author

Mostly interested in how the content is going to be pushed up or is it gonna be an overlay?

Yep, me too! It's an overlay but I'll be amazed if it doesn't need a second pass 🤣

@pauldambra pauldambra merged commit effb98f into master Dec 19, 2023
71 checks passed
@pauldambra pauldambra deleted the feat/keyboard-placeholder branch December 19, 2023 14:16
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.

2 participants