You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: modernize component example documentation #67
example code updated to reflect latest Auro element APIs
example documentation layout improved
custom registration updated and moved to install page
core element descriptions updated
doc build system now uses the latest version of auro-cli
package json configuration updated to support latest auro-cli
additional packages dependencies updated to latest versions
Copy file name to clipboardExpand all lines: README.md
+66-74Lines changed: 66 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,11 @@ The following sections are editable by making changes to the following files:
23
23
<!-- The below content is automatically added from ./docs/partials/description.md -->
24
24
`<auro-slideshow>` is an [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for the purpose of displaying a sequence of slides, which can automatically advance through the content or be manually controlled by the user.
25
25
26
-
The `<auro-slideshow>`component is a wrapper element. All slides are slotted content and must be direct children of the component. Slides must have assigned `width` and `height` properties to display properly.
26
+
The `<auro-slideshow>`element is a wrapper element. All slides are slotted content and must be direct children of the element. Slides must have assigned `width` and `height` properties to display properly.
27
27
28
-
`<auro-slideshow>` is a fully customizable component and does not come with any features turned on by default. The features of `<auro-slideshow>` are turned on by including the proper attributes on the element.
28
+
`<auro-slideshow>` is a fully customizable element and does not come with any features turned on by default. The features of `<auro-slideshow>` are turned on by including the proper attributes on the element.
29
29
30
-
**Note:** If all the slides can fit on the page at once, the slideshow will not activate.
30
+
**Note:** If all the slides can fit on the screen at once, the slideshow will not activate.
[](https://www.npmjs.com/package/@aurodesignsystem/auro-slideshow)
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
@@ -120,20 +93,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
In order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.
124
+
There are two key parts to every Auro component: the <ahref="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
125
+
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
166
126
167
-
Please be sure to review the [contribution guidelines](https://auro.alaskaair.com/contributing) for this project. Please make sure to **pay special attention** to the **conventional commits** section of the document.
127
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
168
128
169
-
<!-- AURO-GENERATED-CONTENT:END -->
170
-
171
-
### Start development environment
129
+
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.
131
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
This will create a new custom element `<custom-slideshow>` that behaves exactly like `<auro-slideshow>`, allowing both to coexist on the same page without interfering with each other.
Automated tests are required for every Auro component. See `.\test\auro-slideshow.test.js` for the tests for this component. Run `npm run test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
0 commit comments