Skip to content

Conversation

@jordanjones243
Copy link
Contributor

@jordanjones243 jordanjones243 commented Dec 26, 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 reorganize flightline component documentation, improve component metadata and packaging, and update repository workflows and settings.

Enhancements:

  • Refactor component constructors to use dedicated default-initialization methods for clearer state setup.
  • Expose custom-elements.json through package exports and add type metadata for the main entry for better tooling and IDE support.

Build:

  • Relax Node engine requirements to support any version >=20 and update library and design token dependencies to newer releases.
  • Enable npm publish provenance metadata and add a test coverage script to the project scripts.

CI:

  • Switch README build status badge to track the release workflow instead of the old testPublish workflow.
  • Update repository settings to use dev as the default branch and allow merge commits while removing inline branch protection configuration.
  • Tidy the add-project GitHub workflow formatting without changing behavior.

Documentation:

  • Restructure API docs to better group basic, property, and usage examples while adding new examples for cancellation, layovers, container queries, and theming via CSS variables.
  • Simplify and modernize the main index and README content, including new use case section placement, updated install guidance, and documentation on custom component registration for version management.
  • Improve JSDoc annotations for auro-flightline and auro-flight-segment, including custom element tags and clearer property documentation.

Tests:

  • Add a dedicated test coverage npm script for generating and opening coverage reports.

Chores:

  • Adjust issue and pull request templates with more accurate labels, version questions, and an expanded review/testing checklist, plus a new design handoff issue template.
  • Remove unused generated script files and legacy API example files while adding focused examples for new cancellation scenarios.
  • Add an .nvmrc file to standardize the Node.js version used in development.

example code updated to reflect latest Auro element APIs
example documentation layout improved
custom registration updated and moved to install page
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 self-assigned this Dec 26, 2025
@jordanjones243 jordanjones243 requested a review from a team as a code owner December 26, 2025 21:50
@jordanjones243 jordanjones243 linked an issue Dec 26, 2025 that may be closed by this pull request
@sourcery-ai
Copy link

sourcery-ai bot commented Dec 26, 2025

Reviewer's Guide

Modernizes documentation, examples, and project metadata for the auro-flightline component while improving API docs, adding custom element metadata, and updating tooling and GitHub settings.

Sequence diagram for custom registration and usage of AuroFlightline components

sequenceDiagram
  actor Developer
  participant AppModule
  participant AuroFlightlineClass as AuroFlightline
  participant AuroFlightSegmentClass as AuroFlightSegment
  participant Browser
  participant HTMLPage

  Developer->>AppModule: Write import statements
  AppModule->>AuroFlightlineClass: import AuroFlightline from module
  AppModule->>AuroFlightSegmentClass: import AuroFlightSegment from module

  Developer->>AppModule: Configure custom tag names
  AppModule->>AuroFlightlineClass: register("custom-flightline")
  AuroFlightlineClass->>Browser: define custom element custom-flightline

  AppModule->>AuroFlightSegmentClass: register("custom-flight-segment")
  AuroFlightSegmentClass->>Browser: define custom element custom-flight-segment

  Developer->>HTMLPage: Use <custom-flightline> with <custom-flight-segment>
  HTMLPage->>Browser: Parse custom-flightline markup
  Browser->>AuroFlightlineClass: Construct custom-flightline instance
  AuroFlightlineClass->>AuroFlightlineClass: _initializeDefaults()
  Browser->>AuroFlightSegmentClass: Construct child custom-flight-segment
  AuroFlightSegmentClass->>AuroFlightSegmentClass: _initializeDefaults()
  Browser->>HTMLPage: Render flightline UI with segments
Loading

Updated class diagram for AuroFlightline and AuroFlightSegment components

