Skip to content

Center text on multiline send box#3668

Merged
compulim merged 11 commits intomicrosoft:masterfrom
compulim:fix-center-sendbox
Jan 20, 2021
Merged

Center text on multiline send box#3668
compulim merged 11 commits intomicrosoft:masterfrom
compulim:fix-center-sendbox

Conversation

@compulim
Copy link
Copy Markdown
Contributor

@compulim compulim commented Jan 13, 2021

Fixes #3368.

Changelog Entry

Added

  • Resolves #3368. Added new sendBoxButtonAlignment for button alignment in multi-line text mode, by @compulim in PR #3668

Description

Currently, text and buttons was not aligned in multi-line text mode. This PR will vertically center text, and an additional option to align buttons to top/bottom or stretch. We default to stretch because it was the current behavior.

Design

image

We refactored the auto-resize text area out for clarity.

We copied the "mock Web Speech" component from older Web Driver tests to work in newer HTML tests.

Specific Changes

  • Updated <BasicSendBox> to use <AutoResizeTextArea>
  • Updated the snapshot of test __tests__/disabledUI.js
    • The current one is wrong because the background should not be gray when <textarea> is disabled

image

  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@compulim compulim changed the title Center text on multiline send box [DRAFT] Center text on multiline send box Jan 13, 2021
@compulim compulim changed the title [DRAFT] Center text on multiline send box Center text on multiline send box Jan 17, 2021
@compulim compulim marked this pull request as ready for review January 17, 2021 11:50
Comment thread packages/component/src/Styles/StyleSet/AutoResizeTextArea.js Outdated
Comment thread packages/component/src/Styles/StyleSet/AutoResizeTextArea.js Outdated
Comment thread packages/testharness/src/utils/createWebSpeechMock.js
Copy link
Copy Markdown
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

LGTM - pending a few questions

Comment thread __tests__/html/sendBox.buttonAlignment.html
Comment thread packages/component/src/Styles/StyleSet/AutoResizeTextArea.js Outdated
@compulim compulim merged commit aaec155 into microsoft:master Jan 20, 2021
@compulim compulim mentioned this pull request Mar 2, 2021
52 tasks
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.

Add style option to center textarea

2 participants