Skip to content

Removes Asciinema players with custom CommandPlayer#7164

Open
Jwaegebaert wants to merge 2 commits intopnp:mainfrom
Jwaegebaert:newPlayer
Open

Removes Asciinema players with custom CommandPlayer#7164
Jwaegebaert wants to merge 2 commits intopnp:mainfrom
Jwaegebaert:newPlayer

Conversation

@Jwaegebaert
Copy link
Contributor

Replaced the old AsciinemaPlayer with a custom CommandPlayer component, basically a fake terminal that types out commands and shows responses, then loops.

What it does

  • Types commands with a natural-ish typing speed, shows the response, types clear, and starts over
  • Pauses automatically if you scroll up in the terminal body, resumes after 30s (with a little ring timer). There's also a manual pause button
  • Skips all animation if the user has reduced motion enabled
  • Colors follow the Docusaurus theme (light/dark) and match Prism code block highlighting for JSON output

responseFrom prop

Responses can be pulled from external files at build time instead of being inlined in the MDX. A remark plugin handles this, it reads JSON from a command page's ## Response section (.mdx) or just grabs the raw content of a .txt file.

<CommandPlayer command="m365 spo site list" responseFrom="../cmd/spo/site/site-list.mdx" />

<CommandPlayer command="m365 help spo" responseFrom="../../src/components/responses/help-spo.txt" />

Works on standalone <CommandPlayer /> and inside commands={[...]} arrays.

Closes #7130

Copy link

Copilot AI left a 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 PR updates the Docusaurus docs to replace embedded Asciinema recordings with a custom CommandPlayer component that simulates running CLI commands and displaying responses, including support for sourcing responses from external files at build time.

Changes:

  • Removed Asciinema cast assets and the AsciinemaPlayer React component, replacing usages in MDX pages with CommandPlayer.
  • Added the CommandPlayer component + styling, including pause-on-scroll behavior and reduced-motion handling.
  • Introduced a new remark plugin to resolve responseFrom references at build time and updated docs config to load the plugin and CSS.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
docs/static/casts/home.cast Removes legacy Asciinema cast asset.
docs/static/casts/usingCli.cast Removes legacy Asciinema cast asset.
docs/static/casts/listCommands.cast Removes legacy Asciinema cast asset.
docs/static/casts/commandHelp.cast Removes legacy Asciinema cast asset.
docs/static/casts/logout.cast Removes legacy Asciinema cast asset.
docs/static/casts/install.cast Removes legacy Asciinema cast asset.
docs/src/components/AsciinemaPlayer.tsx Removes the old Asciinema player wrapper component.
docs/src/components/CommandPlayer.tsx Adds the new terminal-like command animation component.
docs/src/scss/CommandPlayer.module.scss Adds global styling/theme variables for the new component.
docs/src/remark/commandPlayer.ts Adds remark plugin to resolve responseFrom into response at build time.
docs/src/components/responses/help-spo.txt Adds externalized response content used by CommandPlayer.
docs/src/components/responses/spo-cdn-get-help.txt Adds externalized response content used by CommandPlayer.
docs/docusaurus.config.ts Registers the remark plugin and includes the new CSS.
docs/docs/index.mdx Replaces Asciinema embed with CommandPlayer sequence.
docs/docs/user-guide/using-cli.mdx Replaces Asciinema embeds with CommandPlayer + responseFrom.
docs/docs/user-guide/connecting-microsoft-365.mdx Replaces Asciinema embed with CommandPlayer.
docs/docs/user-guide/installing-cli.mdx Removes Asciinema embed from install page.
docs/package.json Removes asciinema-player and updates devDependencies.
docs/package-lock.json Updates lockfile to reflect dependency changes.
Files not reviewed (1)
  • docs/package-lock.json: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

@Jwaegebaert Jwaegebaert marked this pull request as draft March 18, 2026 22:52
@Jwaegebaert Jwaegebaert requested a review from Copilot March 19, 2026 11:10
Copy link