classDiagram
  class AuroFlightline {
    <<customElement>>
    +Boolean canceled
    +Boolean firstSegmentCanceled
    +Boolean hasCanceledSegment
    +Boolean lastSegmentCanceled
    +_initializeDefaults()
    +render()
    +static styles
    +static properties
    +static register(name)
  }

  class AuroFlightSegment {
    <<customElement>>
    +Boolean canceled
    +Boolean destinationCanceled
    +String duration
    +String iata
    +Boolean nextDay
    +Boolean partialCancel
    +Boolean stopover
    +_initializeDefaults()
    +render()
    +static styles
    +static properties
    +static register(name)
  }

  AuroFlightline "1" o-- "many" AuroFlightSegment : contains
Loading

File-Level Changes

Change Details Files
Restructure and expand API documentation and examples for auro-flightline and auro-flight-segment.
  • Normalize AURO-GENERATED-CONTENT include paths to use ./../ relative references.
  • Reorganize sections in the API docs into Basic, Property & Attribute Examples, Layover/Stopover patterns, Common Usage Patterns, and styling guidance.
  • Update and rename several HTML example includes (e.g., iata, next-day, stopover-and-layover, multiple-stop-and-layovers, canceled-stop-and-layovers).
  • Add new examples for canceled destination and canceled segment and wire them into the docs.
  • Clarify narrative descriptions around canceled flights, destinationCanceled, layover duration, and next-day behavior.
docs/partials/api.md
apiExamples/canceled-destination.html
apiExamples/canceled-segment.html
Simplify landing/index docs and move advanced guidance into README, including custom registration guidance and basic usage.
  • Update index partial to focus on minimal description, use cases, and a single basic example; remove custom registration section from index.
  • Adjust AURO-GENERATED-CONTENT paths in index partial to be ./../-based.
  • Introduce a dedicated customRegistration partial with example JS and explanation of custom element naming for versioning scenarios.
docs/partials/index.md
docs/partials/customRegistration.md
Revise README structure to highlight use cases, installation, usage, CDN, basic examples, and custom registration while refreshing badges and wording.
  • Replace generic browser support block with an inlined Use Cases section pulled from docs/partials/useCases.md higher in the README.
  • Update build status badge to point to release.yml workflow instead of testPublish.yml.
  • Remove redundant design token dependency section and example HTML snippet, and reword the dependency import section title and copy.
  • Move and rename API example section to a Basic Example section with the basic HTML snippet.
  • Add a comprehensive Custom Component Registration for Version Management section that inlines customRegistration.md content and shows a live custom-flightline/custom-flight-segment example and code accordion.
README.md
Improve web component classes with better initialization patterns and JSDoc metadata for tooling and custom-elements.json generation.
  • Add @CustomElement tags to auro-flightline and auro-flight-segment JSDoc blocks.
  • Introduce _initializeDefaults() helper in both classes and call it from the constructor to centralize default property setup.
  • Reorganize and document LitElement properties with detailed JSDoc comments, including explicit @Private markers for internal flags.
  • Fix minor wording in register(name) JSDoc for both components.
src/auro-flightline.js
src/auro-flight-segment.js
Modernize project configuration, exports, and metadata for better tooling, publishing, and Node support.
  • Relax Node engine requirement to '>=20' and bump lit and several @AuroDesignSystem devDependencies to newer versions.
  • Enable npm publish provenance and add a test:coverage script using auro test --coverage-report --open.
  • Expand exports map to include custom-elements.json and typed module exports (module/types/default) for the root entry, and mark customElements manifest path in package.json.
  • Regenerate package-lock.json to reflect dependency updates.
package.json
package-lock.json
Update GitHub configuration, workflows, and templates to match current Auro practices and add a design handoff issue template.
  • Retarget default branch to dev, allow merge commits, and remove explicit branch protection rules in repository settings.
  • Refine PR template with a Review Checklist title, and add an expandable RC Checklist section covering browser testing, scenarios, and framework playground checks.
  • Tweak add-project workflow formatting and adjust bug-report template to reference the auro-flightline version instead of auro-templates.
  • Add a Design Handoff issue template for design-to-dev workflow, including Figma link, implementation notes, and review checklist.
  • Add an .nvmrc file for consistent local Node version usage.
