Skip to content

docs: fix the vue back button binding and the src/css path in contributing - #4888

Merged
thetaPC merged 7 commits into
css-ds-tokensfrom
docs/vue-code-fences
Nov 23, 2026
Merged

thetaPC merged 7 commits into
css-ds-tokensfrom
docs/vue-code-fences

Conversation

@thetaPC

@thetaPC thetaPC commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Issue URL: N/A

What is the current behavior?

  • Most Vue samples in the docs and the v9 playgrounds are fenced as html. The playground generator already writes vue, so only older samples use html.
  • They get Vue highlighting only because prism-vue.ts points html at the Vue grammar.
  • The Vue back button sample in per-component config binds text with Angular's [text]. Vue treats that as a plain attribute named [text], so the button never gets the text.
  • CONTRIBUTING lists src/styles, which no longer exists.

What is the new behavior?

  • Those samples are fenced as vue. Highlighting looks the same, since both labels already used the Vue grammar.
  • Prettier formats vue blocks with its Vue parser, which removes the indent inside <script>. This matches the samples that were already vue. It also joins some multi-line imports, writes .25 as 0.25 in one progress bar sample, and adds parentheses around one arrow function assignment.
  • The back button sample binds with Vue's :text, in v9 and v8.
  • CONTRIBUTING lists src/css and links to its README.
  • v8's fences and the html alias are unchanged.

Does this introduce a breaking change?

  • Yes
  • No

Other information

How to test

  1. Open the preview's Route usage, select the Vue tab, and compare it with production. The colors match, and the <script> contents are no longer indented.
  2. Open the preview's Textarea Label Placement playground, show the Vue code, and compare it with production. Same result. Opening it in StackBlitz gives a working project.
  3. Open the preview's per-component config and select the Vue tab. The recommended sample uses :text.

Ignoring whitespace, the relabeling commits change only the fence labels: hide whitespace.

Stacked on #4883.

@thetaPC
thetaPC added this pull request to stack #4889 November 20, 2026 19:46
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ionic-docs Ready Ready Preview Nov 23, 2026 11:34pm UTC

Request Review

@thetaPC thetaPC changed the title docs(vue): mark vue samples as vue code blocks docs: fix the vue back button binding and the src/css path in contributing Nov 20, 2026
@thetaPC
thetaPC marked this pull request as ready for review November 20, 2026 23:36
@thetaPC
thetaPC requested a review from a team as a code owner November 20, 2026 23:36

@ShaneK ShaneK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me! There are a couple of things outside the diff that I think got missed:

  • The playground generator in _templates/playground/new/vue.md.ejs.t still indents the import and the <style scoped> block, so every new playground starts out in the old shape and fails the prettier check in CI if someone commits it without running lint.
  • The camera sample's Vue tab in docs/native-setup.mdx is still fenced as typescript. It's the only Vue sample left that isn't fenced as vue, and I think lang="typescript" should be lang="ts" there too.

Fine to do them here or as a follow-up, up to you! 🚀

<TabItem value="vue">

```html
```vue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since both of these blocks sit inside the mdx-code-block wrapper, prettier doesn't reach them, so the <script setup> bodies here and in the Overlays sample further down are still indented two spaces. They're the last Vue samples on the site like that, so I think they'll just need unindenting by hand.

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 59d585b.

thetaPC and others added 3 commits November 23, 2026 15:33
Co-authored-by: Shane <561207+ShaneK@users.noreply.github.com>
Co-authored-by: Shane <561207+ShaneK@users.noreply.github.com>
Co-authored-by: Shane <561207+ShaneK@users.noreply.github.com>
@thetaPC
thetaPC merged commit 46b8859 into main Nov 23, 2026
7 checks passed
@thetaPC
thetaPC deleted the docs/vue-code-fences branch November 23, 2026 23:45

This branch was successfully deployed

1 active deployment
Preview — 3fce1cd0 Deployed Nov 23, 2026 by vercel[bot]
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.

2 participants