Skip to content

Conversation

@StephenRiosDev
Copy link
Contributor

@StephenRiosDev StephenRiosDev commented Dec 16, 2025

Alaska Airlines Pull Request

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

PR Reviewer Checklist:

Documentation Accuracy

  • Do all explanations in the API table convey the feature they are referencing in an understandable way?
    • Are all String properties displaying all of their "options"?
  • Are all necessary API features documented? Are there any missing that you believe should be added?
  • Does the component description and use case section convey what the component is all about? Is there too much or too little information?
  • Ensure only NECESSARY examples are on the index page (i.e. only the most "basic" example(s) of component)
  • Are the API examples more or less appearance in the same order as they are in on the API table?
  • Ensure custom registration example is now on install page and renders as expected
  • Do all functional JS examples still work?

Code Changes

  • Ensure all example files are rename from camel case to kebab case (ex. myExample.html -> my-example.html)
  • Ensure no backticks appear in example header names
  • Is there a perf commit to trigger a release, as expected?

Visual Checks

  • Ensure all See Code accordions actually render the code blocks under their respective examples
  • Do all examples with multiple components in them have sufficient spacing?

Summary by Sourcery

Modernize auro-dialog documentation, clarify API usage, and align the component implementation and tooling with the updated docs.

New Features:

  • Add explicit lg size attribute/property support to auro-dialog for decoupled desktop and mobile sizing.
  • Expose a documented register(name) method on auro-dialog for custom element registration and version management.

Enhancements:

  • Refine component JSDoc and type annotations for attributes, properties, events, and CSS parts, including stricter typing for closeButtonAppearance.
  • Update toggle event dispatch to use the standard Event constructor with bubbling enabled.
  • Reorganize demo initialization to focus on the primary examples that match the updated documentation.
  • Add support for emitting a custom-elements manifest via the cem npm script and customElements package.json field.
  • Refresh devDependencies (auro button, icon, design tokens, webcorestylesheets, and auro-cli) to newer versions.

Documentation:

  • Rewrite and restructure README, index, and API docs to emphasize core use cases, installation paths (including CDN), basic examples, and clearer descriptions of properties, attributes, slots, and CSS shadow parts.
  • Document custom registration patterns for loading multiple dialog versions on a page and align examples with the new register API.
  • Expand and reorganize API examples to cover size behaviors, modal usage, slots (e.g., aria-label), CSS parts, accessibility, and styling via CSS variables, while trimming redundant or outdated content.

Summary by Sourcery

Modernize the auro-dialog component documentation and supporting tooling while clarifying size, modal, and registration behavior.

Enhancements:

  • Extend auro-dialog with an explicit lg size attribute and refine property metadata, event dispatch, and TypeScript typings.
  • Reorganize API/demo examples and initialization order to better align with primary use cases and functional patterns.
  • Update CDN usage in demos to modern ESM endpoints and refresh supporting dependency versions.

Build:

  • Expose a custom-elements manifest via new scripts and package.json exports, and advertise type definitions in the module export map.

Documentation:

  • Restructure README, index, and API docs to emphasize core use cases, installation paths (including CDN), and basic examples.
  • Clarify and expand API documentation for properties, attributes, slots, CSS shadow parts, and accessibility guidance, including lg size semantics.
  • Document custom component registration for version management with concrete examples and code snippets.

Chores:

  • Remove obsolete README notices and internal docs sections that no longer apply to the standalone auro-dialog component.

@StephenRiosDev StephenRiosDev requested a review from a team as a code owner December 16, 2025 23:47
@StephenRiosDev StephenRiosDev linked an issue Dec 16, 2025 that may be closed by this pull request
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 16, 2025

Reviewer's Guide

Modernizes auro-dialog’s documentation and demos, formalizes the public API (including a new lg size and register(name) method), improves typing and event dispatch in the component, and updates tooling/package metadata including custom-elements manifest support.

Sequence diagram for bubbling toggle event from auro-dialog

sequenceDiagram
  actor User
  participant AppScript
  participant Dialog as auro-dialog

  User->>AppScript: Click close UI (e.g. button in footer)
  AppScript->>Dialog: Set open = false / remove open attribute
  Dialog->>Dialog: dispatchToggleEvent()
  Dialog-->>AppScript: toggle event (bubbles=true, cancelable=false)
  AppScript->>AppScript: Handle toggle listener on ancestor element
