Skip to content

Conversation

@jordanjones243
Copy link
Contributor

@jordanjones243 jordanjones243 commented Nov 19, 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.

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?

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

Modernize and expand auro-accordion documentation and examples while updating supporting dependencies.

New Features:

  • Introduce documented support and examples for custom registration of auro-accordion and auro-accordion-group under alternate element names.
  • Add new documented examples for toggle(), alignment, chevron placement, size variants, disabled state, expanded control, and group behaviors such as noToggleExpanded and emphasis.

Bug Fixes:

  • Correct example wiring in demos by fixing element IDs and initializers so expanded/toggle examples work reliably.

Enhancements:

  • Refresh API and demo examples to use consistent IDs, filenames, and naming conventions and to separate basic/index examples from detailed API docs.
  • Improve JSDoc annotations with @CustomElement tags, typed variant/chevron options, and clarified descriptions for emphasis and group behavior.

Build:

  • Update design system devDependencies and icon version to the latest compatible releases.

Documentation:

  • Revise README and index docs to simplify structure, add use cases, and describe custom component registration for multiple versions.
  • Reorganize and enrich API documentation for auro-accordion and auro-accordion-group with clearer property, method, event, and slot tables plus new usage sections.

Copy link

@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.

Sorry @jordanjones243, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@jordanjones243 jordanjones243 linked an issue Nov 19, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Nov 19, 2025

🚀 PR Release Published! v0.0.0-pr214.9

To install:

npm install @aurodesignsystem-dev/[email protected]

Install via alias:

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

View on npmjs.com

@jordanjones243 jordanjones243 force-pushed the jjones/modernizeDocs/#210 branch 2 times, most recently from f0c335d to ffa89bb Compare December 5, 2025 18:44
@jordanjones243 jordanjones243 changed the title Jjones/modernize docs/#210 Modernize Documentation Dec 5, 2025
@jordanjones243 jordanjones243 marked this pull request as ready for review December 5, 2025 18:47
@jordanjones243 jordanjones243 requested a review from a team as a code owner December 5, 2025 18:47
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 5, 2025

Reviewer's Guide

Modernizes the auro-accordion documentation and examples, clarifies the public API for both auro-accordion and auro-accordion-group, and adds guidance and examples for custom element registration and programmatic usage, while also updating supporting dependencies and JSDoc types.

Sequence diagram for programmatic toggle() usage example