Copilot AI left a 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 PR replaces the docs’ Asciinema-based terminal recordings with a custom CommandPlayer component and a remark plugin that can source response output from existing command docs (## Response) or plain text files, addressing the need to remove Asciinema players from the documentation.

Changes:

  • Added CommandPlayer React component + styling to render a looping “typed terminal” experience.
  • Added a remark plugin to resolve responseFrom at build time (from MDX ## Response JSON blocks or .txt files).
  • Removed Asciinema players/cast assets and updated relevant docs pages to use CommandPlayer.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docs/static/casts/usingCli.cast Removed obsolete Asciinema cast recording.
docs/static/casts/logout.cast Removed obsolete Asciinema cast recording.
docs/static/casts/listCommands.cast Removed obsolete Asciinema cast recording.
docs/static/casts/install.cast Removed obsolete Asciinema cast recording.
docs/static/casts/home.cast Removed obsolete Asciinema cast recording.
docs/static/casts/commandHelp.cast Removed obsolete Asciinema cast recording.
docs/src/scss/CommandPlayer.module.scss Added global styles and theme variables for the new terminal UI.
docs/src/remark/commandPlayer.ts Added remark plugin to resolve responseFrom and inject response at build time.
docs/src/components/responses/spo-cdn-get-help.txt Added external response content used by CommandPlayer.
docs/src/components/responses/help-spo.txt Added external response content used by CommandPlayer.
docs/src/components/CommandPlayer.tsx Added the new terminal-like command playback component.
docs/src/components/AsciinemaPlayer.tsx Removed Asciinema player component.
docs/package.json Dropped asciinema-player, added acorn for expression parsing in remark plugin.
docs/package-lock.json Updated lockfile to reflect dependency changes (including removal of Asciinema transitive deps).
docs/docusaurus.config.ts Registered the new remark plugin and included CommandPlayer styles in customCss.
docs/docs/user-guide/using-cli.mdx Replaced Asciinema embeds with CommandPlayer usage.
docs/docs/user-guide/installing-cli.mdx Removed Asciinema embed from install guide section.
docs/docs/user-guide/connecting-microsoft-365.mdx Replaced Asciinema embed with CommandPlayer usage.
docs/docs/index.mdx Replaced Asciinema embed with multi-step CommandPlayer demo using responseFrom.
Files not reviewed (1)
  • docs/package-lock.json: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

Copy link

Copilot AI left a 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 PR removes Asciinema-based terminal recordings from the Docusaurus docs and replaces them with a custom CommandPlayer component that simulates typed commands + responses, optionally sourcing responses from external files at build time via a new remark plugin.

Changes:

  • Replaced AsciinemaPlayer usage in key docs pages with the new CommandPlayer.
  • Added a commandPlayer remark plugin to resolve responseFrom references (from command MDX ## Response JSON blocks or raw .txt files).
  • Removed obsolete .cast assets and the asciinema-player dependency; added styling and new response fixture files.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/static/casts/usingCli.cast Removed unused Asciinema cast recording
docs/static/casts/logout.cast Removed unused Asciinema cast recording
docs/static/casts/listCommands.cast Removed unused Asciinema cast recording
docs/static/casts/install.cast Removed unused Asciinema cast recording
docs/static/casts/home.cast Removed unused Asciinema cast recording
docs/static/casts/commandHelp.cast Removed unused Asciinema cast recording
docs/src/scss/CommandPlayer.module.scss Added global styling + theme variables for CommandPlayer
docs/src/remark/commandPlayer.ts Added remark plugin to inline responses from MDX/TXT into CommandPlayer props
docs/src/components/responses/spo-cdn-get-help.txt Added help output fixture for CommandPlayer
docs/src/components/responses/help-spo.txt Added help output fixture for CommandPlayer
docs/src/components/CommandPlayer.tsx Added the new animated terminal-like CommandPlayer React component
docs/src/components/AsciinemaPlayer.tsx Removed Asciinema player component
docs/package.json Dropped asciinema-player, added acorn for expression re-parsing
docs/package-lock.json Lockfile updates reflecting dependency changes
docs/docusaurus.config.ts Registered remark plugin and included CommandPlayer CSS in customCss
docs/docs/user-guide/using-cli.mdx Replaced Asciinema embeds with CommandPlayer examples (incl. responseFrom)
docs/docs/user-guide/installing-cli.mdx Removed Asciinema embed from install guide
docs/docs/user-guide/connecting-microsoft-365.mdx Replaced Asciinema embed with CommandPlayer example
docs/docs/index.mdx Replaced homepage Asciinema embed with multi-step CommandPlayer sequence
Files not reviewed (1)
  • docs/package-lock.json: Language not supported

You can also share your feedback on Copilot code review. Take the survey.

@Jwaegebaert Jwaegebaert marked this pull request as ready for review March 19, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Asciinema players in docs

2 participants