docs: add code examples for Tabs, Table, Treetable#757
Open
fateeand wants to merge 3 commits into
Open
Conversation
fateeand
requested review from
TerranceKhumalo-absa,
korel-san and
lukasmatta
as code owners
July 20, 2026 16:03
Contributor
Coverage report for library
Test suite run success2386 tests passing in 76 suites. Report generated by 🧪jest coverage report action from 9160618 |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds CodeExampleComponent-backed live code snippets to the composition documentation pages for Table, Tree Table, and Tabs (Tab Group), by extracting example HTML/TS into dedicated *.examples.ts files and wiring those examples into the pages.
Changes:
- Added new
table-page.examples.ts,tree-table-page.examples.ts, andtab-group-page.examples.tsexample registries and exposed them viareadonly exampleson each page component. - Wrapped rendered demos in
<app-code-example>to show HTML/TS alongside the live component preview. - Updated styling to support the new layout (CodeExample host spacing + removal/adjustment of prior “gap” spacing patterns).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| projects/composition/src/app/pages/tree-table-page/tree-table-page.examples.ts | Adds Tree Table example HTML/TS strings for code preview. |
| projects/composition/src/app/pages/tree-table-page/tree-table-page.component.ts | Wires treeTableExamples into the page and imports CodeExampleComponent. |
| projects/composition/src/app/pages/tree-table-page/tree-table-page.component.html | Wraps each Tree Table demo in <app-code-example> and adjusts demo sizing. |
| projects/composition/src/app/pages/tree-table-page/tree-table-page.component.scss | Adds app-code-example spacing and restructures ::ng-deep usage. |
| projects/composition/src/app/pages/table-page/table-page.examples.ts | Adds Table example HTML/TS strings for code preview. |
| projects/composition/src/app/pages/table-page/table-page.component.ts | Wires tableExamples into the page and imports CodeExampleComponent. |
| projects/composition/src/app/pages/table-page/table-page.component.html | Wraps each Table demo in <app-code-example> and adjusts demo sizing. |
| projects/composition/src/app/pages/table-page/table-page.component.scss | Adds app-code-example spacing and restructures ::ng-deep usage. |
| projects/composition/src/app/pages/tab-group-page/tab-group-page.examples.ts | Adds Tab Group (Tabs) example HTML/TS strings for code preview. |
| projects/composition/src/app/pages/tab-group-page/tab-group-page.component.ts | Wires tabGroupExamples into the page and imports CodeExampleComponent. |
| projects/composition/src/app/pages/tab-group-page/tab-group-page.component.html | Wraps each Tab Group demo in <app-code-example> with labels and code. |
| projects/composition/src/app/pages/tab-group-page/tab-group-page.component.scss | Removes now-unused title styling after switching to CodeExample labels. |
| projects/composition/src/app/pages/expansion-panel-page/expansion-panel-page.component.scss | Removes gap spacing (now handled by CodeExample host margins). |
| projects/composition/src/app/pages/dialog-page/dialog-page.component.scss | Removes gap spacing (now handled by CodeExample host margins). |
| projects/composition/src/app/pages/datepicker-page/datepicker-page.component.scss | Removes gap spacing (now handled by CodeExample host margins). |
| projects/composition/src/app/components/code-example/code-example.component.scss | Moves spacing responsibility to :host and avoids trailing margin on the last example. |
Contributor
Playwright test resultsDetails
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds live code examples to the Tabs, Table and Treetable components' documentation pages.
Closes #739
Closes #740
Closes #747