Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(form): more in-depth form docs #392

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DukeFerdinand
Copy link
Contributor

@DukeFerdinand DukeFerdinand commented Mar 5, 2025

Adds more examples and a much more in-depth explanation of form.

Alaska Airlines Pull Request

Resolves #391

Before Submitting this pull request:

  • Link all tickets in this repository related to this PR in the Development section
    note: all pull requests require at least one linked ticket
  • If this PR is Ready For Review, all ticket's linked under Development must have their status changed to Ready For Review as well

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.

Summary by Sourcery

Updates the form documentation to include more in-depth explanations, examples, and information on how to access form data and handle custom elements.

Documentation:

  • Adds more in-depth explanations of form data generation, structure, and how to access it.
  • Provides guidance on using custom-named Auro form elements within auro-form.
  • Includes examples of basic forms, forms with column layouts, and complex forms with multiple form elements.
  • Adds documentation for form data structure, including a TypeScript example.
  • Adds documentation for accessing form data, including data keys, get methods, events, and advanced features.
  • Adds documentation for important notes for custom elements.
  • Adds examples for basic form, form with column layout, and complex form.

Adds more examples and a much more in-depth explanation of form.
@DukeFerdinand DukeFerdinand added the Type: Documentation Documentation only changes label Mar 5, 2025
@DukeFerdinand DukeFerdinand self-assigned this Mar 5, 2025
@DukeFerdinand DukeFerdinand requested a review from a team as a code owner March 5, 2025 01:32
Copy link

sourcery-ai bot commented Mar 5, 2025

Reviewer's Guide by Sourcery

This pull request enhances the documentation for the auro-form component by providing more in-depth explanations, examples, and clarifications on custom element registration. It also introduces new examples showcasing different form layouts and complexities.

Updated class diagram for AuroFormState

classDiagram
  class AuroFormState {
    +string hotelCity
    +string[] dates
    +number numberOfGuests
  }
  note for AuroFormState "Represents the structure of the form data collected by auro-form"
Loading

File-Level Changes

Change Details Files
Expanded documentation on form value generation, including data structure examples and TypeScript types.
  • Added a section detailing how auro-form collects data from form elements.
  • Provided a JSON example of form data structure.
  • Included TypeScript types for representing form data.
  • Added a section on accessing form data using vanilla JavaScript.
  • Documented data keys, get methods, events, and advanced features like formState.
components/form/docs/partials/index.md
Clarified the requirement for registering custom-named Auro form elements.
  • Emphasized that custom-named elements must be registered before auro-form.
  • Explained that Auro form elements are automatically recognized by tag name or special auro attributes.
components/form/docs/partials/index.md
Added examples demonstrating form usage, including basic forms, column layouts, and complex forms.
  • Included a basic form example.
  • Added an example showcasing a form with a column layout.
  • Introduced a complex form example with multiple form elements like date pickers and select elements.
components/form/docs/partials/index.md
components/form/apiExamples/complex.html
components/form/apiExamples/column-layout.html
Added a script to register demo dependencies.
  • Added a registerDemoDeps.js file.
  • Referenced the new script in index.html.
components/form/demo/index.html
components/form/demo/registerDemoDeps.js

Assessment against linked issues

Issue Objective Addressed Explanation
#391 Add missing documentation for the auro-form component.

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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 @DukeFerdinand - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The updated documentation provides a comprehensive guide to using the auro-form component, which is a significant improvement.
  • Consider adding a section on how to handle form validation and error messages, as this is a common requirement for forms.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Documentation only changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant