Skip to content

Commit 0f635be

Browse files
Add prototype hub, vendored apps, and GitHub Pages preview workflow
1 parent 7ef35d6 commit 0f635be

1,495 files changed

Lines changed: 623564 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
name: prototype-contributor
3+
description: >-
4+
Guides designers through contributing to the OpenShift UX design repo (hub
5+
listings, manifests, hpux-prototypes embeds, MRs). When the user says
6+
"I need to add to the design repo", start by asking the intake questions
7+
below before editing files. Also use for "add a prototype", "register my
8+
prototype", "update the hub", "update the manifest", "set up my branch",
9+
"how do I contribute", or "open an MR" for this repository.
10+
---
11+
12+
# Prototype contributor
13+
14+
Help designers contribute to this design repository. **Prefer a short question-and-answer intake** so you know whether work is **new** or an **update** before you touch the tree.
15+
16+
## Intake: start here when they add to the design repo
17+
18+
When the user says **"I need to add to the design repo"** (or equivalent), **do not jump straight to edits.** Run through this intake, **one or a few questions at a time** so it stays conversational. Summarize answers before implementation.
19+
20+
### Step 0 — Branch sanity
21+
22+
Confirm they are on a branch (not `main`), or offer: `git checkout main && git pull && git checkout -b name/short-description` — see **Branch conventions** below.
23+
24+
### Step 1 — New or update?
25+
26+
Ask:
27+
28+
1. **Is this a brand-new listing/prototype in the hub, or an update to something already listed?**
29+
30+
### If **update existing**
31+
32+
Ask (skip what they already answered):
33+
34+
2. **Which entry?** — hub card title, `jiraKey`, team page, `prototypeUrl`, or path under `hpux-prototypes/`.
35+
3. **What changes?** — hub manifest only (`prototypes.manifest.json`), prototype code/assets, embed URL, copy/metadata (title, persona, Jira link), or several of these.
36+
4. **Jira** — does the ticket / fixVersion / workflow status need refreshing on the card? Run **`npm run sync:jira-manifest`** from `hub/` after manifest edits (needs `~/.jira-token`).
37+
38+
Then: locate the manifest entry (and code paths if any), apply edits, bump `updatedAt`, run checks from **Running locally** if relevant, draft commit + MR notes.
39+
40+
### If **brand new**
41+
42+
Ask (skip what they already answered):
43+
44+
2. **Product area** — which UX lane? (`teamId` must match an `id` in `teams` *or* `crossProducts` in the manifest, e.g. `rbac` for RBAC cross-lane listings; if missing, flag that a team or cross-product block may be needed first — coordinate maintainer / Matt per **When to ask for help**.)
45+
3. **Card title** — should match the linked Jira issue **`summary`** (hub cards mirror the ticket title).
46+
4. **What they’re shipping** — e.g. PatternFly prototype under `hpux-prototypes/` (embed link), static/site URL, OME/OSAC-style embed route, or **manifest-only** until hosted (`prototypeUrl: null`).
47+
5. **Jira** — real issue key and `https://redhat.atlassian.net/browse/…` or `https://issues.redhat.com/browse/…` (avoid using registry slugs as `jiraKey` when a real ticket exists).
48+
6. **Persona** (optional) — one line for the card; use **admin** not **administrator** per team wording norms.
49+
7. **Author** — full name; **updatedAt**`YYYY-MM-DD` for today or last meaningful change.
50+
51+
Then: add the `prototypes` entry (and register in hpux or wire URL/embed as needed), follow **Manifest structure** and repo layout, draft commit + MR.
52+
53+
### After intake
54+
55+
- Confirm **manifest path**: `hub/src/data/prototypes.manifest.json`.
56+
- For **hpux** screens: `hpux-prototypes/` app + registry; embed pattern `/embed/hpux-prototypes?prototype=<id>` when relevant.
57+
- Point to **Contributor guide** in the hub (`/contributing`) for long-form context.
58+
59+
## Repo orientation
60+
61+
This monorepo powers the **OpenShift UX Prototypes** hub (`hub/`). Listings are driven by:
62+
63+
```
64+
hub/src/data/prototypes.manifest.json
65+
```
66+
67+
PatternFly/console-style demos often live in **`hpux-prototypes/`** and are embedded from the hub. JTBD/research links for the home page live under `resourceLinks` in the same manifest.
68+
69+
Designers typically: work on a branch → change prototype and/or manifest → commit → open MR.
70+
71+
## Branch conventions
72+
73+
Create branches as: `name/short-description`
74+
75+
Examples:
76+
77+
- `joy/acm-cluster-overview`
78+
- `ethan/sovereign-cloud-onboarding`
79+
- `mansur/acs-vulnerability-dashboard`
80+
81+
Branch from default (usually `main`):
82+
83+
```bash
84+
git checkout main && git pull
85+
git checkout -b your-name/description
86+
```
87+
88+
## Folder structure (high level)
89+
90+
- **`hub/`** — prototype hub site (Vite), manifest under `hub/src/data/`.
91+
- **`hpux-prototypes/`** — shared PatternFly seed; prototypes under `src/app/prototypes/` with registry entries.
92+
93+
Group by feature or flow, not sprint folders.
94+
95+
## Running locally
96+
97+
From `hub/`:
98+
99+
```bash
100+
npm ci # first time or after dependency changes
101+
npm run sync:jira-manifest # pull Jira status + fix versions into the manifest (needs ~/.jira-token)
102+
npm run dev # local server with hot reload
103+
npm run build # production build → dist/
104+
```
105+
106+
From `hpux-prototypes/` when editing embeds: use that package’s README/scripts (webpack build is wired via hub `build:hpux` when needed).
107+
108+
## Manifest structure
109+
110+
Append to `prototypes` (and optionally `teams`). Example:
111+
112+
```json
113+
{
114+
"teamId": "acs",
115+
"title": "[UX Spec] Show vulnerabilities by namespace view",
116+
"persona": "Security analyst",
117+
"author": "Mansur Syed",
118+
"updatedAt": "2026-04-28",
119+
"jiraKey": "ROX-22407",
120+
"jiraUrl": "https://redhat.atlassian.net/browse/ROX-22407",
121+
"prototypeUrl": null
122+
}
123+
```
124+
125+
**Common fields:** `teamId`, `title` (Jira summary), `author`, `updatedAt`, `jiraKey`, `jiraUrl` (browse URL for the same issue), `prototypeUrl`. Optional: `description`, `persona`. **Do not** add manual `status` / `release`; run **`npm run sync:jira-manifest`** to fill `jiraIssueStatus` and `jiraIssueRelease`. If `jiraKey` / `jiraUrl` are missing or invalid, the hub shows a **Jira ticket needed** warning on the card.
126+
127+
Valid **`teamId`** values come from the manifest `teams` array (`acs`, `acm`, `virtualization`, …) **or** a `crossProducts` `id` when the prototype belongs on a cross-lane listing (e.g. **`rbac`** for ACM RBAC fleet/tenant/empty-state builds). New product areas need a `teams` entry and icon from `hub/src/iconImports.tsx`; cross-lanes are already defined under `crossProducts` and use the hub route `/cross-product/<id>`.
128+
129+
## Fullscreen embed versions (hub top bar)
130+
131+
All hub **fullscreen** prototype tabs (`/embed/…`) show a **version control** on the right of the top bar, next to the back link. If only one build exists, the UI shows the text **Latest version** (read-only). If multiple builds exist, it is a dropdown.
132+
133+
### When you ship a new hpux-prototypes iteration (same feature, new registry folder)
134+
135+
1. Add or copy the prototype under `hpux-prototypes/src/app/prototypes/<id>/` and register it in the app registry (same as today).
136+
2. In **`hub/src/App.tsx`**, find `HPUX_PROTOTYPE_VERSION_GROUPS`. Either:
137+
- **Add a row** to an existing group’s `versions` array (put the newest first; label it with `(latest)`), or
138+
- **Create a new group** with `backTo`, `backLabel`, and `versions` if this is a new multi-build feature.
139+
- *Existing groups:* Observability alerting (`shiri-alerting-ui-v2` / `shiri-alerting-ui`) and RBAC cross-lane (`fleet-admin-rbac`, `fleet-admin-rbac-v1.1`, `tenant-admin-access`, `acm-empty-states`) — embed “back” goes to `/cross-product/rbac`. Extend those lists when you add siblings; don’t duplicate the in-iframe toolbar (it was removed from `hpux-prototypes`).
140+
3. Update **`hub/src/data/prototypes.manifest.json`**: one card per feature is preferred when versions are grouped — set `prototypeUrl` to `/embed/hpux-prototypes?prototype=<id>` using the **default (latest)** registry id, refresh title/description, bump `updatedAt`, adjust `jiraKey` / `jiraUrl` if needed, then run **`npm run sync:jira-manifest`**.
141+
4. Run hub locally and confirm the embed: back link, dropdown labels, and iframe all match.
142+
143+
### Other embed families (not hpux-prototypes)
144+
145+
- **RHACS** (`/embed/rhacs-ux-prototypes`): surfaces are listed in `RHACS_EMBED_VERSION_OPTIONS` in `App.tsx`; add or reorder there if a new surface should appear in the dropdown.
146+
- **OME** (`/embed/ome/:mode`): modes are in `OME_EMBED_VERSION_OPTIONS`.
147+
- **Single-build embeds** (OCP5, list-filter, OSAC, …): no code change when there is still only one build — the bar already shows **Latest version**.
148+
149+
## Committing and pushing
150+
151+
```bash
152+
git add .
153+
git commit -m "Add vulnerability dashboard prototype for ACS"
154+
git push -u origin your-name/description
155+
```
156+
157+
Commit messages: short, state **what** changed.
158+
159+
## Opening a pull request
160+
161+
Coach them to include:
162+
163+
1. **What** — one sentence on what the design/prototype shows
164+
2. **Why** — Jira or design question
165+
3. **Screenshot or preview link** — so others can scan the PR without running everything locally
166+
167+
**Merge policy:** no required approvers — they can merge when ready (after CI passes if the pipeline is configured). Optionally @mention the area maintainer from manifest `teams` for a voluntary design pass.
168+
169+
## Quick reference — decision tree
170+
171+
- **Intake phrase** (“I need to add to the design repo”) → run **Intake** questions first.
172+
- **Share before merge** → push branch → GitHub Actions publishes hub preview to GitHub Pages (see workflow) + optional draft PR link.
173+
- **New prototype** → branch → implement/register → manifest entry → PR.
174+
- **Update existing** → branch → edit listed files + bump `updatedAt` → PR.
175+
- **New team/area** → add `teams` entry, align `id`/`maintainer`, then prototypes.
176+
- **Hosted outside repo** → deploy elsewhere, set `prototypeUrl` in manifest.
177+
178+
## Sharing a preview (no merge required)
179+
180+
Designers can share work **from their branch** without waiting for `main`:
181+
182+
1. **Push the branch to GitHub**`git push -u origin …`.
183+
2. **Hub preview URL (no local build, no Netlify)** — Repo workflow **Hub branch preview (GitHub Pages)** (`.github/workflows/hub-github-pages-preview.yml`) runs on push, builds `hub/` with the right `BASE_PATH`, and deploys to the `gh-pages` branch under `preview/<branch-slug>/`. Tell them to open **Actions → latest run → job summary** for the exact link. URL pattern: `https://<owner>.github.io/<repo>/preview/<slug>/` (slug = branch name, lowercased, sanitized). **Org setup:** GitHub Pages must be enabled on branch `gh-pages` / root (Settings → Pages) once per repo.
184+
3. **Pull request** — Draft or normal PR from the branch for review threads and diffs; optional alongside the Pages preview.
185+
4. **Screenshots / short recording** — For quick async feedback without a live site.
186+
187+
Merge to `main` only when they want the change in the shared default branch / production hub — not as a prerequisite for showing progress.
188+
189+
## When to ask for help
190+
191+
Git/CI/build issues: troubleshoot in Cursor. **Area ownership**, new `teamId`, or stakeholder approval: area lead or Matt Carleton.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Publishes the hub (Vite app in hub/) to GitHub Pages under preview/<branch-slug>/ on every push.
2+
# Requires GitHub Pages "Deploy from branch" → branch gh-pages, folder / (root).
3+
# Preview URL pattern: https://<owner>.github.io/<repo>/preview/<slug>/
4+
name: Hub branch preview (GitHub Pages)
5+
6+
on:
7+
push:
8+
branches: ["**"]
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
concurrency:
15+
group: hub-pages-preview-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build-and-deploy-preview:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Branch slug for preview path
26+
id: slug
27+
shell: bash
28+
run: |
29+
s=$(echo "${GITHUB_REF_NAME}" | tr "[:upper:]" "[:lower:]" | sed -e "s/[^a-z0-9._-]/-/g" -e "s/-\+/-/g" -e "s/^-//" -e "s/-$//")
30+
if [[ -z "$s" ]]; then s="branch"; fi
31+
echo "slug=$s" >> "$GITHUB_OUTPUT"
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: "20"
37+
cache: npm
38+
cache-dependency-path: hub/package-lock.json
39+
40+
- name: Install and build hub
41+
working-directory: hub
42+
env:
43+
BASE_PATH: /${{ github.event.repository.name }}/preview/${{ steps.slug.outputs.slug }}/
44+
run: |
45+
npm ci
46+
npm run build
47+
48+
- name: Deploy preview to gh-pages
49+
uses: peaceiris/actions-gh-pages@v4
50+
with:
51+
github_token: ${{ secrets.GITHUB_TOKEN }}
52+
publish_dir: hub/dist
53+
destination_dir: preview/${{ steps.slug.outputs.slug }}
54+
keep_files: true
55+
user_name: github-actions[bot]
56+
user_email: github-actions[bot]@users.noreply.github.com
57+
58+
- name: Write preview URL to job summary
59+
shell: bash
60+
run: |
61+
owner="${{ github.repository_owner }}"
62+
repo="${{ github.event.repository.name }}"
63+
slug="${{ steps.slug.outputs.slug }}"
64+
{
65+
echo "## Hub preview published"
66+
echo ""
67+
echo "**Site:** https://${owner}.github.io/${repo}/preview/${slug}/"
68+
echo ""
69+
echo "Path is derived from your branch name (lowercased, special characters → hyphens). Each push to this branch updates the same preview."
70+
} >> "$GITHUB_STEP_SUMMARY"

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@
66
ehthumbs.db
77
Thumbs.db
88
_site/*
9+
10+
# OME prototype — dependencies and build output (see ome-console/VENDOR.md)
11+
ome-console/node_modules/
12+
ome-console/dist/
13+
14+
# OSAC demo — dependencies and build output (see osac-demo/VENDOR.md)
15+
osac-demo/node_modules/
16+
osac-demo/dist/
17+
18+
# HPUX Prototypes (kuklas) — vendored app; see hpux-prototypes/VENDOR.md
19+
hpux-prototypes/node_modules/
20+
hpux-prototypes/dist/
21+
922
.jekyll-cache
1023
.sass-cache
1124
Gemfile.lock

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
source "https://rubygems.org"
22
gem "github-pages", group: :jekyll_plugins
3-
gem "just-the-docs"
3+
gem "just-the-docs"
4+
gem "csv"
5+
gem "base64"
6+
gem "bigdecimal"
7+
gem "webrick"

_plugins/ruby_compat.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
unless Object.method_defined?(:tainted?)
2+
class Object
3+
def tainted?
4+
false
5+
end
6+
7+
def taint
8+
self
9+
end
10+
11+
def untaint
12+
self
13+
end
14+
15+
def freeze
16+
self
17+
end unless method_defined?(:freeze)
18+
end
19+
end

hpux-prototypes/.cursor/mcp.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"mcpServers": {
3+
"context7": {
4+
"url": "https://mcp.context7.com/mcp"
5+
},
6+
"patternfly-docs": {
7+
"command": "npx",
8+
"args": ["-y", "@jephilli-patternfly-docs/mcp@latest"],
9+
"description": "PatternFly React development rules and documentation"
10+
}
11+
}
12+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
description: Use direct Jira REST API (Red Hat) when working with Jira; Atlassian MCP is blocked by org policy.
3+
alwaysApply: true
4+
---
5+
6+
# Jira — Direct REST API (Red Hat)
7+
8+
## Policy
9+
10+
The Atlassian MCP plugin is blocked by Red Hat organization policy. **Do not rely on Atlassian MCP** for Jira. Use the **direct Jira Cloud REST API** with `curl` and the workspace helper **`scripts/jira-api.sh`**.
11+
12+
## Connection
13+
14+
- **Base URL:** `https://redhat.atlassian.net/rest/api/3`
15+
- **Auth:** HTTP Basic Auth — email **`fkargbo@redhat.com`** + API token read from **`~/.jira-token`** (file mode `600`, never committed).
16+
- **Browse URLs for tables:** `https://issues.redhat.com/browse/{KEY}`
17+
18+
## Search (important)
19+
20+
- **Use:** `POST /rest/api/3/search/jql` with a JSON body (`jql`, `maxResults`, optional `fields`, `nextPageToken`, etc.).
21+
- **Do not use** the legacy **`GET /rest/api/3/search`** JQL query pattern; it has been removed from Jira Cloud.
22+
23+
After sourcing the script (`source scripts/jira-api.sh`), helpers are:
24+
25+
| Function | Purpose |
26+
|----------|---------|
27+
| `jira_search "<JQL>"` [maxResults] | Search issues via `POST .../search/jql` |
28+
| `jira_get_issue "KEY"` | Get one issue |
29+
| `jira_create_issue '<json>'` | Create an issue |
30+
| `jira_edit_issue "KEY" '<json>'` | Update fields on an issue |
31+
| `jira_transition_issue "KEY" '<json>'` | Apply a workflow transition |
32+
| `jira_get_transitions "KEY"` | List available transitions |
33+
| `jira_add_comment "KEY" "text"` | Add a comment (ADF body) |
34+
| `jira_lookup_user "name"` | User search (`/user/search`) |
35+
| `jira_link_issues "type" "KEY-1" "KEY-2"` | Create issue link (`KEY-1` inward, `KEY-2` outward) |
36+
37+
Or run: `scripts/jira-api.sh jira_search '...'` (same names as functions).
38+
39+
## UXD custom fields (reference)
40+
41+
| Field | ID | Type / notes |
42+
|-------|-----|----------------|
43+
| Story Points | `customfield_10028` | number — Stories only |
44+
| Size | `customfield_10795` | select: XS / S / M / L / XL — Epics only |
45+
| Activity Type | `customfield_10464` | select: Orient / Explore / Make / Monitor / Consult / Enable |
46+
| Epic Link | `customfield_10014` | string — epic issue key |
47+
48+
## Agent output conventions
49+
50+
- Present issue lists as **markdown tables** with a **Summary** column and a **Key** column linking to `https://issues.redhat.com/browse/{KEY}`.
51+
- On **401 Unauthorized**, tell the user to regenerate the API token at https://id.atlassian.com/manage-profile/security/api-tokens and update `~/.jira-token` (permissions `600`).

0 commit comments

Comments
 (0)