tickets
All repositories: gitoria
19.5 KB
// styles.hl — ALL of the app's CSS, served as /__hl/app.css. Components carry no Style// blocks: markup is domain tags (<ticket-board>, <ticket-state>, …), this file lays them out.//// TOKENS (ticket antcolony#3, mission 021): the WorldAPI palette + semantic tokens are declared in// `shared/tokens.hl` as hl:web css variables (`static colorText = var(light)`), hand-written, a// verbatim copy of loreana /media/STORAGE/projects/WorldAPI/worldapi-tokens/tokens.hl (vendored like// plugins/; edit it THERE and cp it here). This file IMPORTS the tokens it uses and writes them as// members (`color = colorText`, `border = '1px solid ' + colorBorder`); hl:web names each token// after its member (--color-text), writes all of tokens.hl's tokens into the one :root and every// use as var(--color-text). The app sets only its accent (`colorAccent = var(…)` below, written// after the default, so it wins). hl:web does this itself since hybriel#39 (the mission-021 patch is gone).//// In a styles file a bare name is a TAG (camelCase → kebab: `ticketState` is// `ticket-state`), a quoted name is a selector written verbatim. MOBILE FIRST: every// rule is the phone's; the one min-width block adds the wide layout.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 sets'*,*::before,*::after' { boxSizing = 'border-box' }html { colorScheme = 'dark' }body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }a { color = colorAccent textDecoration = 'none' }'a:hover' { textDecoration = 'underline' }h1 { margin = '0' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong overflowWrap = 'anywhere' }h2 { margin = '0 0 .5rem' fontSize = '1rem' color = colorTextStrong }time { color = colorTextMuted fontSize = '.85rem' whiteSpace = 'nowrap' }'input,textarea,select' { font = 'inherit' width = '100%' padding = '.5rem .7rem' color = colorTextStrong background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }'input:focus,textarea:focus,select:focus' { outline = '2px solid ' + colorAccent outlineOffset = '1px' }textarea { resize = 'vertical' minHeight = '4.5rem' }label { display = 'grid' gap = '.25rem' fontSize = '.9rem' color = colorTextMuted }button { font = 'inherit' fontWeight = '600' padding = '.55rem 1.1rem' color = colorAccentText background = colorAccent border = '0' borderRadius = '.4rem' cursor = 'pointer' justifySelf = 'start' }'button:hover' { filter = 'brightness(1.1)' }// ---- the shell ---------------------------------------------------------------------------applicationHeader { position = 'sticky' top = '0' zIndex = '5' display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.5rem 1rem' padding = '.6rem 1rem' background = colorBackgroundSunken borderBottom = '1px solid ' + colorBorder }'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = colorAccent marginRight = 'auto' }'application-header nav' { display = 'flex' gap = '1rem' }'application-header nav a' { color = colorText }inboxBadge { display = 'inline-block' marginLeft = '.35rem' padding = '0 .45rem' borderRadius = '999px' fontSize = '.8rem' fontWeight = '700' color = colorAccentText background = colorAccent }main { maxWidth = '60rem' margin = '0 auto' padding = '1rem' }// offline (mission 046, components/main.hl): the note, and the invisible probe whose animation ticks every secondofflineNote { display = 'block' padding = '.5rem 1rem' color = colorTextStrong background = colorSurface borderBottom = '1px solid ' + colorBorder }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 login, top right (ticket #7): ident's selector (its shadow DOM in ident's design,// restyled to tickets' accent through its custom properties), the login button, who you areuserBox { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'flex-end' gap = '.4rem .6rem' marginLeft = 'auto' maxWidth = '100%' }identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorBorder '--ident-font' = '600 .9rem/1.4 system-ui, sans-serif' }'ident-selector::part(button)' { padding = '.35rem .8rem' }'ident-selector::part(status)' { padding = '.35rem .8rem' }'#whoami' { fontWeight = '600' color = colorTextStrong overflowWrap = 'anywhere' }'a.button' { display = 'inline-block' fontWeight = '600' fontSize = '.9rem' padding = '.35rem .8rem' color = colorAccent border = '1px solid ' + colorAccent borderRadius = '.4rem' }'a.button:hover' { textDecoration = 'none' background = colorSurface }'button.quiet' { color = colorText background = 'transparent' border = '1px solid ' + colorBorder padding = '.35rem .8rem' fontSize = '.9rem' }'button.danger' { color = colorDanger borderColor = colorDanger }namePrompt { display = 'block' maxWidth = '60rem' margin = '1rem auto 0' padding = '0 1rem' }'#nameform' { display = 'grid' gap = '.5rem' padding = '.8rem' background = colorSurface border = '1px solid ' + colorAccent borderRadius = '.5rem' }'.banner' { maxWidth = '60rem' margin = '.8rem auto 0' padding = '0 1rem' }'.hint' { margin = '0' fontSize = '.9rem' color = colorTextMuted }'.muted' { margin = '0' fontSize = '.9rem' color = colorTextMuted }// ---- /you: the account and the API tokens ---------------------------------------------------youView { display = 'grid' gap = '1.2rem' }'you-view section' { display = 'grid' gap = '.6rem' padding = '.8rem' background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.5rem' }'you-view dl' { display = 'grid' gap = '.2rem' margin = '0' }'you-view dt' { fontSize = '.85rem' 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' border = '1px solid ' + colorSuccess borderRadius = '.4rem' }'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 = '.4rem' }'#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' { padding = '.2rem .65rem' fontSize = '.85rem' color = colorText border = '1px solid ' + colorBorder borderRadius = '999px' }'ticket-filters a.selected' { color = colorAccentText background = colorAccent borderColor = 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 border = '1px solid ' + colorBorder borderRadius = '.5rem' }'.tickets li ticket-state' { justifySelf = 'start' }'.tickets .subject' { color = colorTextStrong fontWeight = '600' overflowWrap = 'anywhere' }ticketRef { marginRight = '.4rem' color = colorTextMuted fontWeight = '400' }formerRef { marginLeft = '.2rem' fontSize = '.85rem' color = colorTextMuted }ticketMeta { display = 'flex' flexWrap = 'wrap' gap = '.2rem .8rem' fontSize = '.85rem' }'p.empty' { margin = '0' padding = '1rem' textAlign = 'center' color = colorTextMuted border = '1px dashed ' + colorBorder borderRadius = '.5rem' }'.notice' { margin = '0' color = colorSuccess }// the new-ticket form, folded away until asked fordetails { background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.5rem' }summary { padding = '.6rem .8rem' cursor = 'pointer' fontWeight = '600' color = colorAccent }'details form' { display = 'grid' gap = '.7rem' padding = '0 .8rem .8rem' }// ---- the state badge: one colour per state -------------------------------------------------ticketState { display = 'inline-block' padding = '.05rem .55rem' fontSize = '.8rem' fontWeight = '600' whiteSpace = 'nowrap' borderRadius = '999px' border = '1px solid currentColor' 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 border = '1px solid ' + colorBorder borderRadius = '.5rem' 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 border = '1px solid ' + colorBorder borderRadius = '.5rem' }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 border = '1px solid ' + colorBorder borderRadius = '.4rem' }'#members strong' { flex = '1 1 8rem' }inviteShown { display = 'block' padding = '.7rem .8rem' overflowWrap = 'anywhere' background = colorSurface border = '1px solid ' + colorAccent borderRadius = '.5rem' }'invite-shown p' { margin = '0 0 .4rem' }'#projectlist' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.3rem' }'.role' { color = colorTextMuted fontSize = '.85rem' }'#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 = '.85rem' }ticketSummary { display = 'block' padding = '.8rem' overflowWrap = 'anywhere' background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.5rem' }'ticket-view section' { display = 'grid' gap = '.7rem' }'#events' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' borderLeft = '2px solid ' + colorBorder }'#events > li' { marginLeft = '.8rem' padding = '.5rem .7rem' background = colorSurface borderRadius = '.4rem' }'#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 border = '1px solid ' + colorAccent borderRadius = '.5rem' }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 = '.85rem' }'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 = '.25rem' }'markdown-text pre' { margin = '.5rem 0' padding = '.6rem .7rem' overflowX = 'auto' background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }'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' border = '1px solid ' + colorBorder 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 border = '1px solid ' + colorBorder borderRadius = '.5rem' }'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 = '.8rem' marginLeft = 'auto' }'#events > li.link' { background = 'transparent' padding = '.2rem .7rem' }'@media (min-width: 45rem)' = {main = { padding = '1.5rem 1rem' }h1 = { fontSize = '1.6rem' }'.tickets li' = { gridTemplateColumns = '8.5rem minmax(0, 1fr) auto' alignItems = 'baseline' gap = '1rem' }'#stateform' = { gridTemplateColumns = '14rem minmax(0, 1fr) auto' alignItems = 'end' }'#parentform,#blockerform' = { gridTemplateColumns = 'minmax(0, 1fr) auto' alignItems = 'end' }'details form' = { maxWidth = '40rem' }userBox = { marginLeft = '0' }}
Branches
Latest commits
- 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
- 5dc68731docker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
- 8a460b16mission 014: Apollo's 'stream opened right after the start gets no live events' is not a tickets bug — events.mjs checks early streamsmre
- 6309ca81mission brief 014mre
- c1161469mission 013: GitHub pipe tables on ticket pages (lib/markdown.hl + View + CSS) and re-vendor hybriel master a832f73bmre