Skip to content

Commit 4219dcc

Browse files
jacobmllr95Hiws
andauthored
chore(docs): clarify note on non-text-like input formatter functions (closes #5518) (#5762)
* chore(docs): clarify note on non-text-like input `formatter` functions * Update README.md Co-authored-by: Hiws <hiws@live.dk>
1 parent 0ddb2e0 commit 4219dcc

File tree

29 files changed

+44
-43
lines changed

29 files changed

+44
-43
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ A clear and concise description of what the pull request does.
2525
- [ ] It's submitted to the `dev` branch, **not** the `master` branch
2626
- [ ] When resolving a specific issue, it's referenced in the PR's title (i.e. `[...] (fixes #xxx[,#xxx])`, where "xxx" is the issue number)
2727
- [ ] It should address only one issue or feature. If adding multiple features or fixing a bug and adding a new feature, break them into separate PRs if at all possible.
28-
- [ ] The title should follow the [**Conventional Commits**](https://www.conventionalcommits.org/) naming convention (i.e. `fix(alert): not alerting during SSR render`, `docs(badge): update pill examples`, `chore(docs): fix typo in README`, etc). **This is very important, as the `CHANGELOG` is generated from these messages, and determines the next version type (patch or minor).**
28+
- [ ] The title should follow the [**Conventional Commits**](https://www.conventionalcommits.org/) naming convention (i.e. `fix(alert): not alerting during SSR render`, `docs(badge): update pill examples`, `chore(docs): fix typo in README`, etc.). **This is very important, as the `CHANGELOG` is generated from these messages, and determines the next version type (patch or minor).**
2929

3030
**If new features/enhancement/fixes are added or changed:**
3131

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ Read the following migration guide for more details.
11531153
- `b-table`: the `filter` prop will no longer accept a function reference (previously deprecated).
11541154
Instead, pass a function to the `filter-function` prop when using a custom filter function. The
11551155
prop `filter` is only to be used for the filter's _criteria_ (i.e. the search value, search
1156-
`RegExpr`, etc).
1156+
`RegExpr`, etc.).
11571157
- `b-table`: passing an object as a `fields` definition will no longer work. Use the _array of
11581158
strings_ or _array of objects_ (or a combination of the two) fields definition format instead.
11591159
- `b-table`: sorting icon SASS variables have been changed to handle the new SVG backgrounds. If you

docs/markdown/intro/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ module.exports = {
232232

233233
**Note:** If your project has multiple webpack config files (i.e. `webpack.config.js`,
234234
`webpack.renderer.config.js`, `webpack.vendor.config.js`, `webpack.server.config.js`,
235-
`webpack.client.config.js`, etc), you will need to set the appropriate alias in _all_ of them.
235+
`webpack.client.config.js`, etc.), you will need to set the appropriate alias in _all_ of them.
236236

237237
See the [Vue.js](https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only)
238238
Guide for full details on setting up aliases for [webpack](https://webpack.js.org/),

docs/markdown/reference/settings/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The values provided as the config option to `Vue.use` will be merged with the de
5555
**Note:** When defining custom breakpoints, keep the names short (2 to 3 characters). At least two
5656
breakpoint names must be defined. The breakpoint names **must** match the breakpoint names defined
5757
in your custom Bootstrap SCSS. Breakpoint names must not conflict with non-breakpoint prop names
58-
used on various components (i.e. avoid `to`, `col`, etc)
58+
used on various components (i.e. avoid `to`, `col`, etc.)
5959

6060
### Setting config via individual component group plugin imports
6161

docs/markdown/reference/theming/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
> stylesheet; instead, you can enable the built-in theme to add gradients, shadows, and more.
55
66
While BootstrapVue uses Bootstrap's CSS, certain features of BootstrapVue uses custom CSS (i.e.
7-
stacked tables, etc). Our custom CSS relies on variables defined the Bootstrap v4.x SCSS. The
7+
stacked tables, etc.). Our custom CSS relies on variables defined the Bootstrap v4.x SCSS. The
88
`bootstrap-vue/dist/bootstrap-vue.css` is compiled using the default Bootstrap v4.x variables. By
99
using the BootstrapVue source SCSS, you can have your variable overrides (such as breakpoints, theme
10-
colors, etc) adjust the custom BootstrapVue css generation.
10+
colors, etc.) adjust the custom BootstrapVue css generation.
1111

1212
For premium dashboards and themes, please refer to the [`Themes section`](/themes) of the
1313
documentation.
@@ -149,7 +149,7 @@ your project, which you can include in your main app `app.vue` file:
149149
150150
The `custom-vars.scss` file, which needs to be loaded before Bootstrap's SCSS and BootstrapVue's
151151
SCSS, will include your Bootstrap v4 variable overrides (i.e. colors, shadows, font sizes,
152-
breakpoints, etc).
152+
breakpoints, etc.).
153153
154154
**Via app main entry point:**
155155

docs/nuxt.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ module.exports = {
163163
// https://zeit.co/docs/v2/build-step#system-environment-variables
164164
// - `true` if on Zeit Now (dev or PR)
165165
VERCEL_NOW: process.env.VERCEL_GITHUB_DEPLOYMENT,
166-
// - The branch name used for the deploy (i.e. `dev`, `master`, `patch-1`, etc)
166+
// - The branch name used for the deploy (i.e. `dev`, `master`, `patch-1`, etc.)
167167
VERCEL_BRANCH: process.env.VERCEL_GITHUB_COMMIT_REF,
168168
// - The Commit SHA hash
169169
VERCEL_COMMIT_SHA: process.env.VERCEL_GITHUB_COMMIT_SHA,

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ echo ''
3838

3939
echo 'Minify JS...'
4040
# We instruct terser to preserve our `Bv*Event` class names and
41-
# safe types (i.e. `Element`, etc) when mangling top level names
41+
# safe types (i.e. `Element`, etc.) when mangling top level names
4242
terser dist/bootstrap-vue.js \
4343
--compress typeofs=false \
4444
--mangle reserved=['BvEvent','BvModalEvent','Element','HTMLElement','SVGElement'] \

src/components/aspect/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ The width will always be 100% of the available width in the parent element/compo
6262

6363
## See also
6464

65-
- [`<b-embed>` component](/docs/components/embed) for responsive embeds (videos, iframes, etc)
65+
- [`<b-embed>` component](/docs/components/embed) for responsive embeds (videos, iframes, etc.)

src/components/avatar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ between `0` and `1`, where `0` means no overlap and `1` means 100% overlap.
552552

553553
Use the `aria-label` prop to provide an accessible, screen reader friendly, label for your avatar.
554554
If you have a badge, it is recommended to add inforation to your aria-label regarding the badge
555-
purpose or content (i.g. `'3 messages'`, `'online'`, etc)).
555+
purpose or content (i.g. `'3 messages'`, `'online'`, etc.).
556556

