Skip to content

Add Shiki's defaultColor option to <Code /> component#11391

Merged
matthewp merged 1 commit intowithastro:mainfrom
ARipeAppleByYoursTruly:feat/add-code-component-defaultColor-option
Jul 17, 2024
Merged

Add Shiki's defaultColor option to <Code /> component#11391
matthewp merged 1 commit intowithastro:mainfrom
ARipeAppleByYoursTruly:feat/add-code-component-defaultColor-option

Conversation

@ARipeAppleByYoursTruly
Copy link
Contributor

Changes

Adds Shiki's defaultColor option to the <Code /> component

Note

Because most of the work has been done by #11341, this PR is a partial implementation and depends on #11341 to work properly. Therefore this PR should be merged together with #11341, or alternatively let #11341 inherit this PR's changes and close this PR. (Pinging @madcampos for the heads up)

This PR comes from withastro/roadmap#897

Testing

Not sure how to make automated tests

I've published a testing branch. The tests are located at examples/component-code. They test all possible values of defaultColor

How to run the example:

  1. pnpm install
  2. pnpm run dev
  3. pnpm --filter @example/component-code run dev in a new shell

Docs

/cc @withastro/maintainers-docs for feedback!

The docs certainly needs to be updated as this exposes a new option of <Code /> component for users to play with.

I also would like some feedback on the overall tone and structure of JSDocs on the defaultColor option in <Code /> component

@changeset-bot
Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: 7e177d6

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jul 1, 2024
@madcampos
Copy link
Contributor

As part of the work on #11341 I've also added docs for defaultColor, the PR includes docs for the <Code /> component as well.

Here is the docs PR: withastro/docs#8722

@bluwy bluwy added this to the 4.12.0 milestone Jul 17, 2024
@bluwy bluwy added the semver: minor Change triggers a `minor` release label Jul 17, 2024
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Approving for docs because all the docs show up in #11341

@matthewp matthewp merged commit 6f9b527 into withastro:main Jul 17, 2024
@astrobot-houston astrobot-houston mentioned this pull request Jul 17, 2024
ematipico pushed a commit that referenced this pull request Jul 18, 2024
@astrobot-houston astrobot-houston mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants