v0.18.0
The NPM update!
This release was made possible by the following contributors:
- @100stacks
- @BY00565233
- @cathysiller
- @CITguy
- @explorigin
- @kamalgill
- @lalithkarikelli
- @nicko-winner
- @ssalinas24
Breaking Changes
- π¨
HelixUI.initialize()is no longer automatic for any JavaScript bundle.- Must be explicitly called by consuming application logic.
- NPM assets
- π¨
dist/styles/renamed todist/css/ - π¨
dist/scripts/renamed todist/js/ - π¨
dist/scripts/helix-ui.jsrenamed todist/js/helix-ui.cjs.js - π¨
dist/scripts/helix-ui.es.jsrenamed todist/js/helix-ui.esm.js - π¨
dist/scripts/helix-ui.browser[.min].jsrenamed todist/js/helix-ui[.min].js
- π¨
- π¨
<hx-search>has been converted into a stylistic facade with no configurable functionality- See
Searchcomponent docs for more info.
- See
Corrections
- Fixed a CSS bug that was allowing many basic form controls (introduced in v0.16.x) to escape the scrolling contexts of their ancestors (#540)
Updates
- π added
<hx-search-control>to augment native browser validation behavior- See
Searchcomponent docs for more info.
- See
- Improved stability of
HelixUI.initialize()in the event thatWebComponentsReadyfires more than once. (#641) - Numerous component styles have been converted from LESS to SCSS.
- This should not result in any noticeable changes when consuming HelixUI styles.
- We anticipate complete conversion by the v0.19.0 release.
NPM Assets
(Raw NPM diff: v0.17.3 vs v0.18.0)
- π Web Component polyfills (v2.x) are now included as a bundled dependency of
helix-ui! (#541)@webcomponents/webcomponentsjsis no longer necessary as a separate production dependency!
- π HelixUI assets have been reworked to support bundler-based workflows (#630)
custom-elements-es5-adapter.jsnow baked into all ES5 JavaScript bundles
- π added
dist/js/helix-ui.module[.min].js(ES6 Syntax in ES Module format)β οΈ not compatible with IE!
- Future NPM asset updates should be backward compatible (rarely introduce breaking changes, if any)
NPM Assets - Before
dist/
scripts/
helix-ui.browser[.min].js # [1]
helix-ui.es.js # [2]
helix-ui.js # [3]
styles/
helix-ui[.min].csshelix-ui.browser[.min].js(browser only, ES5 + UMD)helix-ui.es.js(bundlers only, ES6 + ESM)- should be ES5 syntax
- not compatible with bundlers (retains ES6 syntax, doesn't work in IE)
helix-ui.js(bundlers only, ES6 + CJS)- should be ES5 syntax
- not compatible with bundlers (retains ES6 syntax, doesn't work in IE)
NPM Assets - After
- Directories renamed to support shipping additional various asset types in the future
- maybe SCSS, JSON, SVG, etc.
dist/
js/
helix-ui.cjs.js # legacy bundlers
helix-ui.esm.js # modern bundlers
helix-ui[.min].js # IE11 + evergreen browsers
helix-ui.module[.min].js # evergreen browsers only
css/
helix-ui[.min].css
node_modules/
@webcomponents/
webcomponentsjs/...helix-ui.cjs.js(ES5 + CJS)- bundlers only
- defines "HelixUI" as
module.exports = { ... }(can name app const whatever you want) custom-elements-es5-adapter.jsbaked in- webpack compatible
helix-ui.esm.js(ES5 + ESM)- bundlers only
- defines "HelixUI" as
export default ...(can name import whatever you want) custom-elements-es5-adapter.jsbaked in- webpack compatible
helix-ui[.min].js(ES5 + UMD)- browser only
- defines global
HelixUInamespace/variable custom-elements-es5-adapter.jsbaked in
helix-ui.module[.min].js(ES6 + ESM)- modern/evergreen browsers only (good for prototyping)
- defines "HelixUI" as
export default ...(can name import whatever you want)
NPM Assets - Web Components Polyfills
π Web Component polyfills (v2.x) are now included as a bundled NPM dependency to help ensure that polyfills work as well for your app as they do for our documentation.
- Old Path:
node_modules/@webcomponents/webcomponentsjs/ - New Path:
node_modules/helix-ui/node_modules/@webcomponents/webcomponentsjs/
NOTE: Unlike the ES5 adapter, you still need to load webcomponents-loader.js via <script> in your HTML. The loader cannot be bundled, due to its designed functionality. Were it to be bundled, required polyfills would load after they're needed.
v1 Polyfills
HelixUI.initialize()
- π
HelixUI.initialize()now returns a then-able Promise!- async/await compatible
- gives full control over when to run business logic that depends on HelixUI being fully loaded
Examples
then-able Promise:
import HelixUI from 'helix-ui';
function start () {
// bootstrap application here...
}
HelixUI.initialize().then(start);async/await:
import HelixUI from 'helix-ui';
async function start () {
await HelixUI.initialize();
// bootstrap application here...
}
start();Search Component
The Search component has been modified to behave similar to other basic form controls (allowing more control around handling various user-generated events).
Search - Before
<hx-search
[disabled]
[invalid]
[onBlur="handleBlur"]
[onClear="handleClear"]
[onFocus="handleFocus"]
[onInput="handleInput"]
[placeholder="Placeholder Text"]
[value="search value"]
></hx-search>Search - After
<hx-search-control
[class="hxInvalid"]
>
<input
id="searchID"
type="search"
[disabled]
[onBlur="handleBlur"]
[onFocus="handleFocus"]
[onInput="handleInput"]
[required]
/>
<button
aria-label="Clear search"
class="hxClear"
hidden
type="button"
[onClick="handleClear"]
>
<hx-icon type="times"></hx-icon>
</button>
<hx-search></hx-search>
<label
for="searchID"
[class="hxRequired | hxOptional"]
>...</label>
</hx-search-control>Refactoring for the Future
We've been busy refactoring the entire project to support future updates to HelixUI. These tasks directly support three initiatives.
- Support efficient module importing via webpack workflows (see #315)
- Stakeholders will be able to take advantage of dead-code elimination (a.k.a, tree shaking) in order to reduce the amount of resources needed to run their applications.
- Unblock development of HelixReact
- We want to enable our React stakeholders to come together and build awesome React components that wrap HelixUI functionality. Specifically, we want to centralize the workarounds needed to make React play well with custom elements.
- Add some much-needed automated testing.
- This should enable us to release features with higher quality, fewer bugs, and hopefully at a faster pace.
- Automated testing coming soon to improve stability.
While we've made a lot of progress towards these initiatives, there's still work to be done, so stay tuned for upcoming releases.
