-
Notifications
You must be signed in to change notification settings - Fork 21
Replace Tabs with OsAwareTabs for terminal commands using named slots #123
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: IEvangelist <[email protected]>
|
Nice! But @copilot now I'm realizing that we're still duplicating a ton of code and it's still fragile, as the single |
Co-authored-by: IEvangelist <[email protected]>
Done! Updated the OsAwareTabs component to include the TabItem wrappers and use named slots ( Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
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.
Pull request overview
This pull request refactors terminal command examples across the documentation by replacing the generic Tabs component with a new OsAwareTabs component that automatically selects the appropriate tab (PowerShell for Windows, Bash for others) based on the user's operating system. The refactoring also introduces a cleaner pattern using named slots.
Key Changes
- Created/enhanced
OsAwareTabscomponent withTabItemwrappers and named slots (unixandwindows) - Replaced 27 instances of
<Tabs syncKey="terminal">with<OsAwareTabs syncKey="terminal">across 14 files - Updated component script with
is:inlinedirective and improved cross-browser OS detection logic
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/components/OsAwareTabs.astro | Refactored to include TabItem wrappers with named slots; improved platform detection script |
| src/frontend/src/components/InstallAspireCLI.astro | Updated to use OsAwareTabs with direct slot attributes on Code components |
| src/frontend/src/content/docs/whats-new/aspire-13.mdx | Replaced Tabs with OsAwareTabs using Code components with slot attributes |
| src/frontend/src/content/docs/reference/cli/install-script.mdx | Replaced Tabs with OsAwareTabs using div wrappers for markdown code blocks |
| src/frontend/src/content/docs/reference/cli/configuration.mdx | Replaced Tabs with OsAwareTabs; contains unused imports |
| src/frontend/src/content/docs/get-started/prerequisites.mdx | Updated terminal examples to use OsAwareTabs with direct slot attributes |
| src/frontend/src/content/docs/get-started/install-cli.mdx | Replaced Tabs with OsAwareTabs using mixed patterns (direct slots and div wrappers) |
| src/frontend/src/content/docs/dashboard/standalone.mdx | Updated Docker command examples to use OsAwareTabs with div wrappers |
| src/frontend/src/content/docs/dashboard/standalone-for-python.mdx | Updated terminal examples to use OsAwareTabs |
| src/frontend/src/content/docs/dashboard/standalone-for-nodejs.mdx | Updated Docker commands to use OsAwareTabs; contains unused import |
| src/frontend/src/content/docs/dashboard/security-considerations.mdx | Updated Docker examples with OsAwareTabs |
| src/frontend/src/content/docs/dashboard/overview.mdx | Updated Docker run commands to use OsAwareTabs |
| src/frontend/src/content/docs/dashboard/microsoft-collected-dashboard-telemetry.mdx | Updated environment variable examples to use OsAwareTabs |
| src/frontend/src/content/docs/dashboard/explore.mdx | Updated terminal examples to use OsAwareTabs |
| src/frontend/src/content/docs/dashboard/enable-browser-telemetry.mdx | Updated Docker commands to use OsAwareTabs |
| src/frontend/src/content/docs/dashboard/configuration.mdx | Updated Docker configuration examples to use OsAwareTabs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| --- | ||
|
|
||
| import { TabItem, Tabs, Steps } from '@astrojs/starlight/components'; | ||
| import { Aside, Steps } from '@astrojs/starlight/components'; |
Copilot
AI
Dec 8, 2025
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.
The Aside component is imported but not used anywhere in this file. It should be removed from the import statement to keep the imports clean.
| import { Aside, Steps } from '@astrojs/starlight/components'; | |
| import { Steps } from '@astrojs/starlight/components'; |
| A global Aspire CLI settings file is stored at `$HOME/.aspire/globalsettings.json`, and is used as the default settings for the CLI. A local settings file overwrites the settings from the global file. Local settings files are stored at `./.aspire/settings.json`. | ||
|
|
||
| import { Code, Steps, Tabs, TabItem } from "@astrojs/starlight/components" | ||
| import { Code, Steps } from "@astrojs/starlight/components" |
Copilot
AI
Dec 8, 2025
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.
The Code and Steps components are imported but not used anywhere in this file. They should be removed from the import statement to keep the imports clean.
| import { Code, Steps } from "@astrojs/starlight/components" |
All
Tabscomponents withsyncKey="terminal"now use theOsAwareTabscomponent, which automatically selects PowerShell tabs for Windows users and Bash tabs for others. The component has been refactored to use named slots to reduce code duplication and improve maintainability.Changes
<Tabs syncKey="terminal">with<OsAwareTabs syncKey="terminal">across 14 filesOsAwareTabscomponent to includeTabItemwrappers and use named slots (unixandwindows)Fragmentcomponents with named slots instead ofTabItemdeclarationsOsAwareTabsandFragment, removed unusedTabsandTabItemreferencesOsAwareTabs.astro- the component itself)InstallAspireCLI.astro)Example
Before:
After:
OsAwareTabs Component:
Benefits
Original prompt
💡 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.