Skip to content

Create standalone Separator component with @as argument for dynamic element tags#637

Merged
NullVoxPopuli merged 14 commits intomainfrom
copilot/add-default-styles-issue-636
Jan 12, 2026
Merged

Create standalone Separator component with @as argument for dynamic element tags#637
NullVoxPopuli merged 14 commits intomainfrom
copilot/add-default-styles-issue-636

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 7, 2026

Implementation Plan for Issue #636

  • Review the current Breadcrumb documentation to understand the Separator usage
  • Create standalone Separator component in ember-primitives/src/components/separator.gts
  • Export Separator from index.ts
  • Update Breadcrumb to import and use the standalone Separator
  • Create dedicated documentation for Separator at docs-app/public/docs/3-ui/separator.md
  • Update Breadcrumb documentation to reference the standalone Separator
  • Add example showing standalone Separator usage in Breadcrumb docs
  • Add @as argument to Separator to support dynamic element tags
  • Wire Breadcrumb to yield Separator with @as="li" pre-configured
  • Update documentation to explain @as argument and proper HTML structure
  • Update tests for new @as functionality
  • Simplify Breadcrumb template to yield hash directly without let block
  • Run code review to ensure quality
Original prompt

Implement #636


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copilot AI changed the title [WIP] Add default styles for ember primitives Document that Breadcrumb Separator is primarily for readability Jan 7, 2026
Copilot AI requested a review from NullVoxPopuli January 7, 2026 04:08
@NullVoxPopuli
Copy link
Copy Markdown
Contributor

@copilot make a separate <Separator> component, and on the <Separator> component's docs, mention how it is simply a semantic wrapper

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot make a separate <Separator> component, and on the <Separator> component's docs, mention how it is simply a semantic wrapper

Done! Created a standalone <Separator> component with dedicated documentation. Changes in commits a649119 and 2465f7c:

  • Created ember-primitives/src/components/separator.gts as a standalone component
  • Added comprehensive documentation at docs-app/public/docs/3-ui/separator.md explaining it's a simple semantic wrapper
  • Updated Breadcrumb to import the standalone Separator
  • Added tests for the standalone component
  • Breadcrumb still yields Separator for backward compatibility, but users can now import and use Separator directly

Copilot AI changed the title Document that Breadcrumb Separator is primarily for readability Create standalone Separator component with dedicated documentation Jan 7, 2026
@NullVoxPopuli
Copy link
Copy Markdown
Contributor

@copilot because the Separator can be used in lists, it should have an @as argument that allows you to specify the tag name. We can't have spans as siblings to li elements.

Also, the Breadcrumb component should wire up as to be li when yielding out the separator

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 7, 2026

@copilot because the Separator can be used in lists, it should have an @as argument that allows you to specify the tag name. We can't have spans as siblings to li elements.

Also, the Breadcrumb c...

Done in commit 093f4da:

  • Added @as argument to Separator component (defaults to "span", can be set to any tag)
  • Breadcrumb now yields Separator with @as="li" pre-configured using WithBoundArgs
  • Updated documentation to explain why @as="li" is important for valid HTML in lists
  • All examples and tests updated to use @as="li" in list contexts

Copilot AI changed the title Create standalone Separator component with dedicated documentation Create standalone Separator component with @as argument for dynamic element tags Jan 7, 2026
{{#let (hash Separator=(component Separator as="li")) as |b|}}
<nav aria-label={{if @label @label "Breadcrumb"}} ...attributes>
<ol>
{{yield b}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot don't use let like you have, just yield the thing like how it was before

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 6652df1. Removed the {{#let}} block and now yielding the hash directly like other components in the codebase (e.g., toggle-group).

Copilot AI and others added 6 commits January 10, 2026 10:49
…rposes

Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
@NullVoxPopuli NullVoxPopuli force-pushed the copilot/add-default-styles-issue-636 branch from 6652df1 to 6a48275 Compare January 10, 2026 15:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 10, 2026

Project Preview URL
Docs https://8e47a2e4.ember-primitives.pages.dev

Logs

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review January 11, 2026 16:56
@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label Jan 12, 2026
@NullVoxPopuli NullVoxPopuli merged commit 8d2fce1 into main Jan 12, 2026
20 checks passed
@github-actions github-actions Bot mentioned this pull request Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants