tickets
All repositories: gitoria
18.7 KB
// styles.hl — the app's CSS, served as /__hl/app.css. It INHERITS THE WORLDAPI THEME (theme/theme.hl, copied verbatim from// layouts.worldapi.org dbe3de7 — never edited here; docs: layouts docs/using-the-theme.md) and adds only what tickets' own pages// need: the ticket list, the history, the state badges, the settings/connect pages. Components carry no Style blocks: markup is// domain tags (<ticket-board>, <ticket-state>, …), this file lays them out.//// TOKENS: colours only through the named tokens (shared/tokens.hl = layouts' file, byte-equal); the app sets only its accent// (purple). Corners: radiusSmall (5px: buttons, pills, rows) / radiusLarge (10px: panels, boxes). Borderless — `node// theme/check-theme.mjs .` must report 0 problems (a deploy gate).// In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim; a selector the theme// already writes may not be written again (hl:web refuses it) — so the theme's own elements (links, headings, fields, buttons,// foldables, `.muted`, `p.empty`, the 44 px taps) are NOT repeated here.// PHONE FIRST (mission 022): every rule outside a block is the phone's (390 px): nothing makes the page wider than the screen,// every tap target is at least 44×44 px (the theme's layoutTap), every field 16 px, no text under 14 px (.875rem). The one// `@media (min-width: 60rem)` block at the bottom (the theme's breakpoint) only ADDS the wide layout.inherit '../theme/theme.hl'import { var } from 'hl:web/css'import { purple, colorText, colorBackground, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorBorder, colorDanger, colorSuccess, colorAction, colorWarning } from '../shared/tokens.hl'colorAccent = var(purple) // the app's accent: the only token this app setstime { color = colorTextMuted fontSize = '.875rem' whiteSpace = 'nowrap' }'.hint,.muted' { margin = '0' fontSize = '.875rem' }// ---- the shell (components/main.hl; the theme's shell files carry their own Style) ----------------// offline (mission 046, components/main.hl): the note, and the invisible probe whose animation ticks every secondofflineNote { display = 'block' padding = '.5rem var(--layout-gutter)' color = colorTextStrong background = colorSurface }netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'tickets-net-tick 1s linear infinite' }'@keyframes tickets-net-tick' = {'from' = { opacity = '0' }to = { opacity = '0' }}// the signed-in name at the top of the user menu (UserMenu's own `p.who` look)'user-menu p#whoami' { fontSize = '.875rem' }// SIGNED OUT: the ident icon at the far right (phone) opens the dropdown with ident's selector and the login button; from 60rem the// dropdown stands open in the header. Signed in (class `in`) it is not shown: the user menu stands there (the selector stays in// the page — /login.js keeps its state).identMenu { display = 'block' flex = 'none' }'ident-menu.in' { display = 'none' }'ident-menu > button.ident-toggle' { width = '2.75rem' height = '2.75rem' marginRight = '-.5rem' padding = '0' color = colorText }'ident-menu svg.ident-icon' { width = '2rem' height = '1.32rem' }'svg.ident-icon .ident-d' { fill = colorTextStrong }'svg.ident-icon .ident-d-side' { fill = colorTextMuted }'svg.ident-icon .ident-i' { fill = colorAccent }'#ident-panel:popover-open' { position = 'fixed' inset = 'var(--layout-header) max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2)) auto auto' display = 'grid' gap = '.6rem' width = 'auto' minWidth = '14rem' maxWidth = 'calc(100vw - 2 * var(--layout-gutter))' height = 'auto' margin = '.25rem 0 0' padding = '.75rem' color = colorText background = colorSurface borderRadius = radiusLarge boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }'#ident-panel::backdrop' { background = 'transparent' }// ident's selector (its shadow DOM in ident's design, restyled to tickets' accent through its custom properties and parts)identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorSurface '--ident-font' = '600 1rem/1.4 system-ui, sans-serif' minWidth = '0' }'ident-selector::part(button)' { minHeight = '2.75rem' padding = '.35rem .8rem' whiteSpace = 'nowrap' }'ident-selector::part(status)' { minHeight = '2.75rem' padding = '.35rem .8rem' }'ident-selector::part(identity)' { minHeight = '2.75rem' }'ident-selector::part(panel)' { }'#loginerror' { margin = '0' padding = '.5rem var(--layout-gutter)' background = colorBackgroundSunken }// the display-name prompt of a first login: in the content column, under the headernamePrompt { display = 'block' paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))' paddingTop = '1rem' }'#nameform' { display = 'grid' gap = '.6rem' padding = '1rem' background = colorSurface borderRadius = radiusLarge }// ---- /you: the account and the API tokens ---------------------------------------------------youView { display = 'grid' gap = '1.2rem' }'you-view section' { display = 'grid' gap = '.6rem' padding = '.8rem' background = colorSurface borderRadius = radiusLarge }'you-view dl' { display = 'grid' gap = '.2rem' margin = '0' }'you-view dt' { fontSize = '.875rem' color = colorTextMuted }'you-view dd' { margin = '0 0 .4rem' color = colorTextStrong overflowWrap = 'anywhere' }'you-view code' { overflowWrap = 'anywhere' wordBreak = 'break-all' }'#tokenform' { display = 'grid' gap = '.5rem' }tokenShown { display = 'grid' gap = '.4rem' padding = '.7rem' borderRadius = radiusSmall }'token-shown p' { margin = '0' }'#newtoken' { color = colorSuccess fontSize = '.95rem' }'#tokenlist' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.4rem' }'#tokenlist li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.3rem .8rem' padding = '.4rem .6rem' background = colorBackgroundSunken borderRadius = radiusSmall }'#tokenlist .label' { flex = '1 1 10rem' color = colorTextStrong overflowWrap = 'anywhere' }// ---- ticket lists (/, filters, /inbox) -----------------------------------------------------ticketBoard { display = 'grid' gap = '1rem' }ticketFilters { display = 'grid' gap = '.5rem' }'ticket-filters nav' { display = 'flex' flexWrap = 'wrap' gap = '.35rem' }'ticket-filters a' { display = 'inline-flex' alignItems = 'center' minHeight = layoutTap padding = '.2rem .8rem' background = colorSurface fontSize = '.875rem' color = colorText borderRadius = radiusSmall }'ticket-filters a.selected' { color = colorAccentText background = colorAccent }'.tickets' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }'.tickets li' { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '.3rem' padding = '.7rem .8rem' background = colorSurface borderRadius = radiusLarge }'.tickets li ticket-state' { justifySelf = 'start' }'.tickets a' { display = 'inline-flex' alignItems = 'center' minWidth = layoutTap minHeight = layoutTap }'.tickets .subject' { color = colorTextStrong fontWeight = '600' overflowWrap = 'anywhere' }ticketRef { marginRight = '.4rem' color = colorTextMuted fontWeight = '400' }formerRef { marginLeft = '.2rem' fontSize = '.875rem' color = colorTextMuted }ticketMeta { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.2rem .8rem' fontSize = '.875rem' }'.notice' { margin = '0' color = colorSuccess }// the new-ticket form, folded away until asked for (the theme's foldable: details/summary)'details form' { display = 'grid' gap = '.7rem' padding = '0 .8rem .8rem' }// ---- the state badge: one colour per state -------------------------------------------------ticketState { display = 'inline-block' background = colorBackgroundSunken padding = '.05rem .55rem' fontSize = '.875rem' fontWeight = '600' whiteSpace = 'nowrap' borderRadius = radiusSmall color = colorTextMuted }'ticket-state.open' { color = colorAction }'ticket-state.progress' { color = colorWarning }'ticket-state.pending' { color = colorTextMuted }'ticket-state.review' { color = colorAccent }'ticket-state.reopened' { color = colorDanger }'ticket-state.done' { color = colorSuccess }'ticket-state.canceled' { color = colorTextMuted }'ticket-filters a.selected.open,ticket-filters a.selected.progress,ticket-filters a.selected.pending,ticket-filters a.selected.review,ticket-filters a.selected.reopened,ticket-filters a.selected.done,ticket-filters a.selected.canceled' { color = colorAccentText }// ---- ticket #20: projects, members, assignee, the inbox ------------------------------------------projectActions { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }// ticket #21: the apps connected to a project, and the connect page'.connections' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.4rem' }'.connections li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.2rem .6rem' padding = '.4rem .8rem' background = colorSurface borderRadius = radiusLarge fontSize = '.9rem' }connectPage { display = 'grid' gap = '1rem' maxWidth = '38rem' }'connect-page form' { display = 'grid' gap = '.8rem' }projectDescription { display = 'block' padding = '.8rem' overflowWrap = 'anywhere' background = colorSurface borderRadius = radiusLarge }assignee { color = colorTextMuted }'assignee::before' { content = '"→ "' }'ticket-view .people' { margin = '0' color = colorTextMuted fontSize = '.9rem' }'ticket-view .people strong' { color = colorText }'project-form,project-settings' { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '1rem' }'project-form form,project-settings form,project-settings section' { display = 'grid' gap = '.6rem' }'project-settings h1,project-settings h2' { margin = '0' }'project-settings h2' { fontSize = '1.1rem' }'#members' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.4rem' }'#members li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.4rem .8rem' padding = '.4rem .6rem' background = colorSurface borderRadius = radiusSmall }'#members strong' { flex = '1 1 8rem' }inviteShown { display = 'block' padding = '.7rem .8rem' overflowWrap = 'anywhere' background = colorSurface borderRadius = radiusLarge }'invite-shown p' { margin = '0 0 .4rem' }'#projectlist' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.3rem' }'.role' { color = colorTextMuted fontSize = '.875rem' }'#reviewbox,#pendingbox' { display = 'grid' gap = '.5rem' }'#reviewbox h2,#pendingbox h2' { margin = '0' fontSize = '1.1rem' }// ---- one ticket ----------------------------------------------------------------------------ticketView { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '1.2rem' }'ticket-view header' { display = 'grid' gap = '.4rem' }'ticket-view header p' { margin = '0' }'ticket-view header ticket-state' { justifySelf = 'start' }'ticket-view .dates' { color = colorTextMuted fontSize = '.875rem' }ticketSummary { display = 'block' padding = '.8rem' overflowWrap = 'anywhere' background = colorSurface borderRadius = radiusLarge }'ticket-view section' { display = 'grid' gap = '.7rem' }'#events' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }'#events > li' { marginLeft = '.8rem' padding = '.5rem .7rem' background = colorSurface borderRadius = radiusSmall }'#events > li.state' { background = 'transparent' padding = '.2rem .7rem' }eventHead { display = 'block' fontSize = '.9rem' }'event-head strong' { color = colorTextStrong }eventText { display = 'block' marginTop = '.3rem' overflowWrap = 'anywhere' }'ticket-view form' { display = 'grid' gap = '.5rem' }// ---- ticket #8: the author's edit form; an edit in the history keeps what was before -------'#editform' { padding = '.8rem' background = colorSurface borderRadius = radiusLarge }formButtons { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }'event-text.edit' { fontSize = '.9rem' color = colorTextMuted }'event-text.edit p' { margin = '0' }'event-text.edit s' { color = colorText }'event-text.edit details' { marginTop = '.3rem' background = colorBackgroundSunken }'event-text.edit summary' { padding = '.3rem .6rem' fontWeight = '400' fontSize = '.875rem' }'event-text.edit markdown-text' { padding = '0 .6rem .5rem' color = colorText }// ---- ticket #6: Markdown in text fields (components/markdown.hl). Line breaks inside a// paragraph stay visible (the page showed the texts with pre-wrap before) ----------------------markdownText { display = 'block' }'markdown-text > :first-child' { marginTop = '0' }'markdown-text > :last-child' { marginBottom = '0' }'markdown-text p,markdown-text li' { whiteSpace = 'pre-wrap' }'markdown-text p' { margin = '.5rem 0' }'markdown-text h3,markdown-text h4,markdown-text h5' { margin = '.9rem 0 .4rem' lineHeight = '1.3' color = colorTextStrong }'markdown-text h3' { fontSize = '1.15rem' }'markdown-text h4' { fontSize = '1.02rem' }'markdown-text h5' { fontSize = '.95rem' }'markdown-text ul,markdown-text ol' { margin = '.5rem 0' paddingLeft = '1.4rem' }'markdown-text li + li' { marginTop = '.15rem' }// inside the history (itself an <ol>) a list would get the nested markers (circles)'markdown-text ul' { listStyleType = 'disc' }'markdown-text ol' { listStyleType = 'decimal' }'markdown-text strong' { color = colorTextStrong }'markdown-text a' { textDecoration = 'underline' textUnderlineOffset = '.15em' overflowWrap = 'anywhere' }'markdown-text code' { font = '.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' padding = '.05em .3em' color = colorTextStrong background = colorBackgroundSunken borderRadius = radiusSmall }'markdown-text pre' { margin = '.5rem 0' padding = '.6rem .7rem' overflowX = 'auto' background = colorBackgroundSunken borderRadius = radiusSmall }'markdown-text pre code' { padding = '0' background = 'transparent' whiteSpace = 'pre' }// mission 013: pipe tables — black/white, thin grey lines; a wide table scrolls inside its own box// (the page never scrolls sideways); cells keep their words whole (no break-all) and wrap at spaces. `contain:// inline-size`: the box's width never comes from the table — the history and the sections are grids of auto columns,// which would otherwise grow to the table's min-content width and push the page sideways. The 1px padding keeps the// outer half of the collapsed border inside the clip (without it the table's right line was cut off)markdownTable { display = 'block' maxWidth = '100%' overflowX = 'auto' margin = '.5rem 0' padding = '1px' contain = 'inline-size' }'markdown-table table' { borderCollapse = 'collapse' }'markdown-table th,markdown-table td' { padding = '.3rem .6rem' textAlign = 'start' verticalAlign = 'top' minWidth = '2.5rem' overflowWrap = 'normal' wordBreak = 'normal' }'markdown-table th' { fontWeight = '700' color = colorTextStrong }'markdown-table [data-align="left"]' { textAlign = 'left' }'markdown-table [data-align="center"]' { textAlign = 'center' }'markdown-table [data-align="right"]' { textAlign = 'right' }'.message' { margin = '0' minHeight = '1.5em' color = colorDanger }// ---- ticket #12 → mission 016: the Markdown fields are the Hybriel MdEditor (components/md-editor/, its own Style off the// tokens). Not inside a <label>: a label hands its clicks to its first button — the editor's toolbar "B". `md-field` = the caption// above the editor, as a label looksmdField { display = 'grid' gap = '.25rem' }'md-field > span' { fontSize = '.9rem' color = colorTextMuted }// ---- mission 016: the comments (components/comments/, the shared block with its own Style). In the history every run of// comments is one block in place: its count line, its "no comments" line and its form are not shown there (the block has no// switch for them); the form is the last block, under "Respond", which shows only the form. A deleted comment is one quiet line.// `contain: inline-size` (as markdownTable below): the history is a grid of auto columns, which would grow to a wide table's// min-content width inside a comment and push the page sideways — the table scrolls in its own box instead'#events > li.comments' { padding = '.3rem 0' background = 'transparent' contain = 'inline-size' }'#events comments-block h2.comments-count,#events comments-block .comments-empty,#events comments-block form.comment-form' { display = 'none' }'#events comments-block ol.comment-list' { margin = '0' }'#events > li.comment.deleted' { background = 'transparent' padding = '.2rem .7rem' fontStyle = 'italic' color = colorTextMuted }'#commentform h2.comments-count,#commentform .comments-empty,#commentform ol.comment-list' { display = 'none' }commentForm { display = 'block' }// ---- ticket #4: relations (parent, children, blocked by, blocks) ---------------------------ticketRelations { display = 'grid' gap = '.8rem' padding = '.8rem' background = colorSurface borderRadius = radiusLarge }'ticket-relations h2' { margin = '0 0 .4rem' fontSize = '1rem' }'ticket-relations p' { margin = '0' }'#parent a,.refs a' { fontWeight = '600' whiteSpace = 'nowrap' }'.refsubject' { color = colorTextStrong overflowWrap = 'anywhere' }'#childnote' { margin = '0 0 .4rem' fontSize = '.9rem' color = colorTextMuted }'#childnote.done' { fontWeight = '600' color = colorSuccess }'.refs' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.35rem' }'.refs li' { display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem .6rem' }'.refs .unblock' { padding = '.1rem .6rem' fontSize = '.875rem' marginLeft = 'auto' }'#events > li.link' { background = 'transparent' padding = '.2rem .7rem' }'@media (min-width: 60rem)' = {'.tickets li' = { gridTemplateColumns = '8.5rem minmax(0, 1fr) auto' alignItems = 'center' gap = '1rem' }'#stateform' = { gridTemplateColumns = '14rem minmax(0, 1fr) auto' alignItems = 'end' }'#parentform,#blockerform' = { gridTemplateColumns = 'minmax(0, 1fr) auto' alignItems = 'end' }'details form' = { maxWidth = '40rem' }// signed out, from 60rem the selector and the login button stand in the header themselves (no icon, no dropdown)'ident-menu > button.ident-toggle' = { display = 'none' }'#ident-panel,#ident-panel:popover-open' = { position = 'static' inset = 'auto' display = 'flex' alignItems = 'center' gap = '.5rem' width = 'auto' minWidth = '0' maxWidth = 'none' height = 'auto' margin = '0' padding = '0' overflow = 'visible' color = 'inherit' background = 'transparent' border = '0' boxShadow = 'none' }identSelector = { position = 'relative' }'ident-selector::part(panel)' = { position = 'absolute' top = '100%' right = '0' zIndex = '30' boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }}
Branches
Latest commits
- 7ed2e5e5deploy.sh: a gate without a 'passed,' line (check-theme) no longer ends the script silently (grep under pipefail), as gitoria/layoutsmre
- bf9064a3mission 022: tickets on the layouts theme (step 1): shell, styles, gates, audit, E2E; reportmre
- f3d61711mission 022 WIP: tickets on the layouts theme (dbe3de7): AppHeader/MainMenu/UserMenu/Sidebar/ContentFirst shell, styles reduced to the app's own, check-theme in the gates, 390 audit + real-Chrome walk scriptmre
- 31cabfccmission 021: E2E script, report, LOG, STATUSmre
- 6aea8683editor look: .empty rule only for p.empty, files off where tickets has no upload, state note one line, events test scrolls the editor into view; synced md-editor (components d702d76+6f27ad3); gate 377/0, events 52/0mre
- dce6ffa6Merge branch 'w28-deflake'mre
- 536092a1tickets (mission 019): de-flake the m016 comment clicks (B: unliked) — calmClick waits until the button stops moving; test only, no app changemre
- 9c5fd42amission 020: attachments E2E proof (lisbeth Chrome, real-data copy), reportmre
- 1206404fREADME attachments, report 018, LOG/STATUSmre
- 3d9e7f3ctests: m017 gate fixes (list count, waits before delete clicks); gate 373/0mre
- dd41d5bcre-sync components 15be2ac; mission 018mre
- 420ad1bbtickets (mission 017 WIP, tickets#27): comment attachments — lib/attachments.hl (storage/attachments, limits, type by content, members-only GET /api/attachments/:id, delete drops, edit keeps), multipart POST …/comments (lib/multipart.hl), Respond block in FilesUpload (blocks verbatim from components w27c 1f8d79d), gate m017 checks written (not yet run); report, LOG, STATUSmre
- a7a1380dmission brief 017mre
- f83d9c0dtickets (mission 016): report reports/016-comments-block.md, LOG, STATUS, README gate countmre
- eef80f55tickets (mission 016): comments through the shared Comments block (layouts#2) — edit (author, earlier versions kept), delete (author, asks; leaves one line in the history), like (members, toggle) on the server (lib/comments.hl, append-only tables), faces + API …/comments/:comment/{edit,delete,like}, push commentChanged; every run of comments is a block in place in the history; Markdown fields on the Hybriel MdEditor (shared/md-editor.js retired: it took over the block's <md-editor>); blocks copied verbatim from components.hybriel 9db927d (tools/sync-components.sh); gates browser 351/0 (old 326/0), events 52/0 (old 52/0)mre
- eb7aeeb9mission brief 016mre
- e4c34759paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
- 26efb23freport w6-events (events test)mre
- c6bfab04mission 015: re-vendor Hybriel 0f396652 (static build), reportmre
- b7ec5981mission brief 015mre