Skip to content

Conversation

@jordanjones243
Copy link
Contributor

@jordanjones243 jordanjones243 commented Dec 23, 2025

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

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?
RC Checklist

Testing Checklist:

Browsers

Browsers Support Guide

Dev demo link

Android

  • Chrome
  • Firefox

iOS

  • Chrome
  • Firefox
  • Safari

Desktop

  • Chrome
  • Firefox
  • Safari
  • Edge

Scenarios

  • Validated linked issues with issue reporting team
  • Test coverage report review

Framework playground

  • Next React
  • SvelteKit

**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 the auro-backtotop component documentation and package configuration to align with the latest Auro standards and APIs.

New Features:

  • Document and demonstrate custom element registration via a new custom-backtotop example and dedicated custom registration section.
  • Expose type definitions in the package export map for consumers via updated module exports.

Enhancements:

  • Reorganize and streamline README and docs pages, clarifying use cases, basic examples, and moving advanced examples into API docs.
  • Update API reference tables with richer type information, defaults, and improved property descriptions for the auro-backtotop element.
  • Refine JSDoc for the component with explicit @CustomElement tagging and clearer property metadata.
  • Rename and normalize example file references to kebab-case for consistency across docs and demos.

Build:

  • Upgrade @aurodesignsystem/auro-cli dev dependency and adjust package.json exports to support modern tooling workflows.

Documentation:

  • Clarify component description by simplifying scroll behavior explanation and improving terminology for installation and dependency definition.
  • Add focused examples for properties, attributes, and slots (including aria-label) in the API docs and restructure index content to keep only essential examples.

@jordanjones243 jordanjones243 requested a review from a team as a code owner December 23, 2025 03:01
@jordanjones243 jordanjones243 self-assigned this Dec 23, 2025
@jordanjones243 jordanjones243 linked an issue Dec 23, 2025 that may be closed by this pull request
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 23, 2025

Reviewer's Guide

Modernizes auro-backtotop documentation, examples, and package configuration to align with current Auro docs layout, custom registration guidance, and auro-cli tooling, while tightening API typing and metadata.

Class diagram for updated AuroBackToTop component API

classDiagram
  class LitElement

  class AuroBackToTop {
    <<customElement>>
    +boolean disabled
    +boolean hidden
    +boolean interactionActive
    +boolean lastScrollDirectionUp
    +"primary | secondary" variant
    +constructor()
    +_initializeDefaults()
    +handleScroll(event)
    +handleClick(event)
    +static register(name)
  }

  LitElement <|-- AuroBackToTop
Loading

File-Level Changes

Change Details Files
Restructure and simplify end-user documentation to follow the new minimal index layout and move advanced examples and guidance to dedicated sections.
  • Trim and update README description and use cases, remove inline browser support section, and point badges to the release workflow
  • Clarify install/import guidance, remove redundant inline HTML examples from Install, and reorganize basic usage under a dedicated Basic Example section
  • Introduce a dedicated Custom Component Registration section that explains class vs custom element, shows AuroBackToTop.register('custom-backtotop'), and renders a live custom element demo with See code accordion
README.md
docs/partials/description.md
docs/partials/customRegistration.md
Modernize docs site layout by keeping index minimal and concentrating examples in API docs with kebab-case example filenames.
  • Rewrite docs index partial with guidance comments, use a single basic example and See code accordion, and add a page content demo section wired to renamed kebab-case examples
  • Rework API partial to flatten headings (Basic, Property & Attribute Examples, Slot Examples), tighten wording, and map to renamed example files
  • Rename example references from camelCase to kebab-case (e.g., basicButtonOnly to basic_button-only, pageContent to page-content, ariaLabel to aria-label, secondary variant examples to variant), ensuring See code accordions point to the correct files
docs/partials/index.md
docs/partials/api.md
Improve component metadata, defaults, and property typing for better tooling and generated API docs.
  • Add @customElement auro-backtotop JSDoc tag and inline-code formatting to the main class description
  • Rename initializeProperties to a private _initializeDefaults helper used from the constructor, and ensure default values like disabled = false are set there
  • Tighten property options by documenting variant as a union type `'primary'
'secondary'with a documented default, and annotatedisableddefault; simplify other booleans (hidden, interactionActive, lastScrollDirectionUp) by removing unnecessaryreflect: true`
Update build and packaging configuration to use the latest auro-cli and expose richer module/type exports.
  • Bump @aurodesignsystem/auro-cli devDependency to ^3.5.0 and keep @aurodesignsystem/auro-config aligned
  • Expand the package.json export map root entry "." to an object that exposes module, types, and default entries pointing at dist artifacts
  • Regenerate package-lock to capture updated dependency graph
package.json
package-lock.json
Add and rewire examples for custom registration and page content, while cleaning up obsolete WCA artifacts.
  • Add a new apiExamples/custom.html that renders <custom-backtotop> used by README custom registration example and docs partials
  • Ensure all references to page content and button-only examples use the new kebab-case filenames and are wrapped in exampleWrapper plus See code accordions where appropriate
  • Remove the legacy web component analyzer script file now superseded by custom-elements.json and updated docs tooling
apiExamples/custom.html
docs/partials/index.md
docs/partials/api.md
scripts/wca/auro-backtotop.js

Assessment against linked issues

Issue Objective Addressed Explanation
#78 Update the auro-backtotop component documentation (README and docs site content, including use cases and examples) to align with the latest TRD and documentation layout conventions.
#78 Modernize and clarify guidance on custom component registration/version management in the documentation according to the TRD.
#78 Update documentation build and related configuration (e.g., auro-cli usage and package export metadata) to match the current Auro documentation/tooling standards.

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 - I've found 3 issues, and left some high level feedback:

  • The updated description in docs/partials/description.md no longer explains that slotted text is shown when scrolling up; consider restoring that behavior detail so consumers understand when text vs icon appear.
  • Now that hidden, interactionActive, and lastScrollDirectionUp no longer reflect to attributes, consider marking them as internal (e.g., via @private JSDoc or attribute: false) so they don’t get treated as part of the public API surface.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The updated description in `docs/partials/description.md` no longer explains that slotted text is shown when scrolling up; consider restoring that behavior detail so consumers understand when text vs icon appear.
- Now that `hidden`, `interactionActive`, and `lastScrollDirectionUp` no longer reflect to attributes, consider marking them as internal (e.g., via `@private` JSDoc or `attribute: false`) so they don’t get treated as part of the public API surface.

## Individual Comments

