gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit81f10e4e81f10e4eident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre81f10e4e/components/styles.hl

18.4 KB

  1. // styles.hl — the app's CSS, served as /__hl/app.css. It INHERITS THE WORLDAPI THEME (theme/theme.hl, copied verbatim from
  2. // layouts.worldapi.org dbe3de7 — never edited here; docs: layouts docs/using-the-theme.md) and adds only what tickets' own pages
  3. // need: the ticket list, the history, the state badges, the settings/connect pages. Components carry no Style blocks: markup is
  4. // domain tags (<ticket-board>, <ticket-state>, …), this file lays them out.
  5. //
  6. // TOKENS: colours only through the named tokens (shared/tokens.hl = layouts' file, byte-equal); the app sets only its accent
  7. // (purple). Corners: radiusSmall (5px: buttons, pills, rows) / radiusLarge (10px: panels, boxes). Borderless — `node
  8. // theme/check-theme.mjs .` must report 0 problems (a deploy gate).
  9. // In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim; a selector the theme
  10. // already writes may not be written again (hl:web refuses it) — so the theme's own elements (links, headings, fields, buttons,
  11. // foldables, `.muted`, `p.empty`, the 44 px taps) are NOT repeated here.
  12. // PHONE FIRST (mission 022): every rule outside a block is the phone's (390 px): nothing makes the page wider than the screen,
  13. // 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
  14. // `@media (min-width: 60rem)` block at the bottom (the theme's breakpoint) only ADDS the wide layout.
  15. inherit '../theme/theme.hl'
  16. import { var } from 'hl:web/css'
  17. import { purple, colorText, colorBackground, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorBorder, colorDanger, colorSuccess, colorAction, colorWarning } from '../shared/tokens.hl'
  18. colorAccent = var(purple) // the app's accent: the only token this app sets
  19. time { color = colorTextMuted fontSize = '.875rem' whiteSpace = 'nowrap' }
  20. '.hint,
  21. .muted' { margin = '0' fontSize = '.875rem' }
  22. // ---- the shell (components/main.hl; the theme's shell files carry their own Style) ----------------
  23. // offline (mission 046, components/main.hl): the note, and the invisible probe whose animation ticks every second
  24. offlineNote { display = 'block' padding = '.5rem var(--layout-gutter)' color = colorTextStrong background = colorSurface }
  25. netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'tickets-net-tick 1s linear infinite' }
  26. '@keyframes tickets-net-tick' = {
  27. 'from' = { opacity = '0' }
  28. to = { opacity = '0' }
  29. }
  30. // the signed-in name at the top of the user menu (UserMenu's own `p.who` look)
  31. 'user-menu p#whoami' { fontSize = '.875rem' }
  32. // ident's selector stands in the header, signed in and signed out, on the phone too (creator 2026-10-24). Its shadow DOM is in
  33. // ident's design, restyled to tickets' accent through its custom properties and parts. The pill is kept compact so brand, selector
  34. // and the user icon fit one row at 390 px; its dropdown opens under it, as wide as a phone allows.
  35. identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorSurface '--ident-font' = '600 .9rem/1.3 system-ui, sans-serif' position = 'relative' flex = '0 1 auto' minWidth = '0' }
  36. 'ident-selector::part(button)' { minHeight = '2.75rem' padding = '.25rem .6rem' whiteSpace = 'nowrap' }
  37. 'ident-selector::part(status)' { minHeight = '2.75rem' padding = '.25rem .6rem' whiteSpace = 'nowrap' overflow = 'hidden' textOverflow = 'ellipsis' }
  38. 'ident-selector::part(identity)' { minHeight = '2.75rem' }
  39. 'ident-selector::part(panel)' { position = 'absolute' top = '100%' right = '0' zIndex = '30' width = 'min(20rem, calc(100vw - 2 * var(--layout-gutter)))' maxWidth = 'none' boxShadow = '0 .75rem 2rem ' + colorBackgroundSunken }
  40. '#loginerror' { margin = '0' padding = '.5rem var(--layout-gutter)' background = colorBackgroundSunken }
  41. // the display-name prompt of a first login: in the content column, under the header
  42. namePrompt { display = 'block' paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))' paddingTop = '1rem' }
  43. '#nameform' { display = 'grid' gap = '.6rem' padding = '1rem' background = colorSurface borderRadius = radiusLarge }
  44. // ---- /you: the account and the API tokens ---------------------------------------------------
  45. youView { display = 'grid' gap = '1.2rem' }
  46. 'you-view section' { display = 'grid' gap = '.6rem' padding = '.8rem' background = colorSurface borderRadius = radiusLarge }
  47. 'you-view dl' { display = 'grid' gap = '.2rem' margin = '0' }
  48. 'you-view dt' { fontSize = '.875rem' color = colorTextMuted }
  49. 'you-view dd' { margin = '0 0 .4rem' color = colorTextStrong overflowWrap = 'anywhere' }
  50. 'you-view code' { overflowWrap = 'anywhere' wordBreak = 'break-all' }
  51. '#tokenform' { display = 'grid' gap = '.5rem' }
  52. tokenShown { display = 'grid' gap = '.4rem' padding = '.7rem' borderRadius = radiusSmall }
  53. 'token-shown p' { margin = '0' }
  54. '#newtoken' { color = colorSuccess fontSize = '.95rem' }
  55. '#tokenlist' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.4rem' }
  56. '#tokenlist li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.3rem .8rem' padding = '.4rem .6rem' background = colorBackgroundSunken borderRadius = radiusSmall }
  57. '#tokenlist .label' { flex = '1 1 10rem' color = colorTextStrong overflowWrap = 'anywhere' }
  58. // ---- ticket lists (/, filters, /inbox) -----------------------------------------------------
  59. ticketBoard { display = 'grid' gap = '1rem' }
  60. ticketFilters { display = 'grid' gap = '.5rem' }
  61. // phone: ONE row each that scrolls sideways inside itself (14 project chips + 8 state chips filled half a screen before the first ticket)
  62. 'ticket-filters nav' { display = 'flex' flexWrap = 'nowrap' gap = '.35rem' overflowX = 'auto' scrollbarWidth = 'none' }
  63. '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 }
  64. 'ticket-filters a.selected' { color = colorAccentText background = colorAccent }
  65. '.tickets' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }
  66. '.tickets li' { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '.3rem' padding = '.7rem .8rem' background = colorSurface borderRadius = radiusLarge }
  67. '.tickets li ticket-state' { justifySelf = 'start' }
  68. '.tickets a' { display = 'inline-flex' alignItems = 'center' minWidth = layoutTap minHeight = layoutTap }
  69. // 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)
  70. '.tickets .subject' { display = 'flex' alignItems = 'baseline' paddingBlock = '.5rem' color = colorTextStrong fontWeight = '600' overflowWrap = 'anywhere' }
  71. ticketRef { flex = 'none' marginRight = '.4rem' color = colorTextMuted fontWeight = '400' whiteSpace = 'nowrap' }
  72. formerRef { marginLeft = '.2rem' fontSize = '.875rem' color = colorTextMuted }
  73. ticketMeta { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.2rem .8rem' fontSize = '.875rem' }
  74. '.notice' { margin = '0' color = colorSuccess }
  75. // a label with its field: the caption above, the field the full width (the field stood beside the caption, at its own width)
  76. 'form > label' { display = 'grid' gap = '.3rem' margin = '0' }
  77. 'form > label > input,
  78. form > label > select' { width = '100%' boxSizing = 'border-box' }
  79. // the new-ticket form, folded away until asked for (the theme's foldable: details/summary)
  80. 'details form' { display = 'grid' gap = '.7rem' padding = '0 .8rem .8rem' }
  81. // ---- the state badge: one colour per state -------------------------------------------------
  82. ticketState { display = 'inline-block' background = colorBackgroundSunken padding = '.05rem .55rem' fontSize = '.875rem' fontWeight = '600' whiteSpace = 'nowrap' borderRadius = radiusSmall color = colorTextMuted }
  83. 'ticket-state.open' { color = colorAction }
  84. 'ticket-state.progress' { color = colorWarning }
  85. 'ticket-state.pending' { color = colorTextMuted }
  86. 'ticket-state.review' { color = colorAccent }
  87. 'ticket-state.reopened' { color = colorDanger }
  88. 'ticket-state.done' { color = colorSuccess }
  89. 'ticket-state.canceled' { color = colorTextMuted }
  90. 'ticket-filters a.selected.open,
  91. ticket-filters a.selected.progress,
  92. ticket-filters a.selected.pending,
  93. ticket-filters a.selected.review,
  94. ticket-filters a.selected.reopened,
  95. ticket-filters a.selected.done,
  96. ticket-filters a.selected.canceled' { color = colorAccentText }
  97. // ---- ticket #20: projects, members, assignee, the inbox ------------------------------------------
  98. projectActions { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }
  99. 'project-actions a.button' { background = colorSurface }
  100. // ticket #21: the apps connected to a project, and the connect page
  101. '.connections' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.4rem' }
  102. '.connections li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.2rem .6rem' padding = '.4rem .8rem' background = colorSurface borderRadius = radiusLarge fontSize = '.9rem' }
  103. connectPage { display = 'grid' gap = '1rem' maxWidth = '38rem' }
  104. 'connect-page form' { display = 'grid' gap = '.8rem' }
  105. projectDescription { display = 'block' padding = '.8rem' overflowWrap = 'anywhere' background = colorSurface borderRadius = radiusLarge }
  106. assignee { color = colorTextMuted }
  107. 'assignee::before' { content = '"→ "' }
  108. 'ticket-view .people' { margin = '0' color = colorTextMuted fontSize = '.9rem' }
  109. 'ticket-view .people strong' { color = colorText }
  110. 'project-form,
  111. project-settings' { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '1rem' }
  112. 'project-form form,
  113. project-settings form,
  114. project-settings section' { display = 'grid' gap = '.6rem' }
  115. 'project-settings h1,
  116. project-settings h2' { margin = '0' }
  117. 'project-settings h2' { fontSize = '1.1rem' }
  118. '#members' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.4rem' }
  119. '#members li' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.4rem .8rem' padding = '.4rem .6rem' background = colorSurface borderRadius = radiusSmall }
  120. '#members strong' { flex = '1 1 100%' overflowWrap = 'anywhere' }
  121. inviteShown { display = 'block' padding = '.7rem .8rem' overflowWrap = 'anywhere' background = colorSurface borderRadius = radiusLarge }
  122. 'invite-shown p' { margin = '0 0 .4rem' }
  123. '#projectlist' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.3rem' }
  124. '.role' { color = colorTextMuted fontSize = '.875rem' }
  125. '#reviewbox,
  126. #pendingbox' { display = 'grid' gap = '.5rem' }
  127. '#reviewbox h2,
  128. #pendingbox h2' { margin = '0' fontSize = '1.1rem' }
  129. // ---- one ticket ----------------------------------------------------------------------------
  130. ticketView { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '1.2rem' }
  131. 'ticket-view header' { display = 'grid' gap = '.4rem' }
  132. 'ticket-view header p' { margin = '0' }
  133. 'ticket-view header ticket-state,
  134. ticket-view header button' { justifySelf = 'start' }
  135. 'ticket-view .dates' { color = colorTextMuted fontSize = '.875rem' }
  136. ticketSummary { display = 'block' padding = '.8rem' overflowWrap = 'anywhere' background = colorSurface borderRadius = radiusLarge }
  137. 'ticket-view section' { display = 'grid' gap = '.7rem' }
  138. '#events' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.5rem' }
  139. '#events > li' { marginLeft = '.8rem' padding = '.5rem .7rem' background = colorSurface borderRadius = radiusSmall }
  140. '#events > li.state' { background = 'transparent' padding = '.2rem .7rem' }
  141. eventHead { display = 'block' fontSize = '.9rem' }
  142. 'event-head strong' { color = colorTextStrong }
  143. eventText { display = 'block' marginTop = '.3rem' overflowWrap = 'anywhere' }
  144. 'ticket-view form' { display = 'grid' gap = '.5rem' }
  145. // ---- ticket #8: the author's edit form; an edit in the history keeps what was before -------
  146. '#editform' { padding = '.8rem' background = colorSurface borderRadius = radiusLarge }
  147. formButtons { display = 'grid' gridTemplateColumns = 'repeat(auto-fit, minmax(9rem, 1fr))' gap = '.5rem' }
  148. 'event-text.edit' { fontSize = '.9rem' color = colorTextMuted }
  149. 'event-text.edit p' { margin = '0' }
  150. 'event-text.edit s' { color = colorText }
  151. 'event-text.edit details' { marginTop = '.3rem' background = colorBackgroundSunken }
  152. 'event-text.edit summary' { padding = '.3rem .6rem' fontWeight = '400' fontSize = '.875rem' }
  153. 'event-text.edit markdown-text' { padding = '0 .6rem .5rem' color = colorText }
  154. // ---- ticket #6: Markdown in text fields (components/markdown.hl). Line breaks inside a
  155. // paragraph stay visible (the page showed the texts with pre-wrap before) ----------------------
  156. markdownText { display = 'block' }
  157. 'markdown-text > :first-child' { marginTop = '0' }
  158. 'markdown-text > :last-child' { marginBottom = '0' }
  159. 'markdown-text p,
  160. markdown-text li' { whiteSpace = 'pre-wrap' }
  161. 'markdown-text p' { margin = '.5rem 0' }
  162. 'markdown-text h3,
  163. markdown-text h4,
  164. markdown-text h5' { margin = '.9rem 0 .4rem' lineHeight = '1.3' color = colorTextStrong }
  165. 'markdown-text h3' { fontSize = '1.15rem' }
  166. 'markdown-text h4' { fontSize = '1.02rem' }
  167. 'markdown-text h5' { fontSize = '.95rem' }
  168. 'markdown-text ul,
  169. markdown-text ol' { margin = '.5rem 0' paddingLeft = '1.4rem' }
  170. 'markdown-text li + li' { marginTop = '.15rem' }
  171. // inside the history (itself an <ol>) a list would get the nested markers (circles)
  172. 'markdown-text ul' { listStyleType = 'disc' }
  173. 'markdown-text ol' { listStyleType = 'decimal' }
  174. 'markdown-text strong' { color = colorTextStrong }
  175. 'markdown-text a' { textDecoration = 'underline' textUnderlineOffset = '.15em' overflowWrap = 'anywhere' }
  176. 'markdown-text code' { font = '.88em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' padding = '.05em .3em' color = colorTextStrong background = colorBackgroundSunken borderRadius = radiusSmall }
  177. 'markdown-text pre' { margin = '.5rem 0' padding = '.6rem .7rem' overflowX = 'auto' background = colorBackgroundSunken borderRadius = radiusSmall }
  178. 'markdown-text pre code' { padding = '0' background = 'transparent' whiteSpace = 'pre' }
  179. // mission 013: pipe tables — black/white, thin grey lines; a wide table scrolls inside its own box
  180. // (the page never scrolls sideways); cells keep their words whole (no break-all) and wrap at spaces. `contain:
  181. // inline-size`: the box's width never comes from the table — the history and the sections are grids of auto columns,
  182. // which would otherwise grow to the table's min-content width and push the page sideways. The 1px padding keeps the
  183. // outer half of the collapsed border inside the clip (without it the table's right line was cut off)
  184. markdownTable { display = 'block' maxWidth = '100%' overflowX = 'auto' margin = '.5rem 0' padding = '1px' contain = 'inline-size' }
  185. 'markdown-table table' { borderCollapse = 'collapse' }
  186. 'markdown-table th,
  187. markdown-table td' { padding = '.3rem .6rem' textAlign = 'start' verticalAlign = 'top' minWidth = '2.5rem' overflowWrap = 'normal' wordBreak = 'normal' }
  188. 'markdown-table th' { fontWeight = '700' color = colorTextStrong }
  189. 'markdown-table [data-align="left"]' { textAlign = 'left' }
  190. 'markdown-table [data-align="center"]' { textAlign = 'center' }
  191. 'markdown-table [data-align="right"]' { textAlign = 'right' }
  192. '.message' { margin = '0' minHeight = '1.5em' color = colorDanger }
  193. // ---- ticket #12 → mission 016: the Markdown fields are the Hybriel MdEditor (components/md-editor/, its own Style off the
  194. // tokens). Not inside a <label>: a label hands its clicks to its first button — the editor's toolbar "B". `md-field` = the caption
  195. // above the editor, as a label looks
  196. mdField { display = 'grid' gap = '.25rem' }
  197. 'md-field > span' { fontSize = '.9rem' color = colorTextMuted }
  198. // ---- mission 016: the comments (components/comments/, the shared block with its own Style). In the history every run of
  199. // comments is one block in place: its count line, its "no comments" line and its form are not shown there (the block has no
  200. // switch for them); the form is the last block, under "Respond", which shows only the form. A deleted comment is one quiet line.
  201. // `contain: inline-size` (as markdownTable below): the history is a grid of auto columns, which would grow to a wide table's
  202. // min-content width inside a comment and push the page sideways — the table scrolls in its own box instead
  203. '#events > li.comments' { padding = '.3rem 0' background = 'transparent' contain = 'inline-size' }
  204. '#events comments-block h2.comments-count,
  205. #events comments-block .comments-empty,
  206. #events comments-block form.comment-form' { display = 'none' }
  207. '#events comments-block ol.comment-list' { margin = '0' }
  208. '#events > li.comment.deleted' { background = 'transparent' padding = '.2rem .7rem' fontStyle = 'italic' color = colorTextMuted }
  209. '#commentform h2.comments-count,
  210. #commentform .comments-empty,
  211. #commentform ol.comment-list' { display = 'none' }
  212. commentForm { display = 'block' }
  213. // ---- ticket #4: relations (parent, children, blocked by, blocks) ---------------------------
  214. ticketRelations { display = 'grid' gap = '.8rem' padding = '.8rem' background = colorSurface borderRadius = radiusLarge }
  215. 'ticket-relations h2' { margin = '0 0 .4rem' fontSize = '1rem' }
  216. 'ticket-relations p' { margin = '0' }
  217. '#parent a,
  218. .refs a' { display = 'inline-flex' alignItems = 'center' minHeight = layoutTap fontWeight = '600' whiteSpace = 'nowrap' }
  219. '.refsubject' { color = colorTextStrong overflowWrap = 'anywhere' }
  220. '#childnote' { margin = '0 0 .4rem' fontSize = '.9rem' color = colorTextMuted }
  221. '#childnote.done' { fontWeight = '600' color = colorSuccess }
  222. '.refs' { listStyle = 'none' margin = '0' padding = '0' display = 'grid' gap = '.35rem' }
  223. '.refs li' { display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem .6rem' }
  224. '.refs .unblock' { padding = '.1rem .6rem' fontSize = '.875rem' marginLeft = 'auto' }
  225. '#events > li.link' { background = 'transparent' padding = '.2rem .7rem' }
  226. '@media (min-width: 60rem)' = {
  227. '.tickets li' = { gridTemplateColumns = '8.5rem minmax(0, 1fr) auto' alignItems = 'center' gap = '1rem' }
  228. '#stateform' = { gridTemplateColumns = '14rem minmax(0, 1fr) auto' alignItems = 'end' }
  229. '#parentform,
  230. #blockerform' = { gridTemplateColumns = 'minmax(0, 1fr) auto' alignItems = 'end' }
  231. 'details form' = { maxWidth = '40rem' }
  232. 'ticket-filters nav' = { flexWrap = 'wrap' overflowX = 'visible' }
  233. '#members strong' = { flex = '1 1 8rem' }
  234. formButtons = { display = 'flex' flexWrap = 'wrap' }
  235. }

Branches

Latest commits

  • 81f10e4eident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre
  • f51029abMerge branch 'sy-sync'mre
  • eae6e8c7sync components.hybriel 4922f9c: comments like / Edit / Delete / 'edited' are 44 px targets; gate: 'edited' hit-area padding, thread targets check (SY)mre
  • 0de4750btheme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 4eeb7bfeST2 report wordingmre
  • 2558f56cst2-sec: keep the hlsid session cookie name (no one is signed out), Secure flag only; gate: a cookie issued by main stays signed in; ident stub serves selector.js; security.mjs in deploy GATESmre
  • ea2e440esecurity audit (ST): JSON body cap, relation rights, login session rotation, __Host- Secure cookie, API security headers, CSP+referrer meta, /connect cap, one-line subjects, tests/security.mjs, reportmre
  • 7c8c2282sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • b6277497report MT-mobile, LOGmre
  • 6709398blist paging: the newest rows come first (the sorted array was not used); filter rows hide their scrollbar; gate checks the ordermre
  • 31736a80gate: member-name check fails on the old row layout toomre
  • e03ae537gate: the phone checks run on without the Show more button (so old code reports every failed check)mre
  • adf7f132gate: 390 px checks for the mobile audit fixes (row number, filters, field widths, Edit, member names, relation taps, paging)mre
  • 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