AlaskaAirlines / auro-hyperlink

Custom hyperlink element to connect webpages or data items to one another
https://auro.alaskaair.com/components/auro/hyperlink
Apache License 2.0
2 stars 3 forks source link

ariaPressed name changed to prevent conflict with html attribute #235 #238

Open rmenner opened 1 week ago

rmenner commented 1 week ago

Alaska Airlines Pull Request

Type of change:

Please delete options that are not relevant.

Checklist:

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!
-- Auro Design System Team

Summary by Sourcery

Rename 'ariaPressed' to 'ariapressed' to prevent conflict with the HTML attribute and enhance demo HTML files by removing duplicate stylesheet links and deferring module script loading.

Bug Fixes:

Enhancements:

sourcery-ai[bot] commented 1 week ago

Reviewer's Guide by Sourcery

This PR renames the ariaPressed property to ariapressed to prevent conflicts with HTML attributes, removes duplicate CSS imports, and improves script loading in demo files. The changes also include cleanup of initialization scripts by moving them directly into the JS files.

Class diagram for ComponentBase and AuroHyperlink changes

classDiagram
    class ComponentBase {
        - ariapressed: String
        - tabIsActive: String
        - runtimeUtils: AuroLibraryRuntimeUtils
    }
    class AuroHyperlink {
        - ariapressed: String
        + ariaPressedState(ariapressed): String
    }
    ComponentBase <|-- AuroHyperlink
    note for ComponentBase "ariapressed property renamed from ariaPressed"

Class diagram for initHyperlink functions

classDiagram
    class Api {
        + initHyperlinkApiExamples(initCount)
    }
    class Index {
        + initHyperlinkIndexExamples(initCount)
    }
    note for Api "initHyperlinkApiExamples moved to JS file"
    note for Index "initHyperlinkIndexExamples moved to JS file"

File-Level Changes

Change Details Files
Renamed ariaPressed property to prevent HTML attribute conflicts
  • Renamed property from 'ariaPressed' to 'ariapressed' in component base class
  • Updated template reference to use new property name
src/component-base.mjs
src/auro-hyperlink.js
Improved demo page structure and script loading
  • Removed duplicate design-tokens CSS import
  • Added 'defer' attribute to module script tags
  • Moved initialization scripts from HTML to JS files
  • Removed inline initialization scripts
demo/api.html
demo/index.html
demo/api.js
demo/index.js

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).