sequenceDiagram
  actor Developer
  participant Browser
  participant ScriptToggleExample
  participant AccordionToggleExampleBtn
  participant AccordionToggleExample as AuroAccordion

  Developer->>Browser: Load documentation page
  Browser->>ScriptToggleExample: Execute toggleExample()
  ScriptToggleExample->>Browser: querySelector(#accordionToggleExample)
  ScriptToggleExample->>Browser: querySelector(#accordionToggleExampleBtn)
  ScriptToggleExample->>AccordionToggleExampleBtn: addEventListener("click", handler)

  Developer->>AccordionToggleExampleBtn: Click "Toggle Accordion" button
  AccordionToggleExampleBtn->>AccordionToggleExample: handler calls toggle()
  AccordionToggleExample->>AccordionToggleExample: toggle() switches expanded
  AccordionToggleExample-->>Developer: Content expands or collapses
Loading

Class diagram for updated auro-accordion and auro-accordion-group APIs

classDiagram
  class AuroAccordion {
    <<customElement>>
    %% Properties
    boolean alignRight
    "none | right" chevron
    boolean disabled
    boolean emphasis
    boolean expanded
    boolean grouped
    "sm | lg" variant

    %% Methods
    +void toggle()
    +static void register(name)
  }

  class AuroAccordionGroup {
    <<customElement>>
    %% Properties
    boolean disabled
    boolean emphasis
    "sm | lg" variant
    boolean noToggleExpanded

    %% Methods
    +static void register(name)
    -void updateDisabledState()
  }

  AuroAccordionGroup "1" o-- "*" AuroAccordion : groups
Loading

File-Level Changes

Change Details Files
Restructure README and index docs to focus on modern usage, use cases, and basic examples while removing legacy migration and development sections.
  • Remove legacy v1-to-v3 migration guidance and CDN snippet from the README and docs partials.
  • Introduce a dedicated Use Cases section and ensure it is sourced from docs/partials/useCases.md in both README and index docs.
  • Retitle and streamline sections such as Install, Define Dependency in Project, Use CDN, and Basic Example for clearer onboarding.
  • Simplify the index page to a minimal description plus basic examples for single accordion and accordion group in line with documentation guidelines.
README.md
docs/partials/index.md
docs/partials/readmeAddlInfo.md
Expand API documentation with property, attribute, method, event, and slot examples for both auro-accordion and auro-accordion-group, including new examples for variants and behaviors.
  • Replace the older, less-structured examples section in docs/partials/api.md with organized sections for properties/attributes, methods, and common patterns for auro-accordion and auro-accordion-group.
  • Add new example categories such as alignRight trigger, chevron right, disabled, expanded, size variants (sm, lg), and toggle method usage, and wire them to new HTML/JS example files.
  • Clarify and slightly reword descriptions for how attributes like emphasis, noToggleExpanded, and variants affect behavior and appearance.
docs/partials/api.md
docs/api.md
apiExamples/variant-lg.html
apiExamples/variant-sm.html
apiExamples/toggle.html
apiExamples/toggle.js
apiExamples/expanded.html
apiExamples/expanded.js
apiExamples/custom.html
demo/api.js
Document and demonstrate custom component registration and multi-version support using class-only imports.
  • Fill in docs/partials/customRegistration.md with concrete code using class-only imports and the register(name) helper for auro-accordion and auro-accordion-group.
  • Add a new "Custom Component Registration for Version Management" section to the README that explains the class vs. custom-element split and shows an interactive custom-accordion-group example wired to the customRegistration snippet and apiExamples/custom.html.
  • Update the standalone custom.html example to show a full custom-accordion-group containing multiple custom-accordion instances.
docs/partials/customRegistration.md
README.md
apiExamples/custom.html
Improve inline JSDoc and type metadata for the components to better support documentation generation and type safety.
  • Annotate auro-accordion and auro-accordion-group classes with @CustomElement tags instead of descriptive prose in the top-level JSDoc.
  • Refine JSDoc on properties such as variant and chevron to declare literal union types ('sm'
'lg', 'none'
Update supporting dependencies and icon version to align with newer Auro ecosystem packages.
  • Bump devDependency versions for @alaskaairux/icons, @aurodesignsystem/auro-button, @aurodesignsystem/auro-cli, @aurodesignsystem/auro-icon, @aurodesignsystem/design-tokens, and @aurodesignsystem/webcorestylesheets.
  • Update the iconVersion module to reference the new @auro-icon version string.
  • Regenerate package-lock.json to reflect the updated dependency tree.
package.json
src/iconVersion.js
package-lock.json

Assessment against linked issues

Issue Objective Addressed Explanation
#210 Modernize the accordion component’s user-facing documentation (README, index, use cases, examples) to align with the latest TRD, removing outdated transition guidance and reflecting current usage patterns.
#210 Update the API and developer-facing documentation (API tables, method descriptions, examples) for auro-accordion and auro-accordion-group to match the current component behavior and TRD specifications.
#210 Improve and align in-code documentation (JSDoc, comments) and supporting example files to match the modernized documentation and TRD (including custom registration usage and new examples like toggle/variants).

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

@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 docs/api.md, the auro-accordion-group Methods section defines the table header but has no rows, which renders as an empty/odd-looking table; either populate it with methods or drop the section entirely if there are no group-specific methods to document.
  • In docs/partials/api.md you switched some "See code" accordions from AURO-GENERATED-CONTENT:START (CODE:...) to (FILE:...) (e.g., the basic example), which will render the live HTML instead of a code snippet; double-check that these should be code samples and, if so, revert them to CODE for consistent behavior with the other examples.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `docs/api.md`, the `auro-accordion-group` Methods section defines the table header but has no rows, which renders as an empty/odd-looking table; either populate it with methods or drop the section entirely if there are no group-specific methods to document.
- In `docs/partials/api.md` you switched some "See code" accordions from `AURO-GENERATED-CONTENT:START (CODE:...)` to `(FILE:...)` (e.g., the basic example), which will render the live HTML instead of a code snippet; double-check that these should be code samples and, if so, revert them to `CODE` for consistent behavior with the other examples.

## Individual Comments

### Comment 1
<location> `README.md:37` </location>
<code_context>
+The `<auro-accordion>` element should be used in situations where users may:

+- Hide/show long sub-content based on headline trigger
+- Use is for in-page content only when excessive content length is distracting to the specific experience
 <!-- AURO-GENERATED-CONTENT:END -->

</code_context>

<issue_to_address>
**suggestion (typo):** Clarify wording in this use-case bullet for better grammar.

Suggested rephrasing to fix the grammar, e.g.: `Use it for in-page content only when excessive content length is distracting to the specific experience` or `Use for in-page content only when excessive content length is distracting...`.
</issue_to_address>

### Comment 2
<location> `docs/partials/api.md:93` </location>
<code_context>
+### Expanded

-Using the `alignRight` attribute will cause the trigger to align to the right edge of the accordion.
+The accordion can be programatically expanded or collapsed by setting the `expanded` attribute to `true` or `false`.

 <div class="exampleWrapper">
</code_context>

<issue_to_address>
**issue (typo):** Fix the spelling of “programmatically”.

```suggestion
The accordion can be programmatically expanded or collapsed by setting the `expanded` attribute to `true` or `false`.
```
</issue_to_address>

### Comment 3
<location> `docs/partials/api.md:224` </location>
<code_context>
+### No Toggle Expanded

-Use the `emphasis` attribute to apply border highlights to the `auro-accordion` on hover and move the chevron to the right side of the trigger.
+Using the `noToggleExpanded` attribute will allow for multiple accordions in an group to be open at the same time.
+
+<div class="exampleWrapper">
</code_context>

<issue_to_address>
**issue (typo):** Fix article usage in “in an group”.

Replace `in an group` with `in a group` for correct grammar.

```suggestion
Using the `noToggleExpanded` attribute will allow for multiple accordions in a group to be open at the same time.
```
</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 self-assigned this Dec 5, 2025
@jordanjones243 jordanjones243 force-pushed the jjones/modernizeDocs/#210 branch from ffa89bb to 58381bf Compare December 5, 2025 18:56
@jordanjones243 jordanjones243 force-pushed the jjones/modernizeDocs/#210 branch 2 times, most recently from 065e999 to ba06f69 Compare December 9, 2025 17:20
@jordanjones243 jordanjones243 force-pushed the jjones/modernizeDocs/#210 branch from e53db5a to c599caf Compare December 18, 2025 18:31
@jason-capsule42 jason-capsule42 force-pushed the jjones/modernizeDocs/#210 branch from c599caf to 794942e Compare December 18, 2025 23:37
documentation layout improved
component description improved
custom registration documentation improved
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
@jason-capsule42 jason-capsule42 force-pushed the jjones/modernizeDocs/#210 branch from 794942e to f717ad8 Compare December 18, 2025 23:45
Now only exports AuroAccordion and AuroAccordionGroup classes. AuroAccordionButton was removed since it was only for internal component use.
@jason-capsule42 jason-capsule42 force-pushed the jjones/modernizeDocs/#210 branch from f717ad8 to 127a552 Compare December 18, 2025 23:47
@rmenner rmenner merged commit a15a01a into dev Jan 3, 2026
28 of 30 checks passed
@rmenner rmenner deleted the jjones/modernizeDocs/#210 branch January 3, 2026 00:05
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.

accordion - modernize documentation

4 participants