From 2f376321367da9f23b74bfb4e807a1ad0d819d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Wed, 9 Sep 2026 22:48:28 +0200 Subject: [PATCH] Drop playground pages from the preview build (#3024) --- .changeset/drop-playground-pages.md | 5 + .gitignore | 4 +- preview/astro.config.mjs | 24 +- preview/pages/playground-categories.astro | 325 ---------------------- preview/pages/playground-layout.astro | 19 -- preview/pages/playground.astro | 239 ---------------- 6 files changed, 30 insertions(+), 586 deletions(-) create mode 100644 .changeset/drop-playground-pages.md delete mode 100644 preview/pages/playground-categories.astro delete mode 100644 preview/pages/playground-layout.astro delete mode 100644 preview/pages/playground.astro diff --git a/.changeset/drop-playground-pages.md b/.changeset/drop-playground-pages.md new file mode 100644 index 000000000..92d772ec5 --- /dev/null +++ b/.changeset/drop-playground-pages.md @@ -0,0 +1,5 @@ +--- +"@tabler/preview": patch +--- + +Removed the `playground` and `playground-*` scratch pages from the preview build and the repository. diff --git a/.gitignore b/.gitignore index 1f9af279b..2b8fc5e77 100644 --- a/.gitignore +++ b/.gitignore @@ -20,10 +20,10 @@ node_modules/ /svg-tmp/ /components/ /percy.sh -/preview/pages/playground.html +/preview/pages/playground.astro /preview/pages/screenshot.html /preview/pages/screenshot-*.html -/preview/pages/playground-*.html +/preview/pages/playground-*.astro /preview/pages/features.html .pnp.loader.mjs diff --git a/preview/astro.config.mjs b/preview/astro.config.mjs index cf9422838..428d01c26 100644 --- a/preview/astro.config.mjs +++ b/preview/astro.config.mjs @@ -3,7 +3,7 @@ import { defineConfig } from 'astro/config' import mdx from '@astrojs/mdx' import { satteri } from '@astrojs/markdown-satteri' import beautify from 'js-beautify' -import { globSync, statSync } from 'node:fs' +import { globSync, rmSync, statSync } from 'node:fs' import { availableParallelism } from 'node:os' import { fileURLToPath } from 'node:url' import { Worker } from 'node:worker_threads' @@ -71,6 +71,27 @@ function prettifyHtml() { } } +/** + * Playground pages (playground.astro, playground-*.astro) are local scratch + * pages — gitignored, and dropped from the build so a local `astro build` or a + * stray tracked copy never ships them. Runs before prettify-html (integration + * order), so the pages are not formatted just to be deleted. + * @returns {import('astro').AstroIntegration} + */ +function dropPlaygrounds() { + return { + name: 'drop-playgrounds', + hooks: { + 'astro:build:done': ({ dir, logger }) => { + const outDir = fileURLToPath(dir) + const files = globSync([`${outDir}playground.html`, `${outDir}playground-*.html`]) + for (const file of files) rmSync(file) + if (files.length > 0) logger.info(`Dropped ${files.length} playground page(s) from the build`) + }, + }, + } +} + // https://astro.build/config export default defineConfig({ // pages live at the package root (./pages) — all components/lib/data are @@ -142,6 +163,7 @@ export default defineConfig({ reloadDirs: [path('./public/preview')], }), mdx(), + dropPlaygrounds(), prettifyHtml(), ], markdown: { diff --git a/preview/pages/playground-categories.astro b/preview/pages/playground-categories.astro deleted file mode 100644 index b11f4a8ce..000000000 --- a/preview/pages/playground-categories.astro +++ /dev/null @@ -1,325 +0,0 @@ ---- -import ButtonGroup from '@ui/ButtonGroup.astro' -import DefaultLayout from '@shared/layouts/DefaultLayout.astro' -import Icon from '@ui/Icon.astro' -import Button from '@ui/Button.astro' -import Badge from '@ui/Badge.astro' -import Avatar from '@ui/Avatar.astro' -import AvatarList from '@ui/AvatarList.astro' -import PeopleAvatarList from '@components/demo/PeopleAvatarList.astro' -import Pagination from '@ui/Pagination.astro' -import Card from '@ui/Card.astro' -import CardBody from '@ui/CardBody.astro' ---- - - - -
-
- -

Categories

-
-
-
-
-
- - - - -
-
-
- -
-
- -
-
-
-
- -
-
- -
- -
-
- - -
-
- -
-
- -
-
-

Announcements

-

For company updates, system changes, or important notices that everyone should see.

-

Last post 2 days ago

-
-
- - - - - -
- -
-
-
-
-
- -
- - -
-
- -
-
- -
-
-

Marketing campaigns

-

Posts related to new campaigns, marketing strategies, and promotions.

-

Last post 1 day ago

-
-
- -
- -
-
-
-
-
- -
- - - - 12 followers -

Reports & analytics

-

Data-driven insights and performance reports across all departments.

-

Last post 5 days ago

-
-
- - - - -
- -
-
-
-
-
- -
- - - - 16 followers -

Events & webinars

-

Upcoming events, webinar recordings, and community meetups.

-

Last post 3 days ago

-
-
- - - - -
- -
-
-
-
-
- -
- - - - 9 followers -

Client success stories

-

Case studies and testimonials from our most satisfied customers.

-

Last post 1 week ago

-
-
- - - - -
- -
-
-
-
-
- -
- - - - 10 followers -

Team highlights

-

Spotlights, shoutouts, and stories from people across the team.

-

Last post 4 days ago

-
-
- - - - -
- -
-
-
-
-
- -
- - - - 26 followers -

Training & resources

-

Access to learning materials, tutorials, or resources for users and staff.

-

Last post 6 days ago

-
-
- - - - -
- -
-
-
-
-
- -
- - - - 6 followers -

Industry news

-

Trends, news, and commentary from around the industry landscape.

-

Last post 2 weeks ago

-
-
- - - - -
- -
-
-
-
-
-
- -
-
-

1 – 8 (8 total)

-
-
- -
-
-
diff --git a/preview/pages/playground-layout.astro b/preview/pages/playground-layout.astro deleted file mode 100644 index c6aab86b4..000000000 --- a/preview/pages/playground-layout.astro +++ /dev/null @@ -1,19 +0,0 @@ ---- -import DefaultLayout from '@shared/layouts/DefaultLayout.astro' -import Card from '@ui/Card.astro' -import CardBody from '@ui/CardBody.astro' -import CardTitle from '@ui/CardTitle.astro' ---- - - -
-
- - - Sandbox -

Edit this page to try layout options, components, and styles.

-
-
-
-
-
diff --git a/preview/pages/playground.astro b/preview/pages/playground.astro deleted file mode 100644 index 377e1d13d..000000000 --- a/preview/pages/playground.astro +++ /dev/null @@ -1,239 +0,0 @@ ---- -import Subheader from '@ui/Subheader.astro' -import DefaultLayout from '@shared/layouts/DefaultLayout.astro' -import ButtonList from '@ui/ButtonList.astro' -import Card from '@ui/Card.astro' -import CardHeader from '@ui/CardHeader.astro' -import CardBody from '@ui/CardBody.astro' -import ProgressSteps from '@ui/ProgressSteps.astro' -import Datepicker from '@ui/Datepicker.astro' -import FormGroup from '@ui/FormGroup.astro' -import Trending from '@ui/Trending.astro' -import CardTitle from '@ui/CardTitle.astro' ---- - - -
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - Button - Button - Button - Button - Button - - - Button - Button - Button - Button - Button - - - -
- -
- - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - -
- -
- - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. - -
- -
- - Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequuntur earum perferendis expedita suscipit quasi maiores quas sint harum dolor! Dolorem cumque autem error ea fuga. Ea excepturi temporibus officiis perspiciatis. - -
- -
- - -
- - - -
-
-
-
- -
- - - -
-
-

Basic datepicker

- - - - - - - - - -
-
-

Datepicker options

- - - - - - - - - -
-
-

Placement options

- - - - - - - - - -
-
-

Advanced options

- - - - - - - - - -
-
-

Inline datepicker

- {/* inline mode renders a calendar div with no backing text input — nothing to point `for` at */} - - - - - - -
-
-
-
-
-
- - - Cohort statistics -
-
- Total users -
- 25,784 - -
-
- -
- Average CSAT Score -
- 86.9 - -
-
- -
- Average response time -
- 7.2m - -
-
- -
- Total tickets -
- 51,960 - -
-
- -
- Resolution rate -
- 90.0% - -
-
- -
- Total cohorts -
- 10 - -
-
- -
- Avg. handling time -
- 14.1m - -
-
- -
- First contact resolution -
- 80.0% - -
-
- -
- Retention rate -
- 28.0% - -
-
-
-
-
-
-
-