tickets
All repositories: gitoria
19.9 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' }// phone: ONE row each that scrolls sideways inside itself (14 project chips + 8 state chips filled half a screen before the first ticket)'ticket-filters nav' { display = 'flex' flexWrap = 'nowrap' gap = '.35rem' overflowX = 'auto' scrollbarWidth = 'thin' paddingBottom = '.2rem' }'ticket-filters a' { flex = 'none' whiteSpace = 'nowrap' 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 }// the number stands in front of the subject on its first line and never wraps (it was a flex item that shrank: "# / 2 / 6" on the phone)'.tickets .subject' { display = 'flex' alignItems = 'baseline' paddingBlock = '.5rem' color = colorTextStrong fontWeight = '600' overflowWrap = 'anywhere' }ticketRef { flex = 'none' marginRight = '.4rem' color = colorTextMuted fontWeight = '400' whiteSpace = 'nowrap' }formerRef { marginLeft = '.2rem' fontSize = '.875rem' color = colorTextMuted }ticketMeta { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.2rem .8rem' fontSize = '.875rem' }'.notice' { margin = '0' color = colorSuccess }// a label with its field: the caption above, the field the full width (the field stood beside the caption, at its own width)'form > label' { display = 'grid' gap = '.3rem' margin = '0' }'form > label > input,form > label > select' { width = '100%' boxSizing = 'border-box' }// 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' }'project-actions a.button' { background = colorSurface }// 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 100%' overflowWrap = 'anywhere' }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,ticket-view header button' { 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 = 'grid' gridTemplateColumns = 'repeat(auto-fit, minmax(9rem, 1fr))' 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' { display = 'inline-flex' alignItems = 'center' minHeight = layoutTap 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' }'ticket-filters nav' = { flexWrap = 'wrap' overflowX = 'visible' }'#members strong' = { flex = '1 1 8rem' }formButtons = { display = 'flex' flexWrap = 'wrap' }// 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
- 28e9c938ticket list: draw the newest 50 rows and a Show more button (500 rows were a 2-4 s first paint, 740 KB, a 90 000 px phone page)mre
- ccebb0c7mobile: ticket number stays on one line, filter chips one scrolling row, fields full width under their caption, Edit/action buttons, member names whole, 44 px relation linksmre
- f2dc7741gate: the phone toolbar is two even rows (E2)mre
- 20f7c33async components.hybriel 214c318: MdEditor on a phone, two even toolbar rows of 44 px targets, label 15 px, table head 16 px (E2)mre
- d74a5482sync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre
- 9d02c540sync components.hybriel 6b0936a: the 'edited' foldable drops the theme's border and marginmre
- 22751914sync components.hybriel 8d79ff7: bubble hugs its content, quiet 'edited' label; gate checksmre
- c8452453sync components 9a: shared Icon (icons/icons.hl), md-editor toolbar icons + single focus ring (components f4-icons ba96735)mre
- 52ba11e8sync-components: copy icons/icons.hl + README (F4); testsmre
- 138d198dmd-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
- 18d2df60md-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
- f6764bedreports/H1-hydrate.mdmre
- 1bbbf0edtests/browser.mjs: wait for hydration before clicking the login button on / (device B)mre
- 6f503cfctests/cdp.mjs: HL_CPU_THROTTLE=<rate> optional CPU throttling for gate runsmre
- e17e2855re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- a6ddccd2re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- 81e036b7docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 5d8d2cf6deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- 58e8c02cmission 024: report, LOG, STATUS, e2e fixmre
- 50778073tests/e2e-route-marker.mjs: first paint marker, comments post/edit redrawmre