-
Notifications
You must be signed in to change notification settings - Fork 2
Modernize Documentation #214
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
Conversation
There was a problem hiding this 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
|
🚀 PR Release Published! To install: npm install @aurodesignsystem-dev/[email protected]Install via alias: npm install @aurodesignsystem/auro-accordion@npm:@aurodesignsystem-dev/[email protected] |
f0c335d to
ffa89bb
Compare
Reviewer's GuideModernizes 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 examplesequenceDiagram
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
Class diagram for updated auro-accordion and auro-accordion-group APIsclassDiagram
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
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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, theauro-accordion-groupMethods 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.mdyou switched some "See code" accordions fromAURO-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 toCODEfor 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>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
ffa89bb to
58381bf
Compare
065e999 to
ba06f69
Compare
e53db5a to
c599caf
Compare
c599caf to
794942e
Compare
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
794942e to
f717ad8
Compare
Now only exports AuroAccordion and AuroAccordionGroup classes. AuroAccordionButton was removed since it was only for internal component use.
f717ad8 to
127a552
Compare
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
Stringproperties displaying all of their "options"?indexpage (i.e. only the most "basic" example(s) of component)installpage and renders as expectedCode Changes
myExample.html->my-example.html)perfcommit to trigger a release, as expected?Visual Checks
See Codeaccordions actually render the code blocks under their respective examplesBy 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:
Bug Fixes:
Enhancements:
Build:
Documentation: