Skip to content

docs(divider): update documentation #5629

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

Merged
merged 7 commits into from
Jul 29, 2025

Conversation

rise-erpelding
Copy link
Collaborator

@rise-erpelding rise-erpelding commented Jul 23, 2025

Description

Updates the divider docs page to meet documentation standards.

Motivation and context

Improving the accessibility documentation of the divider component, bringing formatting up to date with other freshly documented components.

Related issue(s)

  • fixes SWC-377

Screenshots (if appropriate)


Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result
  • Descriptive Test Statement

    1. Go here
    2. Do this action
    3. Expect this result

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

@rise-erpelding rise-erpelding requested a review from a team as a code owner July 23, 2025 15:49
Copy link

changeset-bot bot commented Jul 23, 2025

🦋 Changeset detected

Latest commit: a029b3e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

github-actions bot commented Jul 23, 2025

📚 Branch Preview

🔍 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-5629

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

Copy link

Tachometer results

Currently, no packages are changed by this PR...

@rise-erpelding rise-erpelding self-assigned this Jul 23, 2025
@rise-erpelding rise-erpelding force-pushed the rise-erpelding/divider-documentation-audit branch from 4d44c8d to 2be8487 Compare July 24, 2025 17:30
Copy link
Member

@cdransf cdransf left a comment

Choose a reason for hiding this comment

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

This looks awesome! I've been adding a link to the design docs at the bottom of the overview section for convenience, but not a requirement by any means. ✨

Copy link
Contributor

@Rajdeepc Rajdeepc left a comment

Choose a reason for hiding this comment

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

Looks solid! Can you also consider adding a table and list all available attributes (e.g., size, vertical, static-color) with a brief description and possible values?

Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt left a comment

Choose a reason for hiding this comment

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

Let's check another one off of Nikki's table! I only had real small comments about lowercasing (is that a verb? I'm making it a verb 😆) a few words, and after Rajdeep's comments are addressed I think it's ready to merge.

Thanks!

import { Divider } from '@spectrum-web-components/divider';
```

## Horizontal
### Options
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know anatomy is usually in the docs, but...I don't even know what we'd put there! 🤣 I'm fine with leaving it out.

Copy link
Collaborator Author

@rise-erpelding rise-erpelding Jul 28, 2025

Choose a reason for hiding this comment

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

Yeah, there's no anatomy section in the design docs for this one 🤷‍♀️

## Vertical
#### Vertical

Vertical dividers are used to separate content horizontally.

When a vertical Divider is used inside of a flex container, use `align-self: stretch; height: auto;` on the Divider.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a pretty small thing, but should we use lowercase in "Divider" here? It doesn't need a capital D.

Comment on lines 190 to 191
- **ARIA Role**: Automatically sets `role="separator"` to ensure proper semantic meaning for assistive technologies
- **Orientation Support**: When `vertical` is true, automatically sets `aria-orientation="vertical"` to indicate the divider's orientation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Super small nit-pick: the second word in these bolded bullet points don't need to be capitalized.

Comment on lines +40 to +45
/**
* The static color variant to use for the divider.
*/
@property({ reflect: true, attribute: 'static-color' })
public staticColor?: 'white' | 'black';

Copy link
Collaborator Author

@rise-erpelding rise-erpelding Jul 28, 2025

Choose a reason for hiding this comment

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

Can you also consider adding a table and list all available attributes (e.g., size, vertical, static-color) with a brief description and possible values?

@Rajdeepc Adding this would add staticColor to the "Attributes and properties" table that's under the API tab, is that what you meant? It doesn't seem like these typically include sizes, unless there was an example somewhere that does this that I might have missed?

Because it seems like adding public staticColor is the way to get it into the table, I've added it here, is that within scope for this kind of docs work? I also made some test updates/Storybook updates but could roll those back if that's not what we want.

@rise-erpelding rise-erpelding requested a review from Rajdeepc July 28, 2025 15:21
@rise-erpelding rise-erpelding force-pushed the rise-erpelding/divider-documentation-audit branch from dab7c0b to dd2217a Compare July 29, 2025 15:13
@caseyisonit caseyisonit merged commit 826a2d5 into main Jul 29, 2025
24 of 26 checks passed
@caseyisonit caseyisonit deleted the rise-erpelding/divider-documentation-audit branch July 29, 2025 16:57
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.

5 participants