@brightspace-ui/core 2.155.0 → 2.155.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -40
- package/components/html-block/README.md +10 -1
- package/components/tag-list/tag-list.js +8 -4
- package/package.json +3 -5
package/README.md
CHANGED
@@ -110,15 +110,23 @@ npm run lint:style
|
|
110
110
|
|
111
111
|
### Testing
|
112
112
|
|
113
|
+
To run the full suite of tests:
|
114
|
+
|
113
115
|
```shell
|
114
|
-
# lint, unit tests and axe tests
|
115
116
|
npm test
|
117
|
+
```
|
116
118
|
|
119
|
+
Alternatively, tests can be selectively run:
|
120
|
+
|
121
|
+
```shell
|
117
122
|
# unit tests
|
118
|
-
npm run test:
|
123
|
+
npm run test:unit
|
119
124
|
|
120
|
-
#
|
121
|
-
npm run test:
|
125
|
+
# aXe accessibility tests
|
126
|
+
npm run test:axe
|
127
|
+
|
128
|
+
# translations tests
|
129
|
+
npm run test:translations
|
122
130
|
```
|
123
131
|
|
124
132
|
Note: The axe tests require `prefers-reduced-motion` emulation to be turned on in the dev console if debugging in a local browser.
|
@@ -133,44 +141,11 @@ npm run test:vdiff
|
|
133
141
|
npm run test:vdiff golden
|
134
142
|
```
|
135
143
|
|
136
|
-
|
137
|
-
|
138
|
-
> TL;DR: Commits prefixed with `fix:` and `feat:` will trigger patch and minor releases when merged to `main`. Read on for more details...
|
139
|
-
|
140
|
-
The [semantic-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/main/semantic-release) is called from the `release.yml` GitHub Action workflow to handle version changes and releasing.
|
141
|
-
|
142
|
-
### Version Changes
|
143
|
-
|
144
|
-
All version changes should obey [semantic versioning](https://semver.org/) rules:
|
145
|
-
1. **MAJOR** version when you make incompatible API changes,
|
146
|
-
2. **MINOR** version when you add functionality in a backwards compatible manner, and
|
147
|
-
3. **PATCH** version when you make backwards compatible bug fixes.
|
148
|
-
|
149
|
-
The next version number will be determined from the commit messages since the previous release. Our semantic-release configuration uses the [Angular convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) when analyzing commits:
|
150
|
-
* Commits which are prefixed with `fix:` or `perf:` will trigger a `patch` release. Example: `fix: validate input before using`
|
151
|
-
* Commits which are prefixed with `feat:` will trigger a `minor` release. Example: `feat: add toggle() method`
|
152
|
-
* To trigger a MAJOR release, include `BREAKING CHANGE:` with a space or two newlines in the footer of the commit message
|
153
|
-
* Other suggested prefixes which will **NOT** trigger a release: `build:`, `ci:`, `docs:`, `style:`, `refactor:` and `test:`. Example: `docs: adding README for new component`
|
154
|
-
|
155
|
-
To revert a change, add the `revert:` prefix to the original commit message. This will cause the reverted change to be omitted from the release notes. Example: `revert: fix: validate input before using`.
|
156
|
-
|
157
|
-
### Releases
|
158
|
-
|
159
|
-
When a release is triggered, it will:
|
160
|
-
* Update the version in `package.json`
|
161
|
-
* Tag the commit
|
162
|
-
* Create a GitHub release (including release notes)
|
163
|
-
* Deploy a new package to NPM
|
164
|
-
|
165
|
-
### Releasing from Maintenance Branches
|
166
|
-
|
167
|
-
Occasionally you'll want to backport a feature or bug fix to an older release. `semantic-release` refers to these as [maintenance branches](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#maintenance-branches).
|
144
|
+
### Versioning and Releasing
|
168
145
|
|
169
|
-
|
146
|
+
This repo is configured to use `semantic-release`. Commits prefixed with `fix:` and `feat:` will trigger patch and minor releases when merged to `main`.
|
170
147
|
|
171
|
-
|
172
|
-
* `1.15.x` for patch releases on top of the `1.15` release (after version `1.16` exists)
|
173
|
-
* `2.x` for feature releases on top of the `2` release (after version `3` exists)
|
148
|
+
To learn how to create major releases and release from maintenance branches, refer to the [semantic-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/main/semantic-release) documentation.
|
174
149
|
|
175
150
|
## Future Enhancements
|
176
151
|
|
@@ -89,7 +89,7 @@ Examples are provided to display how user-authored math can be embedded within y
|
|
89
89
|
|
90
90
|
### Add Context Automatically to Demos and Tests
|
91
91
|
|
92
|
-
You can automatically set-up the `mathjax` context for demo pages and unit tests when using `@web/dev-server`
|
92
|
+
You can automatically set-up the `mathjax` context for demo pages and unit tests when using `@web/dev-server` by adding the following plugin to your configuration.
|
93
93
|
|
94
94
|
```javascript
|
95
95
|
export default {
|
@@ -110,3 +110,12 @@ export default {
|
|
110
110
|
...
|
111
111
|
}
|
112
112
|
```
|
113
|
+
|
114
|
+
For tests using `@brightspace-ui/testing`, pass in the following option:
|
115
|
+
|
116
|
+
```javascript
|
117
|
+
const elem = await fixture(
|
118
|
+
html`<d2l-html-block html="..."></d2l-html-block>`,
|
119
|
+
{ mathjax: { renderLatex: true } }
|
120
|
+
);
|
121
|
+
```
|
@@ -407,12 +407,16 @@ class TagList extends LocalizeCoreElement(InteractiveMixin(ArrowKeysMixin(LitEle
|
|
407
407
|
|
408
408
|
if (!this.shadowRoot) return;
|
409
409
|
|
410
|
+
const isMoreButton = e.target.classList.contains('d2l-tag-list-button-show-more');
|
410
411
|
await this.updateComplete;
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
412
|
+
await new Promise((r) => setTimeout(r, 100)); // wait for items to appear before focusing
|
413
|
+
if (isMoreButton) {
|
414
|
+
this._items[this._chompIndex].focus();
|
415
|
+
} else {
|
416
|
+
this.shadowRoot.querySelector('.d2l-tag-list-button')?.focus();
|
415
417
|
}
|
418
|
+
/** @ignore */
|
419
|
+
this.dispatchEvent(new CustomEvent('d2l-tag-list-focus', { bubbles: false, composed: false }));
|
416
420
|
}
|
417
421
|
}
|
418
422
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "2.155.
|
3
|
+
"version": "2.155.2",
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
5
5
|
"type": "module",
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|
@@ -18,10 +18,9 @@
|
|
18
18
|
"lint:eslint": "eslint . --ext .js,.html --ignore-path .gitignore",
|
19
19
|
"lint:style": "stylelint \"**/*.{js,html}\" --ignore-path .gitignore",
|
20
20
|
"start": "web-dev-server --node-resolve --watch --open",
|
21
|
-
"test": "npm run lint && npm run test:translations && npm run test:
|
21
|
+
"test": "npm run lint && npm run test:translations && npm run test:unit && npm run test:axe",
|
22
22
|
"test:axe": "d2l-test-runner aXe",
|
23
|
-
"test:
|
24
|
-
"test:headless:watch": "d2l-test-runner --watch",
|
23
|
+
"test:unit": "d2l-test-runner",
|
25
24
|
"test:translations": "mfv -e -s en -p ./lang/ -i untranslated",
|
26
25
|
"test:vdiff": "d2l-test-runner vdiff"
|
27
26
|
},
|
@@ -52,7 +51,6 @@
|
|
52
51
|
"@rollup/plugin-node-resolve": "^15",
|
53
52
|
"@rollup/plugin-replace": "^5",
|
54
53
|
"@web/dev-server": "^0.2",
|
55
|
-
"@web/test-runner": "^0.16",
|
56
54
|
"axe-core": "^4",
|
57
55
|
"chalk": "^5",
|
58
56
|
"eslint": "^8",
|