Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s

This commit is contained in:
huncode committed 2026-10-27 15:19:49 +03:00
1 parent 99c848189e
commit 12562baeb5
2040 files changed
+184656 -181

No files matched your search

+139
View File
@@ -0,0 +1,139 @@
# ProgCode — designer brief and identity/UI-kit proposal
27.10.2026, Europe/Moscow · `/root/designer` · **PROPOSAL / NOT A PASS**.
Contract read: `/Users/gavrilovdev/tmp/pupline/site-restoration-status/design-system/brief-and-acceptance-contract.json`. Real cases: [content-cases.md](content-cases.md). Source baseline inspected: Git `8c58a54f5b45d5f5dc95e294f34d4df640342ac2` plus the explicitly separate in-progress analytics changes in layout/Catalog/Metrika. This proposal edits no production app/lib/data/public/styles. Previous V2 reviews are historical content/layout context, not acceptance of this redesign.
## 1. Audience, purpose and present identity
The actual corpus is 14 historical publications: six D articles (Tilix interview, Vibe.d, GC, CTFE, regex wrapper and DMD Windows), three Bitrix recipes, one JavaScript/webpack recipe, two Windows/browser notes, one PHP TLS note and one greeting. There is no general IT news feed, storefront, English edition or active contact service to invent.
Two jobs dominate: **solve a concrete programming problem** (find the correct section/code/version boundary) and **understand a mechanism** (read a 19-minute interview or long D explanation). A third, small utility job is checking a JSON fragment. Retention means a relevant next article, a recoverable search and a comfortable return visit; no popup, fabricated popularity, forced registration, endless scroll or sticky promotional bar.
Keep the useful paper/ink/orange editorial character, compact `progcode_` wordmark idea, topic/date metadata and explanatory diagrams. Improve the missing native identity system, inconsistent surface-dependent contrast, overly wide 810px prose column, unowned global CSS, and absence of real themed component contracts. The existing `icon.svg` text-based code glyph/teal tile is not the proposed new identity.
**Direction: “Инженерная заметка”.** Quiet paper, clear technical hierarchy, one warm cursor accent, restrained monospace for controls/code and a serif reading voice. It should look like the same journal on home, a technical article, an error page and the JSON desk.
## 2. Native identity proposal
Recommended concept: **P + cursor**, a compact ProgCode initial with a separate warm underscore, derived from the current `progcode_` identity. This is our original simple vector construction, not a claim of trademark uniqueness. The symbol has one closed counter and a 2px stem at its native 16px size; no hairlines, emoji, embedded font, gradient or tiny `</>` label.
Reviewable files, all **documentation-only concepts**:
- `proposals/favicon-concept-{16,32,48}.svg`: native 16-unit geometry rendered at the declared actual size. Square dark tile, warm-paper P, peach cursor. Same silhouette across scales. `favicon-concept-180.svg` is the touch concept with generous internal space.
- `proposals/logo-concept-light.svg` and `logo-concept-dark.svg`: native SVG paths for the symbol and custom monoline `progcode` wordmark plus cursor. No font dependency. Header width target 178–224px desktop, 168–178px on 320px mobile; minimum wordmark display width 160px. Below that use symbol plus accessible brand name, rather than shrinking lettering into noise.
- `proposals/identity-preview.html`: actual light/dark composition and native-size 16/32/48 row; not the finished UI-kit or production page.
- `proposals/evidence/identity-preview-1440.png`: actual browser pixels opened by designer; concept review only.
The 16px mark was personally inspected at its real browser size: P remains readable; the underscore is distinct. At 32/48 the same construction stays clean. On dark chrome the tile blends into the background but the high-contrast P/cursor remain visible; do not remove the tile from only one variant or add a distracting light outline. Pixel checks in real browser tabs, light/dark OS chrome and forced colors remain implementation acceptance conditions, not a claim that the concept screenshot tested OS integration.
Logo use: one home link with accessible name “ProgCode — главная”; decorative SVG inside it is `aria-hidden`, preventing duplicate announcements. No logo-only mystery navigation. Symbol can be used for favicon/touch icon, not as an unlabeled replacement for the article navigation. Preserve the textual page title in bookmarks and tab titles.
Implementation deliverables after decisions: SVG favicon with fixed high-contrast symbol, PNG 16/32/48, ICO containing those sizes, touch PNG180 and metadata references. Export from vector master; inspect exported binaries at 1×, not only scaled artboards. Final assets should be inside the brand owner, not copied independently into components. If CD rejects the custom path wordmark's weight, keep the current bold/regular typographic rhythm and revise only the vector wordmark; the icon can be evaluated separately.
## 3. Semantic colour system
Do not expose `orange500` as the public API of every component. Components consume purpose tokens. Current `--muted:#6e7168` is approximately 4.02:1 on the soft panel, so “it passes on the page” is insufficient.
| Semantic token | Light | Dark | Role / comfort |
|---|---|---|---|
| `bg.canvas` | `#f6f4ef` | `#1c211e` | Warm page; dark is near-black, not maximum contrast glare. |
| `bg.surface` | `#fffefa` | `#252c27` | Inputs, component/demo panels, distinct from canvas. |
| `bg.subtle` | `#eae7de` | `#2c342e` | TOC/related support area; does not compete with article. |
| `text.primary` | `#242521` | `#eeeee5` | Reading text, headings. |
| `text.secondary` | `#62665c` | `#b2b9ae` | Dates, captions, TOC; checked on canvas AND panels. |
| `link.default` / `focus.ring` | `#a13e20` | `#f1a17d` | Warm accent. Links underlined; focus 3px + 3px offset. |
| `link.visited` | `#715687` | `#c5b3ec` | Helps return visitors distinguish read source links; not applied to brand/controls. |
| `border.subtle` | `#d8d8cd` | `#465249` | Decorative dividers, not sufficient alone for input boundaries. |
| `border.control` | `#7d8577` | `#829184` | Controls and table region boundaries. |
| `action.primary.bg / text` | `#242521 / #fffefa` | `#eeeee5 / #1c211e` | Strong, rare action: format JSON, search recovery. |
| `code.bg / text` | `#202621 / #e0e7d8` | `#141a16 / #e0e7d8` | Stable code contrast; no neon syntax confetti. |
| `feedback.success.bg / text` | `#e6eee6 / #276345` | `#223a2b / #b4dcbd` | “JSON корректен” + wording, never colour alone. |
| `feedback.error.bg / text` | `#f6e6df / #942f24` | `#4b2b25 / #ffd0c1` | Specific parser error + state title. |
Calculated sRGB contrast proposals are in `proposals/contrast-proposal.json`: body ≈14:1 both themes; secondary 5.34:1 light canvas; link 5.92:1 light canvas; dark link 7.88:1; success/error text pairs ≥6:1. This covers those pairs only; final candidate must check every actual pairing including surface, hover, selected and control borders. Large text minimum 3:1, ordinary/body/caption 4.5:1, meaningful UI boundary/focus 3:1. Do not “pass” faint TOC by calling it decorative.
Topic labels use the same accent and readable text, not six unrelated palettes. Selected topic has visible border/weight and `aria-pressed`; no colour-only state. Existing diagrams retain original SVG colours on a deliberate light figure well in dark mode; **no invert/filter**. Native raster retains max native width 435px and responsive max-width. Final illustrator checks whether the surrounding frame needs a dark neutral border; no repainting source pixels.
Theme follows `prefers-color-scheme` initially, with an explicit labeled two/three-state control (“Системная”, “Светлая”, “Тёмная”). Persist only theme preference locally; no forced registration or claim of data synchronization. Keep same layout/content across themes. Respect forced colors and reduced motion. No animation on theme change that delays reading.
## 4. Typography and layout contracts
- **Reading**: Georgia / Times New Roman / serif, desktop 19px/1.72; narrow 18px/1.72 (try actual 320px before shrinking). Prose max-width `68ch`, capped at 740px. Target median 55–80 actual characters per desktop paragraph line, including Russian; CSS `ch` alone does not establish this. On 320/390, the physical line is naturally shorter: preserve 16px/20px gutters and 18px legibility rather than forcing 55 chars through tiny type.
- **UI/headings**: Arial / Helvetica / sans-serif, no remote font dependency. H1 desktop clamp40–58px, narrow30–36px; 1.12 line height. Use actual Windows 79-character and TLS 73-character headings: no line clamp, fixed height or hidden suffix. Typography hierarchy comes from scale/spacing/weight, not all-caps body text.
- **Code/metadata**: system monospace. Code 14px/1.65 desktop, 13px narrow minimum. Metadata 12px/1.5; cap tracking for short labels only. Never apply smart punctuation or hyphenation to code, URLs, file paths or copy buffers.
- **Spacing**: 4/8/12/16/24/32/48/64px scale. Text paragraph gap ≈1.1em; major sections 40–48px. Short 301-character greeting must not inherit an enormous cover/TOC or full-height empty article body.
- **Grid**: shell ≤1200px. Desktop reading rail 176–200px + 32–40px gap + ≤740px body. Header/deck align with body. At ≤950px contents moves above body as a genuine native details disclosure. On 320px, header row1 brand+theme; row2 four real nav links with wrapping/gaps and ≥44px interaction height, no horizontal nav trap. Privacy/UI-kit live in footer, not extra cramped top-nav items.
- **Code/table access**: keep unwrapped code in a named focusable scroll region. Table inner min-width620px inside max-width100% region, headers intact, touch/keyboard access, subtle “Прокрутите таблицу” affordance only when needed. No global `overflow-x:hidden`. Preserve existing anchors/IDs and target scroll offset, visible hash landing.
- **Motion**: none needed for reading. Smooth anchor scrolling allowed only with reduced-motion opt-out; no parallax/animated cursor/blinking brand.
## 5. Personal UI-kit: real consumers and states
Each listed primitive must be consumed by the product; avoid a demo-only component graveyard. Defaults are semantic and accessible; rendering framework stays Next/React.
| Component / owner | Real consumer | States / checks that matter |
|---|---|---|
| `Brand` shared/ui | Masthead/footer/404 | light/dark, full/symbol, native favicon sizes, accessible home label. |
| `Button`, `IconButton` shared/ui | JSON actions, reset, theme | default/hover/focus/active; disabled only when action truly unavailable; icon buttons labeled, ≥44px. |
| `TextLink` shared/ui | prose sources/resources/related | default/visited/hover/focus, external indication only with a useful accessible label; no forced new tab. |
| `Field`, `Textarea`, `Hint` shared/ui | journal search/JSON | label, input, focused, parser error association; placeholder never the only label. |
| `StatusMessage` shared/ui | search/JSON/copy | empty/success/error/live status; do not announce full 1MB code every keystroke. |
| `ScrollRegion` shared/ui | code/table/results | keyboard focus, overflow left/right, touch, no-overflow fallback, accessible name. |
| `Prose` shared/ui/style | full article/about/privacy | headings/lists/quotes/inline code/figcaption; no body rewriting. |
| `ArticleMeta`, `ArticleListItem` entities/article | home/catalog/taxonomy/related | short/long/RU+EN/code titles, historical date, unavailable reading time omitted rather than fabricated. |
| `ArticleFigure` entities/article | CTFE/GC/Bitrix/Vibe | alt/caption/media loading failure; native raster size; exact historical diagram payload. |
| `JournalSearch`, `TopicFilter` features | #journal + search/demo | input+topic combination, 3 Bitrix/6 D matches, no results/reset; preserve query client-side without sending it in custom analytics. |
| `ArticleContents` feature + `ArticleReader` widget | Tilix/Vibe/GC/code | narrow disclosure, wide sticky rail, real section IDs, keyboard jump/return, long TOC viewport. |
| `JsonWorkbench` feature/widget | /tools and UI-kit | empty/valid/compact/error/copy success+denied; full data untouched, no fabricated download event. |
| `SiteHeader`, `SiteFooter`, `ReadingRoutes`, `RelatedReading` widgets | all real pages | 320/390/1440; four real header links; semantic related categories, no popularity fiction. |
Do not add Skeleton, Modal, Login, Carousel, PricingCard, SubscriptionForm or CommentBox just to inflate the kit. No real async fetch is needed for static article browsing. Content-missing page is a proper 404, not a generic spinner.
## 6. Real page/demo compositions
1. **Home**: native Brand; compact editorial intro; existing CTFE lead with actual CTFE-overview; practical Bitrix/TLS recipe list; three real reading routes; full searchable 14-entry index; JSON desk link. On 320, the search route is visible via header “Статьи” without traversing all lead content. No invented featured author or publication frequency.
2. **Catalog/search**: reuse actual home #journal for search; taxonomy `/category/dlang/` etc consumes same list item. Search “Bitrix” =>3, D filter=>6; combination zero => helpful reset. Demo must include TLS RU/EN title and full Windows 79-char entry; never substitute short marketing headings.
3. **Long article**: actual Tilix 19-minute body with its contents/section IDs and source attribution; Vibe with the Diet paragraph; GC with both diagrams/caption. Reading width and TOC must be verified in light/dark. The 301-char greeting separately tests the short-content case. Legacy destinations remain equivalent full content.
4. **Technical article**: actual D/PHP module with 89-character code line, CTFE comparison table, Bitrix FileInput native preview+diagram. Copy may be added only if complete code selection/Clipboard denial is handled. Layout cannot truncate symbols to fit a screenshot.
5. **Service pages**: `/about/` purpose/actual authorship/contact limitations; `/privacy/` clear real analytics disclosure; `/resources/` justified primary references; true `/404` with archive/search recovery. No fake email/legal guarantee or nonfunctional submit form. Link from footer to relevant service pages and UI-kit.
6. **UI-kit demo**: `/ui-kit/` as a real navigable preview/support page, labeled “Компоненты ProgCode”. Sections: identity native-size strip; semantic colour pair samples; typography using actual TLS/Windows/short/interview excerpts; buttons/fields/live states; real 3-column CTFE table (all 4 rows); actual long code; native FileInput preview/caption; contents; list/related/error examples. Use small actual excerpts with clear links to full articles; never publish provenance dumps as articles. Demo includes a `ThemeControl` and mirrors product light/dark states rather than a screenshot collection.
Privacy proposal must describe **actual deployed** settings after the separate analytics delivery: current code counter109268613, clickmap/trackLinks on, webvisor off, accurateTrackBounce default15s unchanged, six allowed custom goals without custom query/URL/PII payload. Do not present “local JSON processing” as a claim that the site has no analytics. Confirm eventual deployed configuration with main/programmer before writing final user-facing privacy text. No new consent/legal promises invented by design.
Replace the inaccurate JSON hint “До 1 МБ” (currently a maxlength limit, not a UTF-8 byte guarantee). Preferred user copy: **“Проверяйте небольшие JSON-фрагменты. Текст обрабатывается в браузере.”** If a numeric limit remains, implement/test actual byte accounting or label the technical UTF-16 input bound accurately in documentation. Do not rename a code-unit limit as bytes.
## 7. FSD ownership without a framework migration
Keep root `web/app` for Next route adapters/metadata. Use a **nested** domain folder such as `web/fsd/` so an FSD `pages` layer does not accidentally become Next's Pages Router directory.
- `app/`: style/theme composition and providers; global reset imports semantic tokens once. Route adapters import page public APIs. No corpus editing here.
- `pages/`: `home`, `article`, `catalog`, `resources`, `about`, `privacy`, `not-found`, `json-tool`, `ui-kit` compositions, exporting only page entry components.
- `widgets/`: site-header/footer, article-reader, journal-index, related-reading, json-workbench layout.
- `features/`: journal-search/topic-filter, theme-selection, copy-code/JSON, article-contents navigation, analytics lifecycle. Existing analytics behavior survives folder moves, including 15s bounce semantics and no custom PII.
- `entities/article/`: article model/formatting and ArticleMeta/ListItem/Figure. The corpus remains in its owning data source and is read through a stable public selector API; do not duplicate14records inside fixtures.
- `shared/ui`, `shared/styles`, `shared/config`: primitives, semantic palette/spacing/type tokens, brand masters/definitions. No imports from shared to features/entities/pages.
Top-down dependencies only: pages→widgets/features/entities/shared; widgets→features/entities/shared; features→entities/shared; entities→shared. Each slice exports `index` public API; no peer-slice deep imports/circular barrels. Keep existing static routing and source/body/media/anchor contracts. FSD changes should first extract a consumed component (e.g. ArticleListItem+Button+Field) and show it on actual pages/demo; a directory move alone is not a UI-kit implementation.
Analytics contract: preserve real goals/listeners and stable hooks during extraction. Current `.related`, article body selector and catalog events are behavior dependencies; either retain them or migrate together with scoped tests. Do not fire `download_click` for Copy, send search text in reachGoal, or “simplify” accurateTrackBounce into a changed threshold. Keep accepted analytics-only diff separately reviewable from visual/FSD change.
## 8. Decision/acceptance packet
This is a reviewable proposal. Required next actions, not approvals claimed here:
| Decision | Designer recommendation | Explicit reviewer action |
|---|---|---|
| Brand P+cursor / vector wordmark | Adopt concept for candidate, inspect exports | CD+designer open native16/32/48+header; CM confirm readable brand/context. |
| Palette / dark | Adopt semantic pairs, dark figure light-well | CD coherence; designer actual-state contrast; CM real caption/TOC/source text. |
| Typography | 19/18px Georgia;68ch/740px cap | Designer+CM compare real long/short/code/table at320/390/1440; adjust based on actual lines. |
| UI primitives / FSD | Extract only real consumers above | Programmer import/build/contracts; designer/CM interact with actual pages and demo. |
| Page compositions / privacy | Retain actual journeys, add honest privacy/demo | CM source/legal-copy scope; CD+designer rendered hierarchy. |
Before implementation acceptance: exact Git/source/build hash; actual new home/catalog/long/short/code/table/image/about/privacy/JSON/empty/404/UI-kit light+dark pixels and keyboard interactions at320/390/1440; actual favicons16/32/48+ICO/touch checks; no overflow masking; complete source/body/media/anchor preservation checks; stable analytics goals; deployed build/TLS/legacy/local identity checks. Every design decision needs actual CD and designer verdict plus CM real-content verification. This document and concept screenshot are **not** that verdict.
## Concept review revision — coherent real-text specimen
27.10.2026. CM objection **C01 accepted and fixed**: the initial identity preview incorrectly combined a Tilix heading with a Diet/Vibe paragraph and a May23 date. It was a mixed specimen, not an intended article, but its unlabeled presentation could mislead a reviewer. The concept now uses the coherent **«Особенности Vibe.d» + Diet explanation + 23 мая 2017 г. / D / 13 мин** set. Updated 1440/320 pixels replace that concept evidence; final UI-kit must bind each specimen to its own owning article metadata, rather than combine attractive fragments. This change is documentation-only.
Personal decisions: designer adopts the proposed identity/palette/reading direction **for implementation**, after opening native-size 16/32/48 light/dark strips and the concept at320/1440. CD personally accepted the direction for implementation, CM reviewed D01–D20 with actual-build gates, illustrator independently opened/export-checked the native symbols. See their own reports; none of these decisions are final production UI PASS. Root selected the safe nested implementation namespace **web/fsd/**, with the same top-down layer ownership described above; root Next `web/app` remains adapters.