### Comment 1
<location> `src/auro-backtotop.js:106-112` </location>
<code_context>
         type: Boolean,
         reflect: true,
       },
       hidden: {
-        type: Boolean,
-        reflect: true,
+        type: Boolean
       },
       interactionActive: {
-        type: Boolean,
+        type: Boolean
       },
       lastScrollDirectionUp: {
-        type: Boolean,
+        type: Boolean
</code_context>

<issue_to_address>
**issue (bug_risk):** Removing `reflect: true` from these internal state properties may break attribute-based styling or external control relying on attributes.

`hidden`, `interactionActive`, and `lastScrollDirectionUp` no longer reflect to attributes, so any CSS, integration code, or tooling that previously relied on those attributes will stop working without warning. If these flags are meant to remain observable/stylable from the outside, keep `reflect: true` on the relevant properties; otherwise, this change should be clearly treated as an intentional breaking change.
</issue_to_address>

### Comment 2
<location> `package.json:71-74` </location>
<code_context>
     "./custom-elements.json": "./custom-elements.json",
     "./readme.md": "./README.md",
-    ".": "./dist/registered.js",
+    ".": {
+      "module": "./dist/registered.js",
+      "types": "./dist/index.d.ts",
+      "default": "./dist/registered.js"
+    },
     "./demo/*.md": "./demo/*.md",
</code_context>

<issue_to_address>
**question (bug_risk):** Changing the root export from a string path to an object with `module`/`default` may impact consumers expecting the previous export shape.

This object form is more descriptive but may change how bundlers and CommonJS consumers resolve the entry, especially around the `default` key. Consider using standard condition keys like `import`/`require` and a top-level `types` field, or confirm that Node, bundlers, and our design system tooling all correctly handle this new export shape before merging.
</issue_to_address>

### Comment 3
<location> `docs/api.md:3` </location>
<code_context>
 # auro-backtotop

-The auro-backtotop element provides users a way to quickly return to page top.
+The `auro-backtotop` element provides users a way to quickly return to page top.

 ### Properties & Attributes
</code_context>

<issue_to_address>
**suggestion (typo):** Consider adjusting the phrasing to "return to the top of the page" for more natural grammar.

You could also expand the sentence to: "The `auro-backtotop` element provides users with a way to quickly return to the top of the page," which adds the missing article and reads more naturally.

```suggestion
The `auro-backtotop` element provides users with a way to quickly return to the top of the page.
```
</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.

@github-actions
Copy link

github-actions bot commented Dec 23, 2025

🚀 PR Release Published! v0.0.0-pr79.3

To install:

npm install @aurodesignsystem-dev/[email protected]

Install via alias:

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

View on npmjs.com

@github-actions
Copy link

Component Demo Links

backtotop: https://auro-backtotop-79.surge.sh

@jordanjones243 jordanjones243 marked this pull request as draft December 23, 2025 21:13
@jordanjones243 jordanjones243 force-pushed the jjones/modernizeDocs/#78 branch from 66a3907 to 070d299 Compare December 23, 2025 22:10
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
@jordanjones243 jordanjones243 force-pushed the jjones/modernizeDocs/#78 branch from 4238547 to f7a8005 Compare January 2, 2026 20:41
@jordanjones243 jordanjones243 marked this pull request as ready for review January 2, 2026 20:41
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 - I've found 3 issues, and left some high level feedback:

  • In AuroBackToTop.properties, hidden, interactionActive, and lastScrollDirectionUp are no longer reflect: true; if these were previously observable as attributes, consider whether this API change is intentional or if they should remain reflected for external styling/inspection.
  • The disabled property description (“Render the trigger inline, will always be visible.”) is a bit confusing for a disabled state; consider refining this text in both the JSDoc and API table to more accurately describe what disabled actually does in the component.
  • The use-cases partial now reads “The <auro-backtotop> element should be used in situations where users may:” followed by a single bullet; consider rephrasing or adjusting the list so the sentence and bullet formatting read more naturally.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `AuroBackToTop.properties`, `hidden`, `interactionActive`, and `lastScrollDirectionUp` are no longer `reflect: true`; if these were previously observable as attributes, consider whether this API change is intentional or if they should remain reflected for external styling/inspection.
- The `disabled` property description (“Render the trigger inline, will always be visible.”) is a bit confusing for a disabled state; consider refining this text in both the JSDoc and API table to more accurately describe what `disabled` actually does in the component.
- The use-cases partial now reads “The `<auro-backtotop>` element should be used in situations where users may:” followed by a single bullet; consider rephrasing or adjusting the list so the sentence and bullet formatting read more naturally.

## Individual Comments

### Comment 1
<location> `README.md:37-39` </location>
<code_context>
-For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
+<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
+<!-- The below content is automatically added from ./docs/partials/useCases.md -->
+The `<auro-backtotop>` element should be used in situations where users may:

+* Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.
 <!-- AURO-GENERATED-CONTENT:END -->

</code_context>

<issue_to_address>
**suggestion (typo):** Clarify the lead-in sentence and bullet so they form a grammatically complete construction.

The current lead-in + bullet combination (“The `<auro-backtotop>` element should be used in situations where users may:” + “Pages with large amounts of content…”) is grammatically awkward. Consider either:

- “The `<auro-backtotop>` element should be used in situations such as:”
  - “Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.”

or rephrasing the bullet to start with “On pages with large amounts of content…” so the full construction reads smoothly.

```suggestion
The `<auro-backtotop>` element should be used in situations such as:

* Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.
```
</issue_to_address>

### Comment 2
<location> `docs/api.md:9` </location>
<code_context>
-| variant    | variant    | string  | "primary" | The variant attribute allows for rendering the button using the primary (default) or secondary styles. |
+| Properties | Attributes | Modifiers | Type                     | Default   | Description                                                                                            |
+| ---------- | ---------- | --------- | ------------------------ | --------- | ------------------------------------------------------------------------------------------------------ |
+| disabled   | disabled   |           | boolean                  | `false`   | Render the trigger inline, will always be visible.                                                     |
+| variant    | variant    |           | `primary` \| `secondary` | `primary` | The variant attribute allows for rendering the button using the primary (default) or secondary styles. |

</code_context>

<issue_to_address>
**suggestion (typo):** Improve the grammar of the `disabled` property description.

The sentence “Render the trigger inline, will always be visible.” is ungrammatical. Please rephrase to something like “Renders the trigger inline so it is always visible.” for clearer documentation.

```suggestion
| disabled   | disabled   |           | boolean                  | `false`   | Renders the trigger inline so it is always visible.                                                    |
```
</issue_to_address>

### Comment 3
<location> `docs/partials/api.md:59` </location>
<code_context>
-</auro-accordion>
-
-#### ariaLabel
+### Aria Label

 The `ariaLabel` slot allows you to pass an aria-label to the HTML5 button. The default value is `"arrow-up"`.
</code_context>

<issue_to_address>
**nitpick (typo):** Use standard capitalization for the ARIA acronym in the heading.

Consider updating the heading to “### ARIA Label” to match standard accessibility terminology. The rest of the description can stay the same.

```suggestion
### ARIA Label
```
</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.

Comment on lines +37 to +39
The `<auro-backtotop>` element should be used in situations where users may:

* Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.
Copy link

Choose a reason for hiding this comment

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

suggestion (typo): Clarify the lead-in sentence and bullet so they form a grammatically complete construction.

The current lead-in + bullet combination (“The <auro-backtotop> element should be used in situations where users may:” + “Pages with large amounts of content…”) is grammatically awkward. Consider either:

  • “The <auro-backtotop> element should be used in situations such as:”
    • “Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.”

or rephrasing the bullet to start with “On pages with large amounts of content…” so the full construction reads smoothly.

Suggested change
The `<auro-backtotop>` element should be used in situations where users may:
* Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.
The `<auro-backtotop>` element should be used in situations such as:
* Pages with large amounts of content where a shortcut to jump to the top of the page is appropriate.

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.

backtotop - modernize documentation

2 participants