From f56cebfc1018389f4084db7bc08311a75f673fac Mon Sep 17 00:00:00 2001 From: Allan Kerr Date: Thu, 7 May 2020 15:07:01 -0400 Subject: [PATCH] Update alert to point to the core version of alert --- .travis.yml | 10 -- README.md | 196 +--------------------------------- alert.gif | Bin 2770 -> 0 bytes d2l-alert-shared-styles.js | 16 --- d2l-alert-toast.js | 202 +---------------------------------- d2l-alert.js | 212 +------------------------------------ demo/alert-toast.html | 141 +++++++++--------------- demo/alert.html | 135 +++++++---------------- localize-behavior.js | 65 ------------ package.json | 18 +--- test/.eslintrc.json | 3 - test/d2l-alert-toast.html | 46 -------- test/d2l-alert.html | 46 -------- test/index.html | 18 ---- wct.conf.json | 39 ------- 15 files changed, 94 insertions(+), 1053 deletions(-) delete mode 100644 alert.gif delete mode 100644 d2l-alert-shared-styles.js delete mode 100644 localize-behavior.js delete mode 100644 test/.eslintrc.json delete mode 100644 test/d2l-alert-toast.html delete mode 100644 test/d2l-alert.html delete mode 100644 test/index.html delete mode 100644 wct.conf.json diff --git a/.travis.yml b/.travis.yml index 23b09ed..73c9ea7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,6 @@ addons: chrome: stable script: - npm run lint -- | - if [ $TRAVIS_PULL_REQUEST != false ] && [ $TRAVIS_SECURE_ENV_VARS == true ]; then - echo "Pull request with secure environment variables, running Sauce tests..."; - npm run test:polymer:sauce || travis_terminate 1; - else - echo "Not a pull request and/or no secure environment variables, running headless tests..."; - npm run test:polymer:local || travis_terminate 1; - fi after_success: - frauci-update-version -d=skip && export TRAVIS_TAG=$(frauci-get-version) deploy: @@ -23,6 +15,4 @@ env: global: - OWNER_NAME=BrightspaceUI - REPO_NAME=alert - - SAUCE_USERNAME: Desire2Learn - - secure: WJ88oxdQ45dAwFWgjgrIuOE2EydQ5jJVs9T0P8rerORGtpPp80R0OrgAAgGfvmEXzSR3kRggUAhIXU3oxlgh9TsnhiRnkzQPDPiitVBirYNSK1wL+w0hXRtOe7GcVYIvdEOEiOmoZ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g3s7t9/CoxHjC5dVIfHvzqPopaDrPqGHzg42Prrg9m5Q0Z5Fx2G8ZXnticOLzm4u3TX0JcfKuwzNYWbQakgTLEZwHHUZbJTiVG2qPFhKWkssvSEAzpsrMefezvYCw0bzqjrcDqSwqcT83LgvS+NYQ= diff --git a/README.md b/README.md index e0f4239..25b97ae 100644 --- a/README.md +++ b/README.md @@ -1,195 +1 @@ -# d2l-alert -[![Build status][ci-image]][ci-url] - -[Polymer](https://www.polymer-project.org)-based web component for D2L alerts. - -For further information on this and other components, refer to [The Brightspace UI Guide](https://github.com/BrightspaceUI/guide/wiki). - -## Installation - -`d2l-alert` can be installed from through npm by referencing it in your package.json from Github: - -```shell -"d2l-alert": "BrightspaceUI/alert#semver:^4" -``` - -## Usage - -Include the [webcomponents.js](http://webcomponents.org/polyfills/) "lite" polyfill (for browsers who don't natively support web components): - -```html - - - -``` - -Then import the components below that you want to use. - -### Alert -```html - - - -``` - - -```html - - A warning message. - -``` - -A `` custom element can now be used in your application by specifying one of the following types: `default`, `success`, `critical`, or `warning`. - -```html -A default message. -``` - -A close button can optionally be rendered by specifying the `has-close-button` attribute. - -```html - - A default message. - -``` - -```javascript -alert.addEventListener('d2l-alert-closed', function() { - console.log('alert dismissed/closed'); -}); -``` - -A custom action button can also be rendered if text is provided for the button. - -```html - - A default message. - -``` - -```javascript -alert.addEventListener('d2l-alert-button-pressed', function() { - console.log('alert custom action!'); -}); -``` - -Subtext can be added underneath the main message heading, if more detail is required. - -```html - - A default message. - -``` - -### Toast Alert -```html - - - -``` - -The toast alert is an alert that pops up at the bottom of the screen, and stays open for 2.5 seconds before closing. It has the same functionality as the regular alert, using most of the same attributes (e.g. type, subtext, etc.). In addition it has an `open` attribute, that you need to set whenever you want it to open: - -```html - - A default message. - -``` - -It also has an `autoclose` attribute that defaults to on, which will trigger the toast to disappear after 2.5 seconds. To keep the toast on the screen indefinitely, turn off the `autoclose` attribute by setting it to 0: - -```html - - A default message. - -``` - -Toast alerts default to having close buttons. As a result, if you don't want a close button, you'll need to set the `hide-close-button` attribute: - -```html - - A default message. - -``` - -To support the ability for screen readers to read out toast messages, toast alerts have the `announce-text` attribute: - -```html - - Here is a toast - -``` - -## Developing, Testing and Contributing - -After cloning the repo, run `npm install` to install dependencies. - -If you don't have it already, install the [Polymer CLI](https://www.polymer-project.org/2.0/docs/tools/polymer-cli) globally: - -```shell -npm install -g polymer-cli -``` - -To start a [local web server](https://www.polymer-project.org/3.0/docs/tools/polymer-cli-commands#serve) that hosts the demo page and tests: - -```shell -polymer serve -``` - -To lint ([eslint](http://eslint.org/) and [Polymer lint](https://www.polymer-project.org/3.0/docs/tools/polymer-cli-commands#lint)): - -```shell -npm run lint -``` - -To run unit tests locally using [Polymer test](https://www.polymer-project.org/3.0/docs/tools/polymer-cli-commands#tests): - -```shell -npm run test:polymer:local -``` - -To lint AND run local unit tests: - -```shell -npm test -``` - -[ci-url]: https://travis-ci.com/BrightspaceUI/alert -[ci-image]: https://travis-ci.com/BrightspaceUI/alert.svg?branch=master - -## Versioning & Releasing - -All version changes should obey [semantic versioning](https://semver.org/) rules. - -Include either `[increment major]`, `[increment minor]` or `[increment patch]` in your merge commit message to automatically increment the `package.json` version and create a tag during the next build. +> Deprecated: use [BrightspaceUI/core](https://github.com/BrightspaceUI/core) instead. diff --git a/alert.gif b/alert.gif deleted file mode 100644 index 1c902a6d346c5457991b9b5b5f833b9908e74a2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2770 zcmc)J`#;kS8wc?3zB|~4ZP=!?G^fm=91@D|=WFH|no|zp9;qa>BuT38W=bfdL@3lk zQq7%0k@( z8X7bjO;1nH#Kgqf+S<;}j>Td*y12V}c)IWK_VV%b_S@+j5ab`UD<~vv*YDw>;kzUD z?A^U@|K8}B=$P082f1D!qly%CUbai(>fAR9g%br)SU;owD-`79z z=Iz_+LB;zI@(*%(=g^{TXmMm@q#KlwWYUu&DUT)soV( zYb##m6_qzvsBYi6`>)jf6{?1Zj~bg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 -1,16 +0,0 @@ -import '@polymer/polymer/polymer-legacy.js'; -import 'd2l-colors/d2l-colors.js'; -const $_documentContainer = document.createElement('template'); - -$_documentContainer.innerHTML = ` - -`; - -document.head.appendChild($_documentContainer.content); diff --git a/d2l-alert-toast.js b/d2l-alert-toast.js index da0e616..9440210 100644 --- a/d2l-alert-toast.js +++ b/d2l-alert-toast.js @@ -1,201 +1 @@ -/** -`d2l-alert-toast` -Polymer-based web component for a D2L toast alert - -@demo demo/index.html -*/ -/* - FIXME(polymer-modulizer): the above comments were extracted - from HTML and may be out of place here. Review them and - then delete this comment! -*/ -import '@polymer/polymer/polymer-legacy.js'; - -import './d2l-alert.js'; -import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; -import { announce } from '@brightspace-ui/core/helpers/announce.js'; -const $_documentContainer = document.createElement('template'); - -$_documentContainer.innerHTML = ` - - -`; - -document.head.appendChild($_documentContainer.content); -Polymer({ - is: 'd2l-alert-toast', - - /** - * Fired when the custom action button is pressed. - * - * @event d2l-alert-button-pressed - */ - - /** - * Fired when the alert is closed/hidden. - * - * @event d2l-alert-closed - */ - - listeners: { - 'd2l-alert-closed': '_close' - }, - - properties: { - - /** - * Type of alert to display. Valid values are 'default', 'success', 'critical', and 'warning'. - * Values "call-to-action" and "error" have been deprecated. - * - * NOTE: Toast alerts should not be used with 'critical' or 'warning' colors. - */ - type: { - type: String, - value: 'default', - reflectToAttribute: true - }, - /** - * Text for a custom action button. If provided, a button will be rendered with the specified text. - */ - buttonText: { - type: String, - value: null - }, - /** - * Whether to render a close button, allowing the user to hide the alert. - */ - hideCloseButton: { - type: Boolean, - value: false - }, - /** - * Additional text that will go underneath the heading - */ - subtext: { - type: String, - value: null - }, - /** - * Whether to open the toast alert (make visible) or not. - */ - open:{ - type: Boolean, - value: false, - reflectToAttribute: true, - observer: '_changeOpen' - }, - /** - * Whether to automatically close after 2.5 seconds or stay open - */ - autoclose:{ - type: Number, - value: 1, - observer: '_changeOpen' - }, - /** - * Text that will be read by a screen reader when the toast is displayed - */ - announceText: { - type: String - } - }, - - _changeOpen: function() { - if (!this._toastContainer) { - this._toastContainer = this.$$('div.d2l-alert-toast-container'); - } - - if (this.open) { - requestAnimationFrame(function() { - requestAnimationFrame(function() { - this._toastContainer.classList.add('d2l-alert-toast-container-opened'); - - if (this.announceText) { - announce(this.announceText); - } else { - this._toastContainer.setAttribute('role', 'alert'); - } - - if (this.autoclose === 1) { - //clear the setTimeout below that will close after 2.5 seconds if you closed the toast another way, and are re-opening (you'll want a fresh 2.5 seconds) - if (this._setTimeoutId > -1) { - clearTimeout(this._setTimeoutId); - } - - this._setTimeoutId = setTimeout(function() { - this._toastContainer.classList.remove('d2l-alert-toast-container-opened'); - this._setTimeoutId = -1; - }.bind(this), 2500); - } - }.bind(this)); - }.bind(this)); - - } else { - this._toastContainer.classList.remove('d2l-alert-toast-container-opened'); - - if (!this.announceText) { - this._toastContainer.removeAttribute('role'); - } - } - }, - - _close: function() { - this.open = false; - //this removes the hidden attribute from the alert element, which is necessary for it to be visible again if we want to open it - var alertElement = this.$$('d2l-alert'); - if (alertElement && alertElement.hasAttribute('hidden')) { - alertElement.removeAttribute('hidden'); - } - }, - - //make sure that the transition has ended before setting open property to false, because it sets display:none and stops the transition from happening - //also, check for the event triggered by the end of visibility transition, as the toast will no longer be visible after this point - _setClosedClass: function(event) { - if (!this._toastContainer.classList.contains('d2l-alert-toast-container-opened') && event.propertyName === 'visibility') { - this.open = false; - } - } -}); +import '@brightspace-ui/core/components/alert/alert-toast.js'; diff --git a/d2l-alert.js b/d2l-alert.js index 56764b8..8da6adf 100644 --- a/d2l-alert.js +++ b/d2l-alert.js @@ -1,211 +1 @@ -/** -`d2l-alert` -Polymer-based web component for a D2L alert - -@demo demo/index.html -*/ -/* - FIXME(polymer-modulizer): the above comments were extracted - from HTML and may be out of place here. Review them and - then delete this comment! -*/ -import '@polymer/polymer/polymer-legacy.js'; - -import '@brightspace-ui/core/components/button/button-icon.js'; -import '@brightspace-ui/core/components/button/button-subtle.js'; -import 'd2l-colors/d2l-colors.js'; -import 'd2l-typography/d2l-typography-shared-styles.js'; -import './localize-behavior.js'; -import './d2l-alert-shared-styles.js'; -import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; -const $_documentContainer = document.createElement('template'); - -$_documentContainer.innerHTML = ` - - -`; - -document.head.appendChild($_documentContainer.content); -Polymer({ - is: 'd2l-alert', - - behaviors: [ - D2L.PolymerBehaviors.Alert.LocalizeBehavior - ], - - /** - * Fired when the custom action button is pressed. - * - * @event d2l-alert-button-pressed - */ - - /** - * Fired when the alert is closed/hidden. - * - * @event d2l-alert-closed - */ - - properties: { - - /** - * Type of alert to display. Valid values are 'default', 'success', 'critical', and 'warning'. - * Values "call-to-action" and "error" have been deprecated. - */ - type: { - type: String, - value: 'default', - reflectToAttribute: true - }, - _hasButton: { - type: Boolean, - computed: '_computeHasButton(buttonText)' - }, - /** - * Text for a custom action button. If provided, a button will be rendered with the specified text. - */ - buttonText: { - type: String, - value: null - }, - /** - * Whether to render a close button, allowing the user to hide the alert. - */ - hasCloseButton: { - type: Boolean, - value: false - }, - /** - * Additional text that will go underneath the heading - */ - subtext: { - type: String, - value: null - } - }, - - /** - * Closes/hides the alert. - */ - close: function() { - this.setAttribute('hidden', 'hidden'); - this._dispatchClosedEvent(); - }, - - _computeHasButton: function(buttonText) { - return (buttonText && buttonText.length > 0); - }, - - _dispatchButtonPressedEvent: function() { - this.fire('d2l-alert-button-pressed'); - }, - - _dispatchClosedEvent: function() { - this.fire('d2l-alert-closed'); - } - -}); +import '@brightspace-ui/core/components/alert/alert.js'; diff --git a/demo/alert-toast.html b/demo/alert-toast.html index b404402..f720ff8 100644 --- a/demo/alert-toast.html +++ b/demo/alert-toast.html @@ -3,114 +3,73 @@ - d2l-alert-toast demo - - - - - - - - + + -$_documentContainer.innerHTML = ``; + -document.body.appendChild($_documentContainer.content); - - - - - - + + diff --git a/demo/alert.html b/demo/alert.html index 7962e55..4686817 100644 --- a/demo/alert.html +++ b/demo/alert.html @@ -3,135 +3,74 @@ - d2l-alert demo - - - - - - - + import '@brightspace-ui/core/components/demo/demo-page.js'; + import '@brightspace-ui/core/components/demo/demo-snippet.js'; + import '../d2l-alert.js'; + + - - - + diff --git a/localize-behavior.js b/localize-behavior.js deleted file mode 100644 index cb589a0..0000000 --- a/localize-behavior.js +++ /dev/null @@ -1,65 +0,0 @@ -import 'd2l-localize-behavior/d2l-localize-behavior.js'; - -window.D2L = window.D2L || {}; -window.D2L.PolymerBehaviors = window.D2L.PolymerBehaviors || {}; -window.D2L.PolymerBehaviors.Alert = window.D2L.PolymerBehaviors.Alert || {}; - -/** @polymerBehavior D2L.PolymerBehaviors.Alert.LocalizeBehavior */ -D2L.PolymerBehaviors.Alert.LocalizeBehaviorImpl = { - properties: { - /** - * Localization resources. - */ - resources: { - value: function() { - return { - 'en': { - 'close': 'Close Alert' - }, - 'ar': { - 'close': 'إغلاق التنبيه' - }, - 'de': { - 'close': 'Benachrichtigung schließen' - }, - 'es': { - 'close': 'Alerta de cierre' - }, - 'fr': { - 'close': 'Fermer l\'alerte' - }, - 'ja': { - 'close': 'アラートを閉じる' - }, - 'ko': { - 'close': '경보 닫기' - }, - 'nl': { - 'close': 'Waarschuwing sluiten' - }, - 'pt': { - 'close': 'Fechar Alerta' - }, - 'sv': { - 'close': 'Stängningsvarning' - }, - 'tr': { - 'close': 'Kapatma Uyarısı' - }, - 'zh': { - 'close': '关闭警报' - }, - 'zh-tw': { - 'close': '關閉警示' - } - }; - } - } - } -}; - -/** @polymerBehavior D2L.PolymerBehaviors.Alert.LocalizeBehavior */ -D2L.PolymerBehaviors.Alert.LocalizeBehavior = [ - D2L.PolymerBehaviors.LocalizeBehavior, - D2L.PolymerBehaviors.Alert.LocalizeBehaviorImpl -]; diff --git a/package.json b/package.json index b93b714..03c8c96 100644 --- a/package.json +++ b/package.json @@ -8,25 +8,18 @@ "scripts": { "lint": "npm run lint:wc && npm run lint:js", "lint:js": "eslint . --ext .js,.html test/**/*.js test/**/*.html demo/**/*.js demo/**/*.html", - "lint:wc": "polymer lint", - "test": "npm run lint && npm run test:polymer:local", - "test:polymer:local": "polymer test --skip-plugin sauce", - "test:polymer:sauce": "polymer test --skip-plugin local" + "lint:wc": "polymer lint" }, "author": "D2L Corporation", "license": "Apache-2.0", "devDependencies": { - "@babel/polyfill": "^7.0.0", - "@polymer/iron-component-page": "^3.0.0-pre.18", - "@polymer/iron-demo-helpers": "^3.0.0-pre.18", "@webcomponents/webcomponentsjs": "^2.2.1", "babel-eslint": "^10.0.1", "eslint": "^4.15.0", "eslint-config-brightspace": "^0.4.0", "eslint-plugin-html": "^4.0.1", "frau-ci": "^1.33.2", - "polymer-cli": "^1.9.1", - "wct-browser-legacy": "^1.0.1" + "polymer-cli": "^1.9.1" }, "version": "4.14.1", "resolutions": { @@ -37,10 +30,7 @@ }, "main": "d2l-alert.js", "dependencies": { - "@brightspace-ui/core": "^1", - "@polymer/polymer": "^3.0.0", - "d2l-colors": "BrightspaceUI/colors#semver:^4", - "d2l-localize-behavior": "BrightspaceUI/localize-behavior#semver:^2", - "d2l-typography": "BrightspaceUI/typography#semver:^7" + "@brightspace-ui/core": "^1.44", + "@polymer/polymer": "^3.0.0" } } diff --git a/test/.eslintrc.json b/test/.eslintrc.json deleted file mode 100644 index 3dacc9b..0000000 --- a/test/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "brightspace/wct-polymer-3-config" -} diff --git a/test/d2l-alert-toast.html b/test/d2l-alert-toast.html deleted file mode 100644 index edb0136..0000000 --- a/test/d2l-alert-toast.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - d2l-alert test - - - - - - - - - - - - - - diff --git a/test/d2l-alert.html b/test/d2l-alert.html deleted file mode 100644 index a9419c0..0000000 --- a/test/d2l-alert.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - d2l-alert test - - - - - - - - - - - - - - diff --git a/test/index.html b/test/index.html deleted file mode 100644 index 7b9e96d..0000000 --- a/test/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/wct.conf.json b/wct.conf.json deleted file mode 100644 index 88fee95..0000000 --- a/wct.conf.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "plugins": { - "local": { - "browsers": ["chrome"], - "browserOptions": { - "chrome": ["headless", "disable-gpu", "no-sandbox"] - } - }, - "sauce": { - "browsers": [ - { - "browserName": "chrome", - "platform": "OS X 10.12", - "version": "" - }, - { - "browserName": "firefox", - "platform": "OS X 10.12", - "version": "" - }, - { - "browserName": "safari", - "platform": "OS X 10.13", - "version": "" - }, - { - "browserName": "microsoftedge", - "platform": "Windows 10", - "version": "" - }, - { - "browserName": "internet explorer", - "platform": "Windows 10", - "version": "11" - } - ] - } - } -}