Loading

Class diagram for updated auro-dialog component API

classDiagram
  direction LR

  class ComponentBase {
    +boolean modal
    +boolean unformatted
    +"default"|"inverse" closeButtonAppearance
    +boolean lg
    +boolean md
    +boolean onDark
    +boolean open
    +boolean sm
    +HTMLElement triggerElement
    +dispatchToggleEvent()
  }

  class AuroDialog {
    +static register(name)
    +open
  }

  AuroDialog --|> ComponentBase
Loading

State diagram for auro-dialog open and modal behavior

stateDiagram-v2
  [*] --> Closed

  Closed --> OpenNonModal: set open=true
  Closed --> OpenModal: set open=true and modal=true

  OpenNonModal --> Closed: user clicks overlay or close button
  OpenNonModal --> Closed: script sets open=false

  OpenModal --> Closed: footer action closes dialog
  OpenModal --> Closed: script sets open=false
Loading

File-Level Changes

Change Details Files
Restructure and modernize top-level README and index docs to emphasize use cases, installation options (including CDN), and a single basic example on the index page.
  • Replaced legacy notice and browser support snippets with a focused Use Cases section sourced from partials
  • Updated Install section badges and copy, added CDN usage snippet, and clarified dependency definition wording
  • Moved development/testing instructions out of README and simplified index.md to keep only minimal description, structure, and a basic example wired to the apiExamples/basic.html and basic.js files
  • Documented custom component registration and demonstrated use of the new register(name) API with a custom-dialog example
README.md
docs/partials/index.md
docs/partials/customRegistration.md
Reorganize and expand API documentation with clearer grouping, better examples, and new sections for properties, slots, CSS parts, and styling.
  • Simplified section headings and removed redundant 'API Examples' wrapper in favor of Basic and Property & Attribute Examples sections
  • Clarified size behavior (sm, md, lg, including mixed desktop/mobile behavior) and reworked examples to use new size-options and decoupled examples
  • Reorganized modal, unformatted, accessibility, and popover/dropdown content into clearer subsections, with new Slot and CSS Shadow Part example sections
  • Added a Restyle Component with CSS Variables section tying to the SCSS token file, and renamed/moved several example HTMLs (e.g., aria-label, close-button, popover-and-dropdown) to kebab case to match docs
docs/partials/api.md
docs/api.md
apiExamples/close-button.html
apiExamples/aria-label.html
apiExamples/popover-and-dropdown.html
Tighten and extend the component’s runtime API surface, including new lg size support, improved typing, and modern event dispatch.
  • Added lg, sm, md, modal, onDark, open, triggerElement, and unformatted to ComponentBase.properties with explicit JSDoc descriptions and proper type metadata, including a typed closeButtonAppearance union
  • Initialized closeButtonAppearance in the constructor with a strict 'default'
