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

Add style option to center textarea #3368

Closed
felixvanleeuwen opened this issue Jul 30, 2020 · 10 comments · Fixed by #3668
Closed

Add style option to center textarea #3368

felixvanleeuwen opened this issue Jul 30, 2020 · 10 comments · Fixed by #3668
Assignees
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. community-help-wanted This is a good issue for a contributor to take on and submit a solution customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. front-burner
Milestone

Comments

@felixvanleeuwen
Copy link

Feature Request

When using the following style options:

sendBoxTextWrap: true,
sendBoxHeight: 55,

you get a textarea instead of an input for user input.
This textarea alligns with the top.
There's also a div behind it, probably for accessibility, with the same dimensions.

Current:
image
Desired:
image

@felixvanleeuwen felixvanleeuwen added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. Enhancement customer-reported Required for internal Azure reporting. Do not delete. labels Jul 30, 2020
@compulim
Copy link
Contributor

compulim commented Jul 30, 2020

The <div> is a doppelganger and use for auto-resizing the <textarea> with pure CSS, which will yield better performance and compatibility, when compared to JavaScript approach.

Are there any specific options you want to customize? We will rework the send box in #2211.

@compulim compulim added the customer-replied-to Required for internal reporting. Do not delete. label Jul 30, 2020
@felixvanleeuwen
Copy link
Author

I want the textarea to be in the vertical center of the sendbox.
This is how we've implemented our textarea in V3:
image
In V4 the textarea doesn't scale out from the center:
image

@felixvanleeuwen
Copy link
Author

felixvanleeuwen commented Jul 30, 2020

Just looking to get a field sendBoxCenterInput: true in styleOptions.
The default behavior should be to have it render as it does currently.
When set to true the textarea becomes centered vertically in the sendBox area.

@compulim
Copy link
Contributor

I think we should center it by default. 😉

@felixvanleeuwen
Copy link
Author

Awesome!

@compulim
Copy link
Contributor

compulim commented Jul 31, 2020

Some preliminary study on the layout here. You can study the code to understand how the doppelganger work. This is vertically aligned.

https://compulim.github.io/playpen-textarea-doppelganger/

Still need to clean up the CSS a bit. Feel free to file PR over there for suggestions.

Please try your best to break it. When it's broken, you will see weird shadow behind the text, like wearing a red-green 3D glasses. 😉

Will eventually move the JS/CSS there back to this repository.

image

Please bear with me with my choice of color. They are for highlighting bounding box.

@compulim compulim added the community-help-wanted This is a good issue for a contributor to take on and submit a solution label Jul 31, 2020
@compulim compulim self-assigned this Jul 31, 2020
@compulim compulim added bug Indicates an unexpected problem or an unintended behavior. and removed Enhancement labels Jul 31, 2020
@compulim
Copy link
Contributor

compulim commented Jul 31, 2020

I cleaned up the CSS over there. Need help from someone who can help copying the styles here, add tests, etc.

@peterinnesmsft peterinnesmsft added the backlog Out of scope for the current iteration but it will be evaluated in a future release. label Aug 14, 2020
@peterinnesmsft
Copy link
Contributor

Added to backlog - will look to prioritize for an upcoming release.

@felixvanleeuwen
Copy link
Author

Writing a whole bunch of 'k's in our current chat:
image
In our V4 implementation:
image
In the playpen:
image

Setting "word-break", "overflow-wrap" on the textarea through chrome dev tools yielded no positive results.

@corinagum corinagum added front-burner and removed backlog Out of scope for the current iteration but it will be evaluated in a future release. labels Sep 23, 2020
@lzc850612 lzc850612 added this to the R12 milestone Oct 5, 2020
@compulim compulim added the backlog Out of scope for the current iteration but it will be evaluated in a future release. label Oct 5, 2020
@compulim
Copy link
Contributor

The icon of send box button is not centered vertically. It is filed as #3672.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Out of scope for the current iteration but it will be evaluated in a future release. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. community-help-wanted This is a good issue for a contributor to take on and submit a solution customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. front-burner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants