From b1343a5092d5044a9f79d9eb1662d38a3f3b044f Mon Sep 17 00:00:00 2001 From: nnkogift Date: Mon, 26 Oct 2026 20:54:27 +0300 Subject: [PATCH] feat: add a minimal landing page and refresh the docs styling - Add a landing page with a headline, one screenshot and three points - Move the intro page off the site root (no more slug: /) - Tighten the docs theme: headings, admonitions, sidebar, search hint - Drop the version history about saving data from the intro, safety page and FAQ - Ignore .taste-skill output Co-Authored-By: Claude Sonnet 5.5 --- .gitignore | 1 + AGENTS.md | 2 +- docs/help/troubleshooting-and-faq.md | 2 +- docs/introduction/is-it-safe-on-production.md | 16 +---- .../what-is-program-rules-playground.md | 3 +- src/css/custom.css | 50 ++++++++++++++ src/pages/index.module.css | 60 ++++++++++++++++ src/pages/index.tsx | 69 +++++++++++++++++++ 8 files changed, 186 insertions(+), 17 deletions(-) create mode 100644 src/pages/index.module.css create mode 100644 src/pages/index.tsx diff --git a/.gitignore b/.gitignore index 941fab9..c218475 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ build *.log .DS_Store scripts/screenshots/.output +.taste-skill diff --git a/AGENTS.md b/AGENTS.md index d2efff5..ed45e4d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,7 +32,7 @@ pnpm screenshots # Playwright screenshots, see docs-contributing/SCREENSHOTS.m - Do not invent app behaviour. If a fact is not in the app repo or the Linear plan, write `TODO(verify)`. - Link pages with relative file paths so broken links fail the build. - Screenshots come from `pnpm screenshots`, never by hand. Reference them by the stable path in `scripts/screenshots/manifest.mts` (`./img/.png`), and keep app locators in `scripts/screenshots/selectors.mts`. -- Docs are served at the site root (`routeBasePath: '/'`); the intro page has `slug: /`. +- Docs are served at the site root (`routeBasePath: '/'`); the landing page is `src/pages/index.tsx`. ## Conventions diff --git a/docs/help/troubleshooting-and-faq.md b/docs/help/troubleshooting-and-faq.md index b6a6559..49717ca 100644 --- a/docs/help/troubleshooting-and-faq.md +++ b/docs/help/troubleshooting-and-faq.md @@ -112,7 +112,7 @@ For **SHOWWARNING**, **SHOWERROR**, **WARNINGONCOMPLETE** and **ERRORONCOMPLETE* ### Does the app save anything? -Not from version 0.1.0-alpha.10. From that version, the only request that sends form data is **Verify with server**, which uses `importMode=VALIDATE`, a dry run, apart from files chosen in file or image fields, which upload at once. Versions 0.1.0-alpha.9 and earlier save real data when you select **Save event** or **Register tracked entity**, so upgrade if you still run one. See [Is it safe on production?](../introduction/is-it-safe-on-production.md). +No. The only request that sends form data is **Verify with server**, which uses `importMode=VALIDATE`, a dry run, apart from files chosen in file or image fields, which upload at once. See [Is it safe on production?](../introduction/is-it-safe-on-production.md). ### Why is a rule firing but labelled "Out of scope"? diff --git a/docs/introduction/is-it-safe-on-production.md b/docs/introduction/is-it-safe-on-production.md index aa638ba..400e7c7 100644 --- a/docs/introduction/is-it-safe-on-production.md +++ b/docs/introduction/is-it-safe-on-production.md @@ -1,22 +1,16 @@ --- title: 'Is it safe to use on production?' -description: 'Explains why version 0.1.0-alpha.10 and later can be used against a production server: no data or metadata is saved, the only data check is a tracker dry run, and files chosen in file fields are uploaded as unused file resources.' +description: 'Explains why the app can be used against a production server: no data or metadata is saved, the only data check is a tracker dry run, and files chosen in file fields are uploaded as unused file resources.' sidebar_position: 2 --- # Is it safe to use on production? -Yes, from version 0.1.0-alpha.10. From that version on, Program Rules Playground never saves tracker data, events, enrollments or metadata on your DHIS2 server, and it never sends notifications. You can open any program, type any values and press any button without creating, changing or deleting records. +Yes. Program Rules Playground never saves tracker data, events, enrollments or metadata on your DHIS2 server, and it never sends notifications. You can open any program, type any values and press any button without creating, changing or deleting records. The one exception is a file you choose in a file or image field. See [File and image fields](#file-and-image-fields). -:::warning Versions 0.1.0-alpha.9 and earlier save real data - -In versions 0.1.0-alpha.0 to 0.1.0-alpha.9, the save buttons on the forms (**Save event** and **Register tracked entity**) post your values to the server as a real tracker import. They create events, enrollments and tracked entities. If you still run one of these versions, don't use it on a production server, and upgrade to 0.1.0-alpha.10 or later. The App Management app shows the installed version. - -::: - -This page explains why, and lists every request that version 0.1.0-alpha.10 and later sends. +This page explains why, and lists every request the app sends. ## The short version @@ -69,10 +63,6 @@ Don't choose real or sensitive files in the app on a production server. Use a te The app adds no authorities of its own and cannot do more than the user who runs it. For example, if you can't capture data in the selected organisation unit, the server rejects the **Verify with server** dry run with the same kind of error a real import would get. See [Requirements and user authorities](../getting-started/requirements-and-user-authorities.md). -## If a future version saves data - -From 0.1.0-alpha.10, the app has no way to save data. If a later version saves data again, this page and the [release notes](../help/release-notes.md) say so, and explain how saving is kept separate from testing. - ## Related pages - [Check rules against the server](../using-the-app/check-rules-against-the-server.md) diff --git a/docs/introduction/what-is-program-rules-playground.md b/docs/introduction/what-is-program-rules-playground.md index 25bccff..eaaa0c0 100644 --- a/docs/introduction/what-is-program-rules-playground.md +++ b/docs/introduction/what-is-program-rules-playground.md @@ -1,7 +1,6 @@ --- title: 'What is Program Rules Playground' description: 'Program Rules Playground is a DHIS2 app for testing and debugging program rules against your real metadata, without saving any data.' -slug: / sidebar_position: 1 --- @@ -11,7 +10,7 @@ Program Rules Playground is an open-source DHIS2 app for testing and debugging p You pick a program, fill in its forms against your real metadata, and watch the program rules run as you type. Fields hide, show, become mandatory or receive values, and the **Feedback** and **Indicators** cards list the messages your rules produce. A rules panel next to the form shows which rules fired, in what order, and which fields they read and changed. -The app supports DHIS2 2.40 to 2.43. From version 0.1.0-alpha.10 it saves nothing to your server. See [Is it safe to use on production?](./is-it-safe-on-production.md) for the details. +The app supports DHIS2 2.40 to 2.43. See [Is it safe to use on production?](./is-it-safe-on-production.md) for what the app sends to your server. ## Who it is for diff --git a/src/css/custom.css b/src/css/custom.css index d29c225..d986f7a 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -19,3 +19,53 @@ --ifm-color-primary-lighter: #7bc57f; --ifm-color-primary-lightest: #94cf97; } + +/* Search shortcut hint: the default keycap fails contrast. */ +.navbar kbd { + color: var(--ifm-font-color-base); + background: var(--ifm-color-emphasis-200); + border-color: var(--ifm-color-emphasis-500); +} + +/* Docs chrome: heavier headings, flat surfaces, framed screenshots. */ +:root { + --ifm-heading-font-weight: 800; + --ifm-h1-font-size: 2.75rem; + --ifm-global-radius: 6px; + --ifm-navbar-shadow: none; + --ifm-code-font-size: 92%; +} + +.markdown > h1 { + letter-spacing: -0.03em; + line-height: 1.05; +} + +.markdown > h2 { + letter-spacing: -0.02em; + margin-top: 2.5rem; +} + +.markdown img { + border-radius: var(--ifm-global-radius); + background: var(--ifm-color-emphasis-100); +} + +.theme-admonition { + box-shadow: none; + border-left-width: 6px; +} + +.menu__link--active:not(.menu__link--sublist) { + font-weight: 700; + background: var(--ifm-color-emphasis-200); +} + +.navbar { + border-bottom: 0; + background: var(--ifm-background-color); +} + +.table-of-contents__link--active { + font-weight: 700; +} diff --git a/src/pages/index.module.css b/src/pages/index.module.css new file mode 100644 index 0000000..ecb0a2e --- /dev/null +++ b/src/pages/index.module.css @@ -0,0 +1,60 @@ +.main { + max-width: 1100px; + margin: 0 auto; + padding: 4rem 1.25rem 5rem; +} + +.hero { + max-width: 44rem; + margin-bottom: 3rem; +} + +.title { + font-size: clamp(2.25rem, 5vw, 3.75rem); + line-height: 1.05; + letter-spacing: -0.03em; + margin-bottom: 1rem; +} + +.lede { + font-size: 1.25rem; + line-height: 1.5; + margin-bottom: 1.75rem; +} + +.actions { + display: flex; + flex-wrap: wrap; + gap: 0.75rem; +} + +.shot { + display: block; + width: 100%; + height: auto; + border-radius: var(--ifm-global-radius); + background: var(--ifm-color-emphasis-100); +} + +.points { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 2rem; + margin-top: 3rem; +} + +.pointTitle { + font-size: 1.25rem; + margin-bottom: 0.5rem; +} + +@media (max-width: 800px) { + .main { + padding-top: 2.5rem; + } + + .points { + grid-template-columns: 1fr; + gap: 1.5rem; + } +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..ec49c5c --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,69 @@ +import React from 'react'; +import Link from '@docusaurus/Link'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import Layout from '@theme/Layout'; +import styles from './index.module.css'; + +const POINTS = [ + { + title: 'See rules run as you type', + text: 'Fields hide, show, become mandatory or receive values, and each one shows a badge for the last effect a rule had on it.', + }, + { + title: 'Know why a rule fired', + text: 'The Rules, Trace and Graph tabs show which rules apply, how each was evaluated and which fields they read and change.', + }, + { + title: 'Check against the server', + text: 'Verify with server runs a dry run of your values on your DHIS2 server. The app supports DHIS2 2.40 to 2.43.', + }, +]; + +export default function Home(): React.JSX.Element { + const shot = useBaseUrl('/app-hub/01-event-form.png'); + + return ( + +
+
+

Test and debug DHIS2 program rules

+

+ Program Rules Playground is an open-source DHIS2 app. Fill in a form against your real + metadata and watch the rules run. +

+
+ + Get started + + + What is it? + +
+
+ + An event form in Program Rules Playground with effect badges on the fields and the Rules panel listing the rules that fire. + +
+ {POINTS.map((point) => ( +
+

{point.title}

+

{point.text}

+
+ ))} +
+
+
+ ); +}