'inverse' type and documented triggerElement as an HTMLElement-only property
  • Replaced legacy document.createEvent/initEvent usage with the standard Event constructor for the toggle event and enabled bubbling
  • Adjusted AuroDialog to reuse the base open property config via Object.assign with noAccessor: true and improved its class-level JSDoc/description
  • Align demos with the updated docs and modern module loading while prioritizing the most relevant examples.
    • Updated CDN demo imports to use +esm endpoints and consolidated menu/combobox imports through @aurodesignsystem/auro-formkit
    • Reordered demo initialization to load the most fundamental examples first and align ordering with the new API docs sections
    • Tweaked the close-button example styling to focus solely on position via ::part without color overrides
    demo/api.html
    demo/index.html
    demo/api.js
    apiExamples/close-button.html
    Refresh tooling and package metadata, including devDependency bumps and support for generating a custom-elements manifest.
    • Bumped auro-button, auro-icon, design-tokens, webcorestylesheets, and auro-cli devDependency versions and synced internal version files for button and icon
    • Augmented scripts with a cem command for generating the custom-elements manifest and added an entry for ./custom-elements.json
    • Changed the package exports map to include module and types entries, exposed custom-elements.json, and added the package-level customElements field referencing the manifest
    package.json
    package-lock.json
    src/buttonVersion.js
    src/iconVersion.js

    Assessment against linked issues

    Issue Objective Addressed Explanation
    #96 Modernize and update all auro-dialog documentation (README, index, API docs, examples, and related partials/demos) to align with the new TRD.

    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. You can also reply to a
      review comment with @sourcery-ai issue to create an issue from it.
    • Generate a pull request title: Write @sourcery-ai anywhere in the pull
      request title to generate a title at any time. You can also comment
      @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
      want it. You can also comment @sourcery-ai summary on the pull request to
      (re-)generate the summary at any time.
    • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
      request to (re-)generate the reviewer's guide at any time.
    • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
      pull request to resolve all Sourcery comments. Useful if you've already
      addressed all the comments and don't want to see them anymore.
    • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
      request to dismiss all existing Sourcery reviews. Especially useful if you
      want to start fresh with a new review - don't forget to comment
      @sourcery-ai review to trigger a new review!

    Customizing Your Experience

    Access your dashboard 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

    Copy link
    Contributor

    @sourcery-ai sourcery-ai bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Hey there - I've reviewed your changes - here's some feedback:

    • In AuroDialog.properties, using Object.assign(ComponentBase.properties.open, { noAccessor: true }) mutates the shared descriptor on ComponentBase; consider cloning instead (e.g. { ...ComponentBase.properties.open, noAccessor: true }) to avoid side effects on other consumers of ComponentBase.properties.open.
    • The @aurodesignsystem/auro-cli devDependency now points to a local tarball (file:../../../aurodesignsystem-auro-cli-0.0.0.tgz); if this is not intentional for long-term use, you may want to revert to a published version to keep installs working outside your local environment.
    Prompt for AI Agents
    Please address the comments from this code review:
    
    ## Overall Comments
    - In `AuroDialog.properties`, using `Object.assign(ComponentBase.properties.open, { noAccessor: true })` mutates the shared descriptor on `ComponentBase`; consider cloning instead (e.g. `{ ...ComponentBase.properties.open, noAccessor: true }`) to avoid side effects on other consumers of `ComponentBase.properties.open`.
    - The `@aurodesignsystem/auro-cli` devDependency now points to a local tarball (`file:../../../aurodesignsystem-auro-cli-0.0.0.tgz`); if this is not intentional for long-term use, you may want to revert to a published version to keep installs working outside your local environment.
    
    ## Individual Comments
    
    ### Comment 1
    <location> `docs/api.md:3` </location>
    <code_context>
    -| `dialog-footer`  | apply CSS to the footer of the dialog            |
    -| `dialog-header`  | apply CSS to the header of the dialog            |
    -| `dialog-overlay` | apply CSS on the overlay of the dialog           |
    +The auro-dialog appears above the page and presents information that requires the users immediate attention.
    +
    +### Properties & Attributes
    </code_context>
    
    <issue_to_address>
    **issue (typo):** Use the possessive form "user's" in this sentence.
    
    Change this phrase to `requires the user's immediate attention` to use the correct possessive form.
    
    ```suggestion
    The auro-dialog appears above the page and presents information that requires the user's immediate attention.
    ```
    </issue_to_address>
    
    ### Comment 2
    <location> `docs/partials/api.md:87` </location>
    <code_context>
    
     For use case where the use of a dialog is to be more freeform, but the experience and base tooling for the dialog are still requested, there is the `unformatted` property.
    
     This property can be used in combination of any other use case of the dialog, but it will render a unformatted dialog window allowing for full customization of content within the scope of the window.
    
    -### Responsive padding
    </code_context>
    
    <issue_to_address>
    **suggestion (typo):** Improve grammar in this sentence ("combination with" and "an unformatted").
    
    Suggested revision: `This property can be used in combination with any other use case of the dialog, but it will render an unformatted dialog window, allowing for full customization of content within the scope of the window.`
    
    ```suggestion
    This property can be used in combination with any other use case of the dialog, but it will render an unformatted dialog window, allowing for full customization of content within the scope of the window.
    ```
    </issue_to_address>

    Sourcery is free for open source - if you like our reviews please consider sharing them ✨
    Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

    @StephenRiosDev StephenRiosDev force-pushed the srios/docs/modernize-documentation/#96 branch from 69eb3d5 to 6f19ea0 Compare December 16, 2025 23:55
    @github-actions
    Copy link

    github-actions bot commented Dec 16, 2025

    🚀 PR Release Published! v0.0.0-pr97.6

    To install:

    npm install @aurodesignsystem-dev/[email protected]

    Install via alias:

    npm install @aurodesignsystem/auro-dialog@npm:@aurodesignsystem-dev/[email protected]

    View on npmjs.com

    @github-actions
    Copy link

    Component Demo Links

    dialog: https://auro-dialog-97.surge.sh

    @jordanjones243 jordanjones243 force-pushed the srios/docs/modernize-documentation/#96 branch from 6f19ea0 to 0c2a8e9 Compare December 18, 2025 18:18
    @jordanjones243 jordanjones243 changed the title docs: modernize documentation #96 Modernize docs Dec 22, 2025
    @jordanjones243 jordanjones243 force-pushed the srios/docs/modernize-documentation/#96 branch from 0c2a8e9 to 5591f50 Compare December 22, 2025 18:32
    @jordanjones243 jordanjones243 force-pushed the srios/docs/modernize-documentation/#96 branch from 5591f50 to ae890f6 Compare December 22, 2025 19:15
    @jordanjones243 jordanjones243 marked this pull request as draft December 26, 2025 17:03
    @jordanjones243 jordanjones243 self-assigned this Dec 26, 2025
    @jordanjones243 jordanjones243 force-pushed the srios/docs/modernize-documentation/#96 branch from ae890f6 to 9fa51b3 Compare December 29, 2025 21:20
    @jordanjones243 jordanjones243 marked this pull request as ready for review December 29, 2025 21:20
    Copy link
    Contributor

    @sourcery-ai sourcery-ai bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Hey - I've found 2 issues, and left some high level feedback:

    • In package.json, the entry "./custom-elements.json": "./custom-elements.json" under "scripts" looks accidental/misplaced (you already expose this via exports and customElements) and should likely be removed or renamed to a valid script name.
    • In docs/api.md, the attribute name for the onDark/on-dark flag appears inconsistent with the implementation (the reflected attribute will be on-dark, not onDark), so the API table should be updated to use the correct kebab-case attribute name.
    Prompt for AI Agents
    Please address the comments from this code review:
    
    ## Overall Comments
    - In package.json, the entry "./custom-elements.json": "./custom-elements.json" under "scripts" looks accidental/misplaced (you already expose this via exports and customElements) and should likely be removed or renamed to a valid script name.
    - In docs/api.md, the attribute name for the onDark/on-dark flag appears inconsistent with the implementation (the reflected attribute will be `on-dark`, not `onDark`), so the API table should be updated to use the correct kebab-case attribute name.
    
    ## Individual Comments
    
    ### Comment 1
    <location> `package.json:56` </location>
    <code_context>
       "scripts": {
         "build": "auro build",
         "build:version": "node ./scripts/version.mjs",
    +    "./custom-elements.json": "./custom-elements.json",
         "dev": "auro dev -w -s",
         "dev:open": "auro dev -w -s --open",
    </code_context>
    
    <issue_to_address>
    **issue (bug_risk):** The new scripts entry for `./custom-elements.json` looks malformed for an npm script.
    
    `scripts` keys should be script names mapped to commands (e.g. `
    </issue_to_address>
    
    ### Comment 2
    <location> `src/auro-dialog.js:19` </location>
    <code_context>
    -        ...ComponentBase.properties.open,
    -        noAccessor: true,
    -      },
    +      open: Object.assign(ComponentBase.properties.open, { noAccessor: true }),
         };
       }
    </code_context>
    
    <issue_to_address>
    **issue (bug_risk):** Using `Object.assign` here mutates the base `ComponentBase.properties.open` descriptor, which may have unintended side effects.
    
    Since `Object.assign` mutates its first argument, this line permanently adds `noAccessor: true` to `ComponentBase.properties.open` for all subclasses. That globally changes the base behavior. Instead, keep the base descriptor immutable by creating a shallow copy, e.g. `open: { ...ComponentBase.properties.open, noAccessor: true }`.
    </issue_to_address>

    Sourcery is free for open source - if you like our reviews please consider sharing them ✨
    Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

    @jordanjones243 jordanjones243 force-pushed the srios/docs/modernize-documentation/#96 branch from 9fa51b3 to 9b58ad8 Compare December 30, 2025 17:28
    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
    properties now listed alphabetically
    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
    @jordanjones243 jordanjones243 force-pushed the srios/docs/modernize-documentation/#96 branch from 9b58ad8 to 035521f Compare December 30, 2025 18:32
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    dialog - modernize documentation

    4 participants