557557
While the `click` event is emitted regardless if the `button`, `href`, or `to` props are set, it is
558558
highly recommended to use the `button` prop when the click event should trigger an action (or use

src/components/calendar/calendar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export const BCalendar = Vue.extend({
257257
// `short` is typically a 3 letter abbreviation,
258258
// `narrow` is typically a single letter
259259
// `long` is the full week day name
260-
// Although some locales may override this (i.e `ar`, etc)
260+
// Although some locales may override this (i.e `ar`, etc.)
261261
default: STR_SHORT,
262262
validator: value => arrayIncludes([STR_LONG, STR_SHORT, STR_NARROW], value)
263263
}

src/components/form-checkbox/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ named slot `first`.
9999

100100
If both `html` and `text` are provided, `html` will take precedence. Only basic/native HTML is
101101
supported in the `html` field (components will not work). Note that not all browsers will render
102-
inline html (i.e. `<i>`, `<strong>`, etc) inside `<option>` elements of a `<select>`.
102+
inline html (i.e. `<i>`, `<strong>`, etc.) inside `<option>` elements of a `<select>`.
103103

104104
<p class="alert alert-danger">
105105
<strong>Be cautious</strong> of placing user supplied content in the <code>html</code> field,

src/components/form-datepicker/form-datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ const propsMixin = {
263263
// `short` is typically a 3 letter abbreviation,
264264
// `narrow` is typically a single letter
265265
// `long` is the full week day name
266-
// Although some locales may override this (i.e `ar`, etc)
266+
// Although some locales may override this (i.e `ar`, etc.)
267267
default: STR_SHORT,
268268
validator: value => arrayIncludes([STR_LONG, STR_SHORT, STR_NARROW], value)
269269
},

src/components/form-input/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ rendered and a console warning will be issued.
9393
Use the `number` or `trim` props instead.
9494
- Older version of Firefox may not support `readonly` for `range` type inputs.
9595
- Input types that do not support `min`, `max` and `step` (i.e. `text`, `password`, `tel`, `email`,
96-
`url`, etc) will silently ignore these values (although they will still be rendered on the input
96+
`url`, etc.) will silently ignore these values (although they will still be rendered on the input
9797
markup) if values are provided.
9898

9999
**Caveats with predictive text entry and IME composition entry:**
100100

101101
- When using predictive text auto-suggested words, the `v-model` will not update until the
102102
auto-suggested word is selected (or a space is typed). If an auto suggested word is not selected,
103103
the v-model will update with the current _displayed text_ of the input when the input is blurred.
104-
- When using IME composition (ie. Chinese, Japanese, etc), the `v-model` will not update until the
104+
- When using IME composition (ie. Chinese, Japanese, etc.), the `v-model` will not update until the
105105
IME composition is completed.
106106

107107
### Range type input
@@ -404,9 +404,10 @@ Formatting does not occur if a `formatter` is not provided.
404404
<!-- b-form-input-formatter.vue -->
405405
```
406406

407-
**Note:** When using a non-text-like input (i.e. `color`, `range`, `date`, `number`, `email` etc),
408-
ensure that your formatter function returns the value in the expected format for the input type. The
409-
formatter **must** return the value as a _string_.
407+
**Note:** When using a non-text-like input (i.e. `color`, `range`, `date`, `number`, `email` etc.),
408+
ensure that your formatter function returns the value in the expected format (`date` ->
409+
'2000-06-01', `color` -> '#ff0000', etc.) for the input type. The formatter **must** return the
410+
value as a _string_.
410411

411412
**Note:** With non-lazy formatting, if the cursor is not at the end of the input value, the cursor
412413
may jump to the end _after_ a character is typed. You can use the provided event object and the

src/components/form-radio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ To have them appear _above_ the inputs generated by `options`, place them in the
140140

141141
If both `html` and `text` are provided, `html` will take precedence. Only basic/native HTML is
142142
supported in the `html` field (components will not work). Note that not all browsers will render
143-
inline html (i.e. `<i>`, `<strong>`, etc) inside `<option>` elements of a `<select>`.
143+
inline html (i.e. `<i>`, `<strong>`, etc.) inside `<option>` elements of a `<select>`.
144144

145145
<p class="alert alert-danger">
146146
<strong>Be cautious</strong> of placing user supplied content in the <code>html</code> field,

src/components/form-select/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ options specified by the `options` prop, use the named slot `first`.
153153

154154
If both `html` and `text` are provided, `html` will take precedence. Only basic/native HTML is
155155
supported in the `html` field (components will not work). Note that not all browsers will render
156-
inline html (i.e. `<i>`, `<strong>`, etc) inside `<option>` elements of a `<select>`.
156+
inline html (i.e. `<i>`, `<strong>`, etc.) inside `<option>` elements of a `<select>`.
157157

158158
<p class="alert alert-danger">
159159
<strong>Be cautious</strong> of placing user supplied content in the <code>html</code> field,

src/components/form-tags/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ enable adding a tag on the input's `change` event via the `add-on-change` prop.
4444

4545
## Tag creation using separators
4646

47-
To auto create tags when a separator character is typed (i.e. <kbd>Space</kbd>, <kbd>,</kbd>, etc),
47+
To auto create tags when a separator character is typed (i.e. <kbd>Space</kbd>, <kbd>,</kbd>, etc.),
4848
set the `separator` prop to the character that will trigger the tag to be added. If multiple
4949
separator characters are needed, then include them as a single string (i.e. `' ,;'`), or an array of
5050
characters (i.e. `[' ', ',', ';']`), which will trigger a new tag to be added when <kbd>Space</kbd>,

src/components/form-timepicker/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Internationalization of the time interface is provided via
267267
[`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat)
268268
and
269269
[`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat),
270-
except for the labels applied to elements of the time control (aria-labels, selected status, etc).
270+
except for the labels applied to elements of the time control (aria-labels, selected status, etc.).
271271
You must provide your own translations for these labels. The available locales will be browser
272272
dependent (not all browsers support all locales).
273273

src/components/jumbotron/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ other appropriate element by setting the `tag` prop to the desired element tag n
8080
## Variants
8181

8282
Control the overall background variant with the `bg-variant` prop ( set to `info`, `danger`,
83-
`warning`, `light`, `dark`, etc), the border variant with the `border-variant` prop, and the text
83+
`warning`, `light`, `dark`, etc.), the border variant with the `border-variant` prop, and the text
8484
variant with `text-variant` prop. All three props default to `null`, which will instruct the
8585
jumbotron to use the default styling.
8686

src/components/modal/modal.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe('modal', () => {
4040
expect(wrapper.vm).toBeDefined()
4141
await waitNT(wrapper.vm)
4242

43-
// Main outer wrapper (has z-index, etc)... The stacker <div>
43+
// Main outer wrapper (has z-index, etc.)... The stacker <div>
4444
expect(wrapper.element.tagName).toBe('DIV')
4545
expect(wrapper.classes().length).toBe(0)
4646
expect(wrapper.element.style.position).toEqual('absolute')
@@ -120,7 +120,7 @@ describe('modal', () => {
120120
expect(wrapper.vm).toBeDefined()
121121
await waitRAF()
122122

123-
// Main outer wrapper (has z-index, etc)... The stacker <div>
123+
// Main outer wrapper (has z-index, etc.)... The stacker <div>
124124
expect(wrapper.element.tagName).toBe('DIV')
125125
expect(wrapper.classes().length).toBe(0)
126126
expect(wrapper.element.style.position).toEqual('absolute')
@@ -205,7 +205,7 @@ describe('modal', () => {
205205
await waitNT(wrapper.vm)
206206
await waitRAF()
207207

208-
// Main outer wrapper (has z-index, etc)... The stacker <div>
208+
// Main outer wrapper (has z-index, etc.)... The stacker <div>
209209
expect(wrapper.element.tagName).toBe('DIV')
210210
expect(wrapper.classes().length).toBe(0)
211211
expect(wrapper.element.style.position).toEqual('absolute')

src/components/popover/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Things to know when using popover component:
2929
- Popovers rely on the 3rd party library [Popper.js](https://popper.js.org/) for positioning.
3030
- Popovers require BootstrapVue's custom SCSS/CSS in order to function correctly, and for variants.
3131
- Specify `container` as `null` (default, appends to `<body>`) to avoid rendering problems in more
32-
complex components (like input groups, button groups, etc). You can use `container` to optionally
32+
complex components (like input groups, button groups, etc.). You can use `container` to optionally
3333
specify a different element to append the rendered popover to.
3434
- Triggering popovers on hidden elements will not work.
3535
- Popovers for `disabled` elements must be triggered on a wrapper element.

src/components/progress/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ classes.
169169
```
170170

171171
The height of the progress bar can be controlled with the `height` prop. The height value should be
172-
a standard CSS dimension (`px`, `rem`, `em`, etc). The default height is `1rem`.
172+
a standard CSS dimension (`px`, `rem`, `em`, etc.). The default height is `1rem`.
173173

174174
```html
175175
<template>

src/components/sidebar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ overrides.
146146
### Width
147147

148148
By default the width of `<b-sidebar>` is set to `320px` (100% on 'xs' screens). Simply provide a
149-
value via the `width` prop (i.e. `'180px'`, `'20em'`, etc) to override this default. The max width
149+
value via the `width` prop (i.e. `'180px'`, `'20em'`, etc.) to override this default. The max width
150150
is set to `100%` via CSS.
151151

152152
### Padding

src/components/table/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Fields can be a simple array, for defining the order of the columns, and which c
182182
### Fields as an array of objects
183183

184184
Fields can be a an array of objects, providing additional control over the fields (such as sorting,
185-
formatting, etc). Only columns (keys) that appear in the fields array will be shown:
185+
formatting, etc.). Only columns (keys) that appear in the fields array will be shown:
186186

187187
**Example: Using array of objects fields definition**
188188

@@ -1306,7 +1306,7 @@ available horizontal space.
13061306
- Bootstrap v4 uses the CSS style `border-collapse: collapsed` on table elements. This prevents the
13071307
borders on the sticky header from "sticking" to the header, and hence the borders will scroll when
13081308
the body scrolls. To get around this issue, set the prop `no-border-collapse` on the table (note
1309-
that this may cause double width borders when using features such as `bordered`, etc).
1309+
that this may cause double width borders when using features such as `bordered`, etc.).
13101310
- The sticky header feature uses CSS style `position: sticky` to position the headings. Internet
13111311
Explorer does not support `position: sticky`, hence for IE 11 the table headings will scroll with
13121312
the table body.
@@ -1401,7 +1401,7 @@ set.
14011401
- Bootstrap v4 uses the CSS style `border-collapse: collapsed` on table elements. This prevents any
14021402
borders on the sticky columns from "sticking" to the column, and hence those borders will scroll
14031403
when the body scrolls. To get around this issue, set the prop `no-border-collapse` on the table
1404-
(note that this may cause double width borders when using features such as `bordered`, etc).
1404+
(note that this may cause double width borders when using features such as `bordered`, etc.).
14051405
- BootstrapVue's custom CSS is required in order to support sticky columns.
14061406
- The sticky column feature uses CSS style `position: sticky` to position the column cells. Internet
14071407
Explorer does not support `position: sticky`, hence for IE 11 the sticky column will scroll with
@@ -2514,7 +2514,7 @@ sticky. See below for more information on using [sticky columns](#simple-tables-
25142514

25152515
Since `b-table-simple` is just a wrapper component, of which you will need to render content inside,
25162516
it does not provide any of the advanced features of `<b-table>` (i.e. row events, head events,
2517-
sorting, pagination, filtering, foot-clone, items, fields, etc).
2517+
sorting, pagination, filtering, foot-clone, items, fields, etc.).
25182518

25192519
```html
25202520
<div>
@@ -2782,7 +2782,7 @@ markup. Components `<b-table>` and `<b-table-lite>` use these helper components
27822782

27832783
In the [Simple tables](#simple-tables) example, we are using the helper components `<b-thead>`,
27842784
`<b-tbody>`, `<b-tr>`, `<b-th>`, `<b-tr>` and `<b-tfoot>`. While you can use regular table child
2785-
elements (i.e. `<tbody>`, `<tr>`, `<td>`, etc) within `<b-table-simple>`, and the named slots
2785+
elements (i.e. `<tbody>`, `<tr>`, `<td>`, etc.) within `<b-table-simple>`, and the named slots
27862786
`top-row`, `bottom-row`, and `thead-top`, it is recommended to use these BootstrapVue table `<b-t*>`
27872787
helper components. Note that there are no helper components for `<caption>`, `<colgroup>` or
27882788
`<col>`, so you may these three HTML5 elements directly in `<b-table-simple>`.

src/components/time/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Internationalization of the time interface is provided via
240240
[`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat)
241241
and
242242
[`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat),
243-
except for the labels applied to elements of the time control (aria-labels, selected status, etc).
243+
except for the labels applied to elements of the time control (aria-labels, selected status, etc.).
244244
You must provide your own translations for these labels. The available locales will be browser
245245
dependent (not all browsers support all locales).
246246

src/components/tooltip/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Things to know when using tooltip component:
2828
- Tooltips require BootstrapVue's custom SCSS/CSS in order to function correctly, and for variants.
2929
- Triggering tooltips on hidden elements will not work.
3030
- Specify `container` as `null` (default, appends to `<body>`) to avoid rendering problems in more
31-
complex components (like input groups, button groups, etc). You can use container to optionally
31+
complex components (like input groups, button groups, etc.). You can use container to optionally
3232
specify a different element to append the rendered tooltip to.
3333
- Tooltips for `disabled` elements must be triggered on a wrapper element.
3434
- When triggered from hyperlinks that span multiple lines, tooltips will be centered. Use

0 commit comments

Comments
 (0)