Skip to content

fix(form-textarea): Bug fixes and features #2111

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

Merged
merged 67 commits into from
Nov 21, 2018
Merged

Conversation

tmorehouse
Copy link
Member

@tmorehouse tmorehouse commented Oct 27, 2018

Fixes and improvements to b-form-textbox

  • added optional formatter feature
  • lazy formatting now happens on blur event, to get around issues with IME composition
  • better auto rows/resizing based on CSS height rather than number of newlines
  • adds in Boolean trim and number props to emulate v-model modifiers .trim and .number
  • custom v-model event (update)
  • $emits input event with arg of (optionally formatted) value
  • $emits change event with arg of (optionally formatted) value
  • $emits blur event with arg of native event
  • attach all native listeners (except input, change, blur) directly on <textarea> element
  • improved event $emit ordering
  • move common code of <b-form-textarea> and <b-form-input> to mixin to minimize codebase
  • change test suite to use vue-test-utils
    • basic structure, classes and attributes
    • events
    • formatting
    • trim and number modifier props
    • auto rows/height cannot test getComputedStyle in JSDOM test environment

Fixes #1708
Closes #1710
Fixes #1915
Fixes #1470

To-Do:

  • have b-form-input use the new mixin, and to follow the new event model via separate PR

@codecov
Copy link

codecov bot commented Oct 27, 2018

Codecov Report

Merging #2111 into dev will increase coverage by 0.42%.
The diff coverage is 81.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #2111      +/-   ##
==========================================
+ Coverage   66.09%   66.51%   +0.42%     
==========================================
  Files         158      159       +1     
  Lines        3017     3058      +41     
  Branches      840      852      +12     
==========================================
+ Hits         1994     2034      +40     
- Misses        741      744       +3     
+ Partials      282      280       -2
Impacted Files Coverage Δ
src/mixins/form-text.js 80% <80%> (ø)
src/components/form-textarea/form-textarea.js 90.9% <87.5%> (+40.9%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4103e4e...3c30f3b. Read the comment docs.

@tmorehouse tmorehouse mentioned this pull request Nov 14, 2018
89 tasks
@tmorehouse tmorehouse merged commit dc4d226 into dev Nov 21, 2018
@tmorehouse tmorehouse changed the title [WIP] fix(form-textarea): Bug fixes and features fix(form-textarea): Bug fixes and features Nov 21, 2018
@tmorehouse tmorehouse deleted the tmorehouse/b-form-textarea branch November 21, 2018 04:08
@ErikVerheul
Copy link

When is this fix released? In version 2.0.0-rc.11 the problem still exists to my experience.

@yujianancy
Copy link

+1 I'm still experiencing this issue.

@tmorehouse
Copy link
Member Author

@yujianancy please open a new issue.

@bootstrap-vue bootstrap-vue locked as resolved and limited conversation to collaborators Mar 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants