-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: keyboard placeholder #19406
Conversation
x?: number | ||
y?: number |
There was a problem hiding this comment.
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
Size Change: 0 B Total Size: 2 MB ℹ️ View Unchanged
|
* @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' |
There was a problem hiding this comment.
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 🤷
* @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 |
There was a problem hiding this comment.
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
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' | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
There was a problem hiding this comment.
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 🙈 🤣
There was a problem hiding this 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?
Yep, me too! It's an overlay but I'll be amazed if it doesn't need a second pass 🤣 |
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