.github/settings.yml
.github/PULL_REQUEST_TEMPLATE.md
.github/workflows/add-project.yml
.github/ISSUE_TEMPLATE/bug_report.yaml
.github/ISSUE_TEMPLATE/design_handoff.yaml
.nvmrc

Assessment against linked issues

Issue Objective Addressed Explanation
#107 Modernize and update all auro-flightline documentation (README, docs partials, API examples, issue/PR templates, and related metadata) 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

@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 AuroFlightSegment.register the JSDoc @param {string} [name="auro-flightline"] still references the flightline element; update the default name in the comment (and, if applicable, the implementation) to reflect the segment element instead.
  • The new .nvmrc file appears in the diff without a visible version; ensure it explicitly specifies a Node version that matches the engines.node constraint (e.g., 20) so local environments stay consistent.
  • Changing the default branch to dev and dropping the explicit branch protection configuration from .github/settings.yml is a sizable workflow change—double-check that this aligns with your repo/organization standards and that dev (and/or main) still has the desired protection rules configured elsewhere.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `AuroFlightSegment.register` the JSDoc `@param {string} [name="auro-flightline"]` still references the flightline element; update the default name in the comment (and, if applicable, the implementation) to reflect the segment element instead.
- The new `.nvmrc` file appears in the diff without a visible version; ensure it explicitly specifies a Node version that matches the `engines.node` constraint (e.g., `20`) so local environments stay consistent.
- Changing the default branch to `dev` and dropping the explicit branch protection configuration from `.github/settings.yml` is a sizable workflow change—double-check that this aligns with your repo/organization standards and that `dev` (and/or `main`) still has the desired protection rules configured elsewhere.

## Individual Comments

### Comment 1
<location> `docs/partials/api.md:76` </location>
<code_context>
+
+### Layover
+
+This example illustrates the use of the `duration` and `iata` attribute to display station codes with the layover duration.

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

<issue_to_address>
**issue (typo):** Use plural "attributes" when referring to both `duration` and `iata`.

Because you’re mentioning both fields, this should read "the `duration` and `iata` attributes" for grammatical correctness.

```suggestion
This example illustrates the use of the `duration` and `iata` attributes to display station codes with the layover duration.
```
</issue_to_address>

### Comment 2
<location> `docs/partials/api.md:149` </location>
<code_context>
+### Stopover and Layover

-The following illustrates an international flight with stopovers and layovers, for example, ADK to BCN.
+The following illustrates flight with a stopover and a layover.

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

<issue_to_address>
**issue (typo):** Add article "a" before "flight" for correct grammar.

You could write: “The following illustrates a flight with a stopover and a layover.”

```suggestion
The following illustrates a flight with a stopover and a layover.
```
</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.


### Layover

This example illustrates the use of the `duration` and `iata` attribute to display station codes with the layover duration.
Copy link

Choose a reason for hiding this comment

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

issue (typo): Use plural "attributes" when referring to both duration and iata.

Because you’re mentioning both fields, this should read "the duration and iata attributes" for grammatical correctness.

Suggested change
This example illustrates the use of the `duration` and `iata` attribute to display station codes with the layover duration.
This example illustrates the use of the `duration` and `iata` attributes to display station codes with the layover duration.

### Stopover and Layover

The following illustrates an international flight with stopovers and layovers, for example, ADK to BCN.
The following illustrates flight with a stopover and a layover.
Copy link

Choose a reason for hiding this comment

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

issue (typo): Add article "a" before "flight" for correct grammar.

You could write: “The following illustrates a flight with a stopover and a layover.”

Suggested change
The following illustrates flight with a stopover and a layover.
The following illustrates a flight with a stopover and a layover.

@jordanjones243 jordanjones243 changed the base branch from main to dev December 29, 2025 22:37
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.

flightline - modernize documentation

2 participants