@alis-build/design-system 0.30.1 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/alisx.css CHANGED
@@ -528,6 +528,17 @@ button.app-card{border:0;font:inherit;width:100%}
528
528
  a.app-row,a.app-card{text-decoration:none}
529
529
  .app-row .text-supporting,.app-row .text-meta{color:var(--on-surface-variant)}
530
530
  .app-row--divided+.app-row--divided{border-top:1px solid var(--outline-variant)}
531
+ /* Field: a saved setting read back, its name over its value; the row opens its edit. The list reaches
532
+ 16 into the gutter so the names meet the heading's edge and the state layer runs past them; the line
533
+ between fields runs from the text's start to the glyph's end. Values wrap and stay in ink */
534
+ .app-list--fields{margin-inline:calc(var(--space-16) * -1)}
535
+ .app-row--field{position:relative;align-items:flex-start;padding:var(--space-16)}
536
+ .app-row--field .app-row__text{gap:var(--space-4)}
537
+ .app-row--field .app-row__text>*{overflow:visible;white-space:normal;overflow-wrap:anywhere}
538
+ .app-row--field .text-supporting{color:var(--on-surface)}
539
+ .app-row--field .text-supporting.text-on-surface-variant{color:var(--on-surface-variant)}
540
+ .app-row--field .app-row__trailing{min-height:24px;color:var(--on-surface-variant)}
541
+ .app-row--field+.app-row--field::after{content:"";position:absolute;top:0;left:var(--space-16);right:var(--space-16);border-top:1px solid var(--outline-variant);pointer-events:none}
531
542
  .app-row--nav{min-height:max(36px,var(--touch-target));border-radius:var(--radius-pill);padding:0 var(--space-16)}
532
543
  .app-row--nav .app-icon{font-size:24px;font-variation-settings:"FILL" 0,"wght" 400,"GRAD" 0,"opsz" 24}
533
544
  .app-row--agent-chat{min-height:max(var(--chat-row),var(--touch-target));padding:0 var(--space-8) 0 var(--space-16);border-radius:var(--radius-pill)}
@@ -551,6 +562,7 @@ a.app-row,a.app-card{text-decoration:none}
551
562
  .app-titlebar{display:flex;flex-direction:column;gap:var(--space-8);padding:var(--space-16) var(--space-24) 0}
552
563
  .app-titlebar__row{display:flex;align-items:center;gap:var(--space-16);min-height:var(--control-height)}
553
564
  .app-titlebar__name{display:flex;align-items:center;gap:var(--space-8);min-width:0;margin:0}
565
+ .app-titlebar__role{flex:none}
554
566
  .app-titlebar__title{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
555
567
  .app-titlebar__leading{margin-left:calc(var(--space-12) * -1)}
556
568
  .app-titlebar__actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8);margin-left:auto}
@@ -562,7 +574,7 @@ a.app-row,a.app-card{text-decoration:none}
562
574
  .app-search__input{flex:1;min-width:0;height:100%;padding:0;border:0;background:transparent;color:var(--on-surface);font:inherit;outline:none}
563
575
  .app-search__input::placeholder{color:var(--on-surface-variant);opacity:1}
564
576
  .app-tabs{display:flex;gap:var(--space-4);border-bottom:1px solid var(--outline-variant);overflow-x:auto;scrollbar-width:none}
565
- .app-tab{position:relative;flex:none;min-height:48px;padding:0 var(--space-32);border:0;background:transparent;color:var(--on-surface-variant);font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:500}
577
+ .app-tab{position:relative;flex:none;min-height:var(--control-height);padding:0 var(--space-32);border:0;background:transparent;color:var(--on-surface-variant);font-family:var(--font-sans);font-size:14px;line-height:20px;font-weight:500}
566
578
  .app-tab.is-selected{color:var(--on-surface);font-weight:700}
567
579
  .app-tab.is-selected::after{content:"";position:absolute;left:var(--space-32);right:var(--space-32);bottom:0;height:3px;border-radius:var(--radius-sm) var(--radius-sm) 0 0;background:var(--on-surface)}
568
580
  /* Detail: the bar of a detail pane. The pane pads it; the name drops to section-title
@@ -709,6 +721,9 @@ span.app-account__avatar{display:flex;align-items:center;justify-content:center;
709
721
  .app-empty>.app-avatar{margin-bottom:var(--space-8)}
710
722
  .app-empty__line{margin:0 0 var(--space-8);max-width:44ch;color:var(--on-surface-variant)}
711
723
  .app-empty-line{margin:0;color:var(--on-surface-variant)}
724
+ /* Access line: a request's state where the control that sent it was (Request sent, Declined), in meta and in ink: nothing failed. rules/access.md */
725
+ .app-access-line{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-4);margin:0;color:var(--on-surface-variant)}
726
+ .app-access-line .app-icon{font-size:16px}
712
727
  /* The drafting field around an empty state fills the pane with it */
713
728
  .app-empty-field{position:relative;overflow:hidden;flex:1;display:flex;flex-direction:column}
714
729
  .app-shell__content>.app-empty-field{margin:calc(var(--space-24) * -1) calc(var(--space-24) * -1) calc(var(--space-32) * -1)}
@@ -994,7 +1009,7 @@ button.app-attachment{border:0;color:inherit;font:inherit;text-align:left;cursor
994
1009
  .app-turn__line{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-4);margin:0;color:var(--on-surface-variant)}
995
1010
  .app-turn__line .app-icon{font-size:16px}
996
1011
  .app-turn__line.is-error{color:var(--error)}
997
- .app-turn__line-action,.app-empty-line__action{margin-left:var(--space-4);padding:0;border:0;background:none;color:var(--primary);font:inherit;font-weight:600;cursor:pointer}
1012
+ .app-turn__line-action,.app-empty-line__action,.app-access-line__action{margin-left:var(--space-4);padding:0;border:0;background:none;color:var(--primary);font:inherit;font-weight:600;cursor:pointer}
998
1013
  @media (hover:none){.app-turn__tools,.app-turn--alis:not(.is-latest) .app-turn__foot{display:none}}
999
1014
  /* What your message was about: the context chip as you sent it */
1000
1015
  .app-turn__about{max-width:80%;color:var(--on-surface-variant);text-align:right}
package/classes.json CHANGED
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "classes": [
3
+ "app-access-line",
4
+ "app-access-line__action",
3
5
  "app-account",
4
6
  "app-account__avatar",
5
7
  "app-account__text",
@@ -182,6 +184,7 @@
182
184
  "app-lattice",
183
185
  "app-lattice__eyebrow",
184
186
  "app-list",
187
+ "app-list--fields",
185
188
  "app-loader",
186
189
  "app-loader--line",
187
190
  "app-machine",
@@ -210,6 +213,7 @@
210
213
  "app-row",
211
214
  "app-row--agent-chat",
212
215
  "app-row--divided",
216
+ "app-row--field",
213
217
  "app-row--nav",
214
218
  "app-row__hit",
215
219
  "app-row__icon",
@@ -288,6 +292,7 @@
288
292
  "app-titlebar__lead",
289
293
  "app-titlebar__leading",
290
294
  "app-titlebar__name",
295
+ "app-titlebar__role",
291
296
  "app-titlebar__row",
292
297
  "app-titlebar__title",
293
298
  "app-token",
@@ -10,6 +10,7 @@ See [chips-alerts.md](../rules/chips-alerts.md).
10
10
  - **A panel that *is* the status is an alert; a panel that *has* one carries a chip.** A row or card with a status keeps its neutral fill and shows an [AppChip](AppChip.md).
11
11
  - **Where**: a page-level notice goes directly after the title bar, in the flow, so it moves the content down. In a detail pane, at the top of the pane under its bar.
12
12
  - **An error says what happened and what to do next**, and offers the next step as its one action ("View logs"). In words a person wrote: never a status code or the machine's own message ([errors.md](../rules/errors.md)). When there is nothing they can do, the action is Copy details, for support.
13
+ - **Refused for access** after they started ([access.md](../rules/access.md) § Refused anyway): it names the role and who can help, never "Try again", and its action is Request access where the product can ask. What they entered stays.
13
14
  - **The connection dropped**: one `warning` alert as the page-level notice, until it returns ("You're offline. What you do now may not be saved.").
14
15
  - **Narrow**: in the detail pane and below 600px the action stacks under the message automatically; `app-alert--stacked` does it anywhere.
15
16
  - **It stays** until the user acts again or leaves. It never times out.
@@ -47,6 +48,16 @@ See [chips-alerts.md](../rules/chips-alerts.md).
47
48
  </div>
48
49
  </div>
49
50
 
51
+ <!-- Refused anyway: their role changed mid-flow. Names the role and who can help; never Try again; what they entered stays -->
52
+ <div role="alert" class="app-alert app-alert--error">
53
+ <span class="app-icon" aria-hidden="true">error</span>
54
+ <div class="app-alert__body">
55
+ <strong class="app-alert__title">Couldn't create the interview</strong>
56
+ Only Editors can create interviews in Renewal calls, and you're now a Viewer. Ask Ruan Spies for Editor access.
57
+ </div>
58
+ <div class="app-alert__actions"><button type="button" class="app-btn app-state app-target" aria-haspopup="dialog">Request access</button></div>
59
+ </div>
60
+
50
61
  <!-- The connection dropped: the page-level notice, until it returns -->
51
62
  <div role="status" class="app-alert app-alert--warning">
52
63
  <span class="app-icon" aria-hidden="true">warning</span>
@@ -59,6 +59,7 @@ A band at the top of the composer's surface, above the editor, divided from it b
59
59
  | **Skip** | On a run of Alis's questions | Never |
60
60
 
61
61
  - **Decline asks for a reason**, because the requester reads it. Decline opens a field in the band, "Reason for Martha", and the actions become Back (text) and Decline (filled: nothing is destroyed, so not `error`). Focus moves to the field; Back returns it to Decline. An empty reason is an error at the field, which takes focus ([page.md](../rules/page.md) § Forms).
62
+ - **Access to a thing** ([access.md](../rules/access.md) § Asking for more): the title names the person, the role and the thing ("Give Priya Naidoo Editor access to Renewal calls?"), the body is their note in their words, and the filled action is Grant Editor access. Deciding updates the line where they asked: "Declined by Jan Krynauw: …" with Request again, or the controls their new role allows.
62
63
  - **One value at most** when the decision needs one (the organisation id when you set one up): an [AppTextField](AppTextField.md) above the actions, filled with what they suggested.
63
64
  - **Produce it**: the body says how, with the command in mono, and the action copies it (text). When it arrives in the thread as an [AppAttachment](AppAttachment.md) the ask closes and their request reads "Shared by Martha". Not now closes it, and the request reads "Not shared by Martha".
64
65
  - **Someone else decides first**: the band shows it on its line for a moment ("Granted by Jan Krynauw"), then closes. A reason you had started moves into the editor, so nothing you typed is lost.
@@ -9,6 +9,7 @@ See [chips-alerts.md](../rules/chips-alerts.md).
9
9
  - **Status**: a status tone plus its icon, always, so colour is never the only signal. Default icons: `error` → `error`, `warning` → `warning`, `success` → `check_circle`, `info` → `info`. Warning keeps its ink neutral and carries the colour in the icon.
10
10
  - **Label** (default): a neutral fact (a version, "3 days"). Content Alis wrote is labelled "AI-generated" with `auto_awesome`, once, at the top of what it wrote.
11
11
  - **Category**: `app-chip--cat1` … `--cat6`: the category's container (tone 95), its ink (tone 30) and a dot in its mark, drawn by the class. Light and dotted where a status is dark and iconed, so the two never look alike ([colour.md](../rules/colour.md) § Categories). It is already opaque. **Icon only** (`app-chip--icon`), as in an overlapping stack: the container and the glyph in its ink, no dot, since the glyph does the dot's job; it needs an `aria-label`. `app-chip--opaque` gives a label `surface-container-highest`, only where the chip overlaps or straddles other content.
12
+ - **The role chip** is a label with `visibility` ("Viewer") after a title bar's name ([AppTitleBar](AppTitleBar.md) § The role chip). Pressing it only opens the detail behind it, Sharing, so it stays a chip: pressable, with the state layer and a tooltip naming Sharing ([chips-alerts.md](../rules/chips-alerts.md)).
12
13
  - **Filter**: outlined and pressable; selected takes the selection fill, a check and weight 700.
13
14
  - **Input**: an outlined chip you can remove.
14
15
  - Never `primary`. If pressing it acts or navigates, it is an [AppButton](AppButton.md). In a row or table, `app-chip--small`.
@@ -10,6 +10,7 @@ One choice, or several, from a list too long to scan: the select's box opens a m
10
10
  - **One choice**: the chosen row is the menu's checked row (the selection fill, a trailing `check`). Choosing closes the menu.
11
11
  - **Several**: each row leads with a checkbox and takes no fill; the box alone says it is chosen. The menu stays open while you tick, and what is already chosen comes first each time it opens.
12
12
  - **Several, in a form: the box only adds, and the chosen are a list under it.** The box reads what you would add ("Add owners"), in `on-surface-variant`, whatever is chosen. Each choice is a row below ([AppListRow](AppListRow.md)): a person's avatar, their name and one supporting line, and a small `close` icon button that removes that one. Owners, members and who has access are sets people manage, so every one stays in view and nothing is cut short. Never chips, never names joined in the box.
13
+ - **Only the options they can use** ([access.md](../rules/access.md) § Choosing a target): never a disabled row. The field's supporting line says once what was left out ("Only projects you can edit are listed.").
13
14
  - **Only what the list holds.** Free text you add yourself (an email address, a tag) is the text field's Add action ([AppTextField](AppTextField.md)), not this.
14
15
  - **In the filter row** the trigger is the button that names its choice ([page.md](../rules/page.md) § The filter row); it opens this same menu when its list is long. With several chosen it reads as a count ("4 people"); with one, its name. A filter only has to say how much it narrows.
15
16
  - **Nothing found** is one line that echoes what you typed: *No country matches "atlantis"*. **Searching** a server past 300 ms is one line with the loader.
@@ -7,6 +7,8 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
7
7
  - Actions are [AppButton](AppButton.md)s on the trailing edge, affirmative last. A dialog is a screen of its own, so the affirmative is filled when it commits (`app-btn--filled`, with `app-btn--error` when it destroys) and the rest, Cancel always among them, are text. An affirmative that only opens, copies or reads stays text, so the whole dialog is text. The affirmative names the outcome ("Delete environment", not "OK"). A dialog is never heavier than what it interrupts, and never dark.
8
8
  - **Confirm** what is hard to undo or reaches past the user: deleting, sending to people, deploying to production. Restate it in the title as a question ("Delete staging?") and say what goes with it in the body.
9
9
  - **Signed out** is the one dialog with no Cancel: there is nothing to go back to. It sits over the screen as it was, Escape and the scrim don't close it, and signing in returns to the same screen ([errors.md](../rules/errors.md)).
10
+ - **Asking for access** ([access.md](../rules/access.md) § Asking for more) is a form in a dialog. The title asks for the role ("Ask for Editor access?"), the body names who will be asked ("Ruan Spies, the Owner of Renewal calls, will be asked."), one field takes an optional note ("Note for Ruan (optional)"), and Send request is the filled affirmative. After it sends, the control that opened it is replaced by "Request sent".
11
+ - **Sharing, seen by someone who can't change it**, lists the people with their roles as text (no role menus, no Remove), says what each role can do in the words of `words.json`, and has one line, "Only Owners can change Sharing.". Its actions are Close and, when they may ask, Request Editor access, both text: neither commits.
10
12
  - **A form in a dialog** (Invite people) follows the form rules: fields 24 apart, validated on submit, and persistent (Escape and the scrim don't close it). The dialog is the confirmation, so its affirmative ("Send 3 invites") needs no second one; it is the dialog's filled button.
11
13
 
12
14
  ## Markup
@@ -36,6 +38,43 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
36
38
  </div>
37
39
  </div>
38
40
 
41
+ <!-- Asking for access: who is asked, an optional note, Send request -->
42
+ <div class="app-scrim">
43
+ <div role="dialog" aria-modal="true" aria-labelledby="d-req-t" tabindex="-1" class="app-dialog">
44
+ <h2 id="d-req-t" class="app-dialog__title text-object-title">Ask for Editor access?</h2>
45
+ <div class="app-dialog__body text-body">Ruan Spies, the Owner of Renewal calls, will be asked.</div>
46
+ <form class="app-form" novalidate>
47
+ <div class="app-field">
48
+ <label for="d-req-note" class="app-field__label text-label">Note for Ruan (optional)</label>
49
+ <div class="app-field__box"><textarea id="d-req-note" class="app-field__input" rows="2"></textarea></div>
50
+ </div>
51
+ </form>
52
+ <div class="app-btn-row">
53
+ <button type="button" class="app-btn app-state app-target">Cancel</button>
54
+ <button type="button" class="app-btn app-state app-target app-btn--filled">Send request</button>
55
+ </div>
56
+ </div>
57
+ </div>
58
+
59
+ <!-- Sharing, seen by a Viewer: roles as text, what each can do, one line -->
60
+ <div class="app-scrim">
61
+ <div role="dialog" aria-modal="true" aria-labelledby="d-share-t" tabindex="-1" class="app-dialog">
62
+ <h2 id="d-share-t" class="app-dialog__title text-object-title">Sharing</h2>
63
+ <div class="app-dialog__body">
64
+ <div class="app-list" role="list" aria-label="People with access">
65
+ <div class="app-row" role="listitem"><span class="app-avatar" aria-hidden="true">RS</span><span class="app-row__text"><span class="text-object-title">Ruan Spies</span></span><span class="app-row__meta text-meta">Owner</span></div>
66
+ <div class="app-row" role="listitem"><span class="app-avatar" aria-hidden="true">JK</span><span class="app-row__text"><span class="text-object-title">Jan Krynauw</span></span><span class="app-row__meta text-meta">Editor</span></div>
67
+ <div class="app-row" role="listitem"><span class="app-avatar" aria-hidden="true">PN</span><span class="app-row__text"><span class="text-object-title">Priya Naidoo (you)</span></span><span class="app-row__meta text-meta">Viewer</span></div>
68
+ </div>
69
+ <p class="text-supporting text-on-surface-variant">Editors can create and change what's in it. Viewers can open and read it. Only Owners can change Sharing.</p>
70
+ </div>
71
+ <div class="app-btn-row">
72
+ <button type="button" class="app-btn app-state app-target">Close</button>
73
+ <button type="button" class="app-btn app-state app-target">Request Editor access</button>
74
+ </div>
75
+ </div>
76
+ </div>
77
+
39
78
  <!-- In the flow, for docs: no scrim, no aria-modal, no focus handling -->
40
79
  <div class="app-scrim app-scrim--inline">…</div>
41
80
  <!-- or the .app-dialog alone -->
@@ -48,6 +87,7 @@ A dialog: `surface-container-high` (white in light) at `elevation-3`, an object-
48
87
  - **Close** on Escape, on a press of the scrim itself (`mousedown` whose target is the `.app-scrim`, not the dialog), and on Cancel. A persistent dialog (a form) ignores Escape and the scrim.
49
88
  - **On close**: remove the scrim and return focus to the remembered element if it is still in the document.
50
89
  - Mount one dialog at a time.
90
+ - **Asking for access**: Send request shows its work on the button; on success close the dialog, return focus to where the request's state now stands, and replace the control that opened it with that state. A failure stays in the dialog as an error alert at its top, with the note still there ([errors.md](../rules/errors.md)).
51
91
 
52
92
  ## Classes
53
93
 
@@ -13,6 +13,7 @@ See [page.md](../rules/page.md).
13
13
  - A detail pane with nothing open, beside a list that has items, takes it without a button: choosing from the list is the first step, and the bar already holds New. Its headline says what opens here.
14
14
  - It sits in the centre of the pane, from the title bar's foot to the window's, as the pane's only content: a view switch or a drop hint goes with the list, and a docked composer floats over the pane rather than shortening it. `.app-empty` centres itself in what it is given, so give it the whole pane.
15
15
  - **A pane that can't show its content** (it couldn't load, they may not open it, it isn't there) is this same block without the drafting field: a headline in ink that says what couldn't happen, one line that says what to do, one outlined action. Never red: nothing they did failed. In a detail pane or a card the headline is `text-section-title`. The words for each case are in [errors.md](../rules/errors.md).
16
+ - **When the person's role can't do what the button did** ([access.md](../rules/access.md) § A role): the headline stays, the line says who can and who to ask ("Only Editors can create interviews. Ask Ruan Spies for Editor access."), and the action is Request access, outlined, with no glyph. Where the product can't send a request, there is no button. After they send one, the button is replaced by the request's state (`.app-access-line`): "Request sent · Waiting for Ruan Spies", or "Declined by Ruan Spies: …" with Request again. Never the drafting field: this isn't an invitation.
16
17
  - **One section that couldn't load** is an empty line with Try again beside it (`.app-empty-line__action`); the rest of the screen stays.
17
18
  - An empty line inside working content ("No files yet" in a tab) is not this: use one supporting line, `.app-empty-line`.
18
19
 
@@ -61,10 +62,43 @@ See [page.md](../rules/page.md).
61
62
  <div class="app-empty">
62
63
  <span class="app-avatar app-avatar--thing app-avatar--large" aria-hidden="true"><span class="app-icon" aria-hidden="true">lock</span></span>
63
64
  <h2 class="app-empty__headline text-page-title">You don't have access to Renewal calls</h2>
64
- <p class="app-empty__line text-supporting">Ask one of its owners to add you.</p>
65
+ <p class="app-empty__line text-supporting">Ask Ruan Spies to add you.</p>
65
66
  <button type="button" class="app-btn app-state app-target app-btn--outlined">Request access</button>
66
67
  </div>
67
68
 
69
+ <!-- A Viewer: the act isn't theirs; the line says who can, and they can ask -->
70
+ <div class="app-empty">
71
+ <span class="app-avatar app-avatar--thing app-avatar--large" aria-hidden="true"><span class="app-icon" aria-hidden="true">forum</span></span>
72
+ <h2 class="app-empty__headline text-page-title">No interviews yet</h2>
73
+ <p class="app-empty__line text-supporting">Only Editors can create interviews. Ask Ruan Spies for Editor access.</p>
74
+ <button type="button" class="app-btn app-state app-target app-btn--outlined" aria-haspopup="dialog">Request access</button>
75
+ </div>
76
+
77
+ <!-- A Viewer who has asked: the request's state replaces the button -->
78
+ <div class="app-empty">
79
+ <span class="app-avatar app-avatar--thing app-avatar--large" aria-hidden="true"><span class="app-icon" aria-hidden="true">forum</span></span>
80
+ <h2 class="app-empty__headline text-page-title">No interviews yet</h2>
81
+ <p class="app-empty__line text-supporting">Only Editors can create interviews. Ask Ruan Spies for Editor access.</p>
82
+ <p class="app-access-line text-meta"><span class="app-icon" aria-hidden="true">schedule</span>Request sent · Waiting for Ruan Spies</p>
83
+ </div>
84
+
85
+ <!-- Declined: the reason, in ink, and Request again -->
86
+ <div class="app-empty">
87
+ <h2 class="app-empty__headline text-page-title">No interviews yet</h2>
88
+ <p class="app-empty__line text-supporting">Only Editors can create interviews. Ask Ruan Spies for Editor access.</p>
89
+ <p class="app-access-line text-meta"><span class="app-icon" aria-hidden="true">block</span>Declined by Ruan Spies: Jan is running the calls<button type="button" class="app-access-line__action">Request again</button></p>
90
+ </div>
91
+
92
+ <!-- Can read it, not change it: a link into an editor they may not use -->
93
+ <div class="app-empty">
94
+ <h2 class="app-empty__headline text-page-title">Only Editors can change the research plan</h2>
95
+ <p class="app-empty__line text-supporting">Ask Ruan Spies for Editor access.</p>
96
+ <button type="button" class="app-btn app-state app-target app-btn--outlined" aria-haspopup="dialog">Request access</button>
97
+ </div>
98
+
99
+ <!-- Couldn't check what they may do: one line leading the content, with Try again -->
100
+ <p class="app-empty-line text-supporting">Couldn't check what you can change here.<button type="button" class="app-empty-line__action">Try again</button></p>
101
+
68
102
  <!-- Not there -->
69
103
  <div class="app-empty">
70
104
  <h2 class="app-empty__headline text-page-title">This project doesn't exist</h2>
@@ -86,4 +120,4 @@ See [page.md](../rules/page.md).
86
120
 
87
121
  ## Classes
88
122
 
89
- `.app-empty`, `.app-empty__headline`, `.app-empty__line`, `.app-empty-line`, `.app-empty-line__action`, `.app-empty-field`; the drafting field: `.ax-field`, `.ax-field__glow`, `.ax-field__grid`, `.ax-field__noise`.
123
+ `.app-empty`, `.app-empty__headline`, `.app-empty__line`, `.app-empty-line`, `.app-empty-line__action`, `.app-access-line`, `.app-access-line__action`, `.app-empty-field`; the drafting field: `.ax-field`, `.ax-field__glow`, `.ax-field__grid`, `.ax-field__noise`.
@@ -1,6 +1,6 @@
1
1
  # AppListRow
2
2
 
3
- A row in a list, the navigation pane or the agent chat list.
3
+ A row in a list, the navigation pane, the agent chat list, or a read-back of saved settings.
4
4
 
5
5
  ## Use / don't use
6
6
 
@@ -9,7 +9,8 @@ A row in a list, the navigation pane or the agent chat list.
9
9
  - **Content** (default): a row in a content list. Title in object-title, an optional supporting line, an optional trailing slot (a small status [AppChip](AppChip.md), an [AppIconButton](AppIconButton.md)) and a meta value at the end. Selected takes the full `secondary-container` fill.
10
10
  - **Nav** (`app-row--nav`): a destination in the navigation pane ([AppShell](AppShell.md)). 36px, 24px icon, label type, pill shape. The pane is permanent chrome, so its selected row takes the quieter `selection-chrome`. A heading over a group of rows is `.app-nav-heading`, which sets its own type. A destination that can create takes a small `add` [AppIconButton](AppIconButton.md) in its trailing slot ("New project"). A destination where Alis is waiting on you takes `.app-count` there instead: the number of asks, in `error` like every notification badge ([AppAsk](AppAsk.md)).
11
11
  - **Agent chat** (`app-row--agent-chat`): the agent chat list, 32px rows, and nothing else. It is not a density option: no other list may use it, however alike it looks ([spacing.md](../rules/spacing.md)). Its menu button is 24px and projects no target.
12
- - `app-row--divided` draws a hairline between consecutive rows.
12
+ - **Field** (`app-row--field`, in an `app-list--fields`): one saved setting read back, on a screen that shows what was chosen and lets you change it (an interview's setup, its review before publishing, a settings page). The name is the row's title in object-title; the value is supporting **in ink**, under it, wrapping to as many lines as it has, a second fact on a line of its own. A value not set takes `text-on-surface-variant` and says what happens instead ("Not set. Alis will open the conversation."). The trailing slot holds the `edit` [AppIcon](AppIcon.md), not a button: the row is the target and opens the edit in place, so there is one stop per row and no tooltip. A field that can't change has no glyph, no hit and no `app-state`, and says why on a further line in `text-on-surface-variant`; when it is their role that stops them, the line says who can ("Only Owners can change this."), and for a Viewer every field reads back this way with no line on each: the bar's role chip already says it ([access.md](../rules/access.md)). A line runs between fields, never above the first or below the last. The list reaches 16 into the gutter so the names meet the heading's edge; never margin or pad it at a site. The name is a name, not a question ("Length", not "How long should it take?"); the edit form's label may ask.
13
+ - `app-row--divided` draws a hairline between consecutive rows. A field list draws its own.
13
14
  - Selection is always two properties: the fill, and the icon at FILL 1 with the text at 700 (the CSS does both from `is-selected`).
14
15
  - **Three or four facts about each item?** Title, then the rest joined with " · " in the supporting line (`europe-west1 · v1.42.3 · main`), the state as a trailing chip, the time as meta. Once people compare values across items, or sort by them, use [AppTable](AppTable.md).
15
16
  - A trailing control is 32px at most and projects no target, so the row never grows (the CSS enforces it). Below 600px a content row drops its meta so the title keeps room.
@@ -48,6 +49,31 @@ The row is a container; its title is the one button or link (`.app-row__hit`) an
48
49
  </div>
49
50
  <p class="app-nav-heading">Recent chats</p>
50
51
 
52
+ <!-- Field list: saved settings read back -->
53
+ <div class="app-list app-list--fields" role="list" aria-label="The plan">
54
+ <div class="app-row app-state app-row--field" role="listitem">
55
+ <span class="app-row__text">
56
+ <button type="button" class="app-row__hit text-object-title" aria-label="Edit length">Length</button>
57
+ <span class="text-supporting">About 10 minutes</span>
58
+ </span>
59
+ <span class="app-row__trailing"><span class="app-icon" aria-hidden="true">edit</span></span>
60
+ </div>
61
+ <div class="app-row app-state app-row--field" role="listitem">
62
+ <span class="app-row__text">
63
+ <button type="button" class="app-row__hit text-object-title" aria-label="Edit opening question">Opening question</button>
64
+ <span class="text-supporting text-on-surface-variant">Not set. Alis will open the conversation.</span>
65
+ </span>
66
+ <span class="app-row__trailing"><span class="app-icon" aria-hidden="true">edit</span></span>
67
+ </div>
68
+ <div class="app-row app-row--field" role="listitem">
69
+ <span class="app-row__text">
70
+ <span class="text-object-title">Answers</span>
71
+ <span class="text-supporting">Names kept with answers</span>
72
+ <span class="text-supporting text-on-surface-variant">Locked because people have joined.</span>
73
+ </span>
74
+ </div>
75
+ </div>
76
+
51
77
  <!-- Agent chat row -->
52
78
  <div class="app-row app-state app-row--agent-chat">
53
79
  <span class="app-row__text"><button type="button" class="app-row__hit text-label">Why did staging fail?</button></span>
@@ -62,8 +88,9 @@ Order inside the row: icon, text, trailing, meta.
62
88
  - **Content row you select**: on press toggle `is-selected` on the row and `aria-pressed` on the hit (and `app-icon--filled` on its icon); clear the previous selection. A row that can't be selected has no `aria-pressed`.
63
89
  - **Nav row**: `is-selected` on the row and `aria-current="page"` on the hit for the current destination; update both on route change.
64
90
  - Focus lands on the hit; the CSS draws the focus ring on the whole row.
91
+ - **Field row**: on press, replace the row with its edit form in place (labels above, Cancel and Save on the trailing edge; Save is filled unless the screen already holds its one filled action, as a review before publishing does), one field at a time; on save or cancel, show the row again and return focus to its hit. The hit's accessible name is the verb and the name ("Edit length").
65
92
  - Controls in the trailing slot are siblings of the hit, never inside it.
66
93
 
67
94
  ## Classes
68
95
 
69
- `.app-list`, `.app-row`, `.app-row--nav`, `.app-row--agent-chat`, `.app-row--divided`, `.is-selected`, `.app-row__icon`, `.app-row__text`, `.app-row__hit`, `.app-row__trailing`, `.app-row__meta`, `.app-nav-heading`, with `.app-state` on every row.
96
+ `.app-list`, `.app-row`, `.app-row--nav`, `.app-row--agent-chat`, `.app-row--divided`, `.app-list--fields`, `.app-row--field`, `.is-selected`, `.app-row__icon`, `.app-row__text`, `.app-row__hit`, `.app-row__trailing`, `.app-row__meta`, `.app-nav-heading`, with `.app-state` on every row.
@@ -9,6 +9,7 @@ One choice from a list you can name in advance: a native select in the text fiel
9
9
  - A placeholder names the choice when there is no default ("Choose a branch"); prefer a sensible default.
10
10
  - Without a visible label (a select in the filter row, left of the main control), give the select an `aria-label`.
11
11
  - Past about ten options, or to choose several, use an [AppCombobox](AppCombobox.md).
12
+ - **Only the options they can use** ([access.md](../rules/access.md) § Choosing a target). A target their role doesn't let them act on (a project they can only read) isn't listed: never a disabled option. The supporting line says once what was left out: "Only projects you can edit are listed." With one option left, choose it and show no field; with none, there is no form.
12
13
 
13
14
  ## Markup
14
15
 
@@ -30,6 +31,19 @@ One choice from a list you can name in advance: a native select in the text fiel
30
31
  <!-- options -->
31
32
  </select>
32
33
 
34
+ <!-- Only the targets they can use, and a line saying what was left out -->
35
+ <div class="app-field">
36
+ <label for="f-proj" class="app-field__label text-label">Project</label>
37
+ <div class="app-field__box app-field__box--select">
38
+ <select id="f-proj" class="app-field__select" aria-describedby="f-proj-s">
39
+ <option value="renewals" selected>Renewal calls</option>
40
+ <option value="onboarding">Onboarding research</option>
41
+ </select>
42
+ <span class="app-icon" aria-hidden="true">expand_more</span>
43
+ </div>
44
+ <p id="f-proj-s" class="app-field__support text-supporting">Only projects you can edit are listed.</p>
45
+ </div>
46
+
33
47
  <!-- Error: is-error on .app-field, aria-invalid + aria-describedby on the select, support line as in AppTextField -->
34
48
  <div class="app-field is-error">
35
49
  <label for="f-r2" class="app-field__label text-label">Region</label>
@@ -12,8 +12,11 @@ See [page.md](../rules/page.md).
12
12
  - **Never status.** The bar names the screen and holds its verbs: no meter, no usage ring, no saving state, no count. A thing's state is a chip on the detail bar's row or in the content; an account's usage is a row in the account menu ([AppShell](AppShell.md) § The account menu).
13
13
  - **No line at rest.** The bar lies on the ground with the content; a line under it would split the screen into a header and a body. While the bar stays put and content scrolls under it, it takes `is-scrolled`: an `outline-variant` hairline at its foot, gone again at the top. Never a permanent border and never a shadow: a shadow means floating, and the composer and menus float. Tabs keep their own line at every scroll; at rest it is the bar's edge.
14
14
  - **The verbs follow the route**: each tab shows the verbs that act on what it shows, and none when there is nothing to act on.
15
+ - **And they follow the role** ([access.md](../rules/access.md)). A verb the person's role doesn't allow isn't drawn: not in the bar and not in ⋯.
16
+ - **The role chip.** When the person's role can't change the thing at all (a Viewer), a label [AppChip](AppChip.md) after the name says the role, led by `visibility`: "Viewer". It is who they are here, not a status. It is pressable: it opens Sharing, where they see their role, what each role can do, and Request access, and its tooltip names that ("Sharing"). It shows on every screen of the thing, including the screens inside it. On a phone it leaves the bar and ⋯ leads with Sharing, its second line "You're a Viewer". No chip for an Owner or an Editor.
15
17
  - **A long name** truncates with an ellipsis and shows in full on hover; never wrap it.
16
18
  - **Tabs are routes**, and scroll sideways when they don't fit: each opens another view of this screen (Overview, Interviews, Artifacts). A tab that narrows one list is a filter: put it in the filter row as an [AppSegmented](AppSegmented.md).
19
+ - **Tabs are the control height**, 36 and 48 on touch, like the row above them. The bar sets their height, alignment and ink; a screen never does ([styling.md](../rules/styling.md)).
17
20
  - **No search in the bar.** The bar names the screen and holds its verbs; search narrows the list, so it leads the filter row ([page.md](../rules/page.md) § Search).
18
21
  - **The filter row** is the first thing in `.app-shell__content` (which pads it), one row that narrows the list: search first, then the filters, then the count at the far end ("12 interviews", "3 of 12" while something narrows). Below 600px, search takes the whole first line.
19
22
  - **When the list is empty**, keep the name and the verb; hide search and the filter row.
@@ -68,6 +71,28 @@ The tabs scroll under it; the filter row is unchanged. Mark the parts that exist
68
71
  </header>
69
72
  <!-- m-bar: Set project goal, Rename, Share, a divider, Delete project -->
70
73
 
74
+ <!-- A Viewer's bar: no verbs they can't use; the role chip after the name opens Sharing -->
75
+ <header class="app-titlebar">
76
+ <div class="app-titlebar__row">
77
+ <div class="app-titlebar__name">
78
+ <span class="app-titlebar__leading">
79
+ <button type="button" class="app-icon-btn app-state app-target app-icon-btn--small" aria-label="Back to projects" title="Back to projects"><span class="app-icon" aria-hidden="true">arrow_back</span></button>
80
+ </span>
81
+ <h1 class="app-titlebar__title text-page-title" title="Renewal calls">Renewal calls</h1>
82
+ <button type="button" class="app-chip app-state app-titlebar__role app-wide-only" aria-haspopup="dialog" aria-label="Viewer. Open Sharing" title="Sharing"><span class="app-icon" aria-hidden="true">visibility</span>Viewer</button>
83
+ </div>
84
+ <div class="app-titlebar__actions">
85
+ <button type="button" class="app-icon-btn app-state app-target app-icon-btn--small" aria-label="More project actions" title="More project actions" aria-haspopup="menu" aria-expanded="false"><span class="app-icon" aria-hidden="true">more_vert</span></button>
86
+ </div>
87
+ </div>
88
+ <nav class="app-tabs">
89
+ <button type="button" class="app-tab app-state">Overview</button>
90
+ <button type="button" class="app-tab app-state is-selected" aria-current="page">Interviews</button>
91
+ <button type="button" class="app-tab app-state">Artifacts</button>
92
+ </nav>
93
+ </header>
94
+ <!-- On a phone ⋯ leads with Sharing, its second line "You're a Viewer" -->
95
+
71
96
  <!-- Detail bar: h2 in section-title, no search, no tabs -->
72
97
  <header class="app-titlebar app-titlebar--detail">
73
98
  <div class="app-titlebar__row">
@@ -118,8 +143,9 @@ The tabs scroll under it; the filter row is unchanged. Mark the parts that exist
118
143
  - **The count** answers the row: the total at rest, "2 of 5" while a query or a filter narrows.
119
144
  - **Tabs**: they are routes. Move `is-selected` and `aria-current="page"` to the current tab when the route changes. If your router renders links, `<a class="app-tab app-state" href="…">` takes the same classes.
120
145
  - Hide search and the filter row when the list is empty.
146
+ - **The role chip**: draw it only once the role is known, with the verbs ([access.md](../rules/access.md) § Before it is known). Pressing it opens Sharing; when the role changes (a request granted), remove it and draw the verbs the new role allows.
121
147
  - **`is-scrolled`** on the bar while what scrolls under it has left the top (its `scrollTop` is above 0), and off again at the top. Where the bar scrolls away with the page, nothing is under it: leave it off.
122
148
 
123
149
  ## Classes
124
150
 
125
- `.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`, `.is-scrolled`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
151
+ `.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`, `.app-titlebar__role`, `.is-scrolled`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alis-build/design-system",
3
- "version": "0.30.1",
3
+ "version": "0.33.0",
4
4
  "description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks, words and rules.",
5
5
  "keywords": ["alisx", "design-system", "design-tokens", "css"],
6
6
  "homepage": "https://alisx.com",
package/rules/README.md CHANGED
@@ -25,6 +25,7 @@ Read only what the job needs.
25
25
  | [chips-alerts.md](chips-alerts.md) | Chips, alerts, status |
26
26
  | [loading.md](loading.md) | Skeleton, loader, progress |
27
27
  | [errors.md](errors.md) | What shows when something fails, can't load, isn't allowed or isn't there |
28
+ | [access.md](access.md) | What someone's role doesn't let them do: what leaves, what says why, asking for more |
28
29
  | [page.md](page.md) | Page anatomy, forms, empty states |
29
30
  | [email.md](email.md) | Every email: the jobs, the shell and its blocks, subjects, the sender |
30
31
  | [words.md](words.md) | One name per thing (`words.json`), who speaks, labels, the verbs for getting rid of something |
@@ -0,0 +1,208 @@
1
+ # What someone may not do
2
+
3
+ ## The one rule
4
+
5
+ **Know what they may do before they start, and show only that.** The screen
6
+ asks what the person's role allows before it draws its verbs. When the service
7
+ refuses something after the person has started it, the screen got it wrong, not
8
+ the person: they should never have been offered it.
9
+
10
+ ## The decision
11
+
12
+ ```
13
+ Why can't they do it?
14
+ ├─ Their role on this thing doesn't allow it → the control leaves (§ A role);
15
+ │ (a Viewer; an Editor who can't delete) a Viewer's role is named in the bar
16
+ ├─ Their place in the account doesn't allow it → the control leaves; the empty state
17
+ │ (creating a project, a landing zone) says who to ask (§ The account)
18
+ ├─ It isn't possible yet: a state or a limit → disabled, the reason beside it
19
+ │ (no published version; 12 of 12 seats) (errors.md § What they may not do)
20
+ ├─ They may not open this at all → the No access pane state (errors.md)
21
+ ├─ They came in by a link or an offer → the same check as the screen it opens
22
+ │ (§ Ways in)
23
+ ├─ They choose a target, and some aren't theirs → only theirs are listed (§ Choosing a target)
24
+ ├─ Whether they may isn't known yet, or the
25
+ │ check failed → the controls stay out (§ Before it is known)
26
+ └─ The service refused anyway → an error alert that keeps their work
27
+ (§ Refused anyway)
28
+ ```
29
+
30
+ ## A role
31
+
32
+ - **The control leaves.** An act the role doesn't allow isn't drawn anywhere:
33
+ not in the bar, ⋯, a row, a menu or a section's heading row. A role never
34
+ disables a control: disabled means "not yet", and a screen full of them is a
35
+ wall. Their shortcut leaves with them ([shortcuts.md](shortcuts.md)).
36
+ - **A Viewer's role is named once, in the bar.** When the role can't change the
37
+ thing at all, a label chip beside the screen's name says the role ("Viewer",
38
+ led by `visibility`). Pressing it opens Sharing, which holds their role, what
39
+ each role can do, and Request access ([AppTitleBar](../components/AppTitleBar.md)
40
+ § The role chip). It shows on every screen of that thing. It is never an alert,
41
+ a banner or a dialog when they arrive.
42
+ - **A role that can do part of it gets no chip.** An Editor who can change the
43
+ thing but not delete it keeps their acts, loses the rest, and finds their role
44
+ in Sharing.
45
+ - **Where the act was the first step, that place says who can.** This happens in
46
+ two places only. First, an empty state whose button would have created
47
+ something: the headline stays, the line becomes "Only Editors can create
48
+ interviews. Ask Ruan Spies for Editor access.", and the action becomes Request
49
+ access ([AppEmptyState](../components/AppEmptyState.md)). Second, a section
50
+ whose only content was its Add: the same words as one empty line
51
+ (`.app-empty-line`). Nowhere else; never a line beside every missing button.
52
+ - **What they can read reads back.** A settings screen is the field list with no
53
+ `edit` glyphs and no hit ([AppListRow](../components/AppListRow.md) § Field).
54
+ In a form they can otherwise change, a value outside their role reads back the
55
+ same way: its name, its value, and the reason on a line under it ("Only Owners
56
+ can change this."). Never a disabled field or switch.
57
+ - **Sharing, for someone who can't change it**, lists the people with their roles
58
+ as text, says what each role can do, and has one line: "Only Owners can change
59
+ Sharing." No disabled role menus and no disabled Remove.
60
+
61
+ ## The account
62
+
63
+ Some acts need a place in the account rather than a role on a thing: creating a
64
+ project or a landing zone, or sharing a skill with every builder.
65
+
66
+ - **The control leaves**, as it does for a role.
67
+ - **The empty state says who to ask.** "Projects shared with you show here." and
68
+ "To create one, ask an admin of Acme." When the product can send the request,
69
+ Request access is the action.
70
+ - **When the list has items, the screen doesn't repeat it.** Their place in the
71
+ account is shown where the account's members are.
72
+ - **A limit the account has reached** (12 of 12 seats) is "not yet": disabled,
73
+ with the reason beside it, and the way to raise the limit if they may.
74
+
75
+ ## Ways in
76
+
77
+ Every way in checks the same thing as the screen it opens.
78
+
79
+ - **A link to an editor** (a research plan, report instructions, a route) opens
80
+ the thing's read view when it has one, with the role chip. When it has none,
81
+ the link opens a pane state ([errors.md](errors.md) § A pane that can't show
82
+ its content): "Only Editors can change the research plan", "Ask Ruan Spies for
83
+ Editor access.", Request access. Never the editor, with Save refused at the end.
84
+ - **Alis offers only what the person can do.** A card's "New interview" or
85
+ "Conduct research" is made only when their role allows it. A card already in
86
+ the thread whose act they no longer may do keeps its content and loses its
87
+ action.
88
+ - **A chooser** (a list of projects to open something in) is § Choosing a target.
89
+
90
+ ## Choosing a target
91
+
92
+ A new interview in which project, a workstation in which environment, a Code
93
+ session for which product.
94
+
95
+ - **List only the targets they can act on**, with one supporting line under the
96
+ field saying what was left out: "Only projects you can edit are listed." Never
97
+ a disabled option, and never a target that is refused once it is chosen.
98
+ - **When there is only one**, choose it for them and show no field.
99
+ - **When there are none**, there is no form: its place is the pane state, saying
100
+ who can and who to ask, with the act they can do instead as its action ("You
101
+ can't create interviews in any project yet", "Ask a project's Owner for Editor
102
+ access, or create a project.", New project).
103
+
104
+ ## Before it is known
105
+
106
+ - **While the check runs, the controls it decides aren't drawn.** The bar's verbs
107
+ arrive with the content, under the same skeleton ([loading.md](loading.md)).
108
+ Never draw them and then take them away.
109
+ - **When the check fails, the controls stay out.** The content they can read
110
+ stays, and one line leads the content with Try again beside it: "Couldn't
111
+ check what you can change here." (`.app-empty-line`). Never offer everything
112
+ and let the service refuse.
113
+
114
+ ## Refused anyway
115
+
116
+ The check passed and the service said no. Perhaps their role changed while they
117
+ worked, or a rule only the service knows applied.
118
+
119
+ - **One error alert at the top of the form or step, and everything they entered
120
+ stays** ([errors.md](errors.md) § Something they did failed).
121
+ - **It names the role and who can help, never "Try again"**: "Couldn't create the
122
+ interview", then "Only Editors can create interviews in Renewal calls, and
123
+ you're now a Viewer. Ask Ruan Spies for Editor access." Its one action is
124
+ Request access, where the product can ask.
125
+ - **The screen checks again**, so the chip and the controls catch up with the
126
+ role.
127
+ - **The screen must be able to tell this refusal apart.** A call refused for
128
+ access has to say so in a form the screen can read, not only in a message.
129
+
130
+ ## Acts that destroy, deploy or reach people
131
+
132
+ Delete, Destroy and Deploy to production follow the same rules: they leave when
133
+ the role doesn't allow them, and are confirmed by a dialog when it does
134
+ ([page.md](page.md) § Forms). Never the browser's own prompt, alert or confirm
135
+ box. Typing a name to confirm never stands in for a role check.
136
+
137
+ ## Several at once
138
+
139
+ The bar that acts on chosen rows is not designed yet
140
+ ([known-gaps.md](known-gaps.md)). Whatever shape it takes:
141
+
142
+ - **Its action counts what it will act on**: "Remove 3" when 5 are chosen and 2
143
+ are beyond their role, with a line in the bar saying why: "2 are Owners. Only
144
+ Owners can remove Owners."
145
+ - **When some fail at the service**, one alert says what was done and what
146
+ wasn't ("Granted 4. Couldn't grant 2: only Owners of Build can."), and the rows
147
+ that failed stay chosen.
148
+
149
+ ## Asking for more
150
+
151
+ **Request access appears only where the product can send the request.** Where it
152
+ can't, the line that names who to ask stands alone.
153
+
154
+ - **It goes to whoever can grant it, and the screen names them**: a thing's
155
+ Owners, an account's admins for a place in the account, the platform's
156
+ curators for what only they grant. Two names at most, then the count: "Ruan
157
+ Spies, Jan Krynauw and 2 other Owners".
158
+ - **The request is a dialog** ([AppDialog](../components/AppDialog.md) § Asking
159
+ for access). Its title asks for the role ("Ask for Editor access?"), its body
160
+ says who will be asked, and it has one field, "Note for Ruan (optional)". The
161
+ actions are Cancel, then Send request, filled.
162
+ - **Afterwards the control is replaced by its state**, one line in meta
163
+ (`.app-access-line`): `schedule` "Request sent · Waiting for Ruan Spies". It is
164
+ there on every visit until someone decides, and Request access isn't offered
165
+ again meanwhile.
166
+ - **Declined**: `block` "Declined by Ruan Spies: Jan is running the calls", in
167
+ ink and never red, with Request again as its text action.
168
+ - **Granted**: the controls arrive and the chip leaves. If they are on the screen
169
+ when it happens, a snackbar says so: "You're now an Editor on Renewal calls".
170
+ - **The person deciding sees an ask** ([AppAsk](../components/AppAsk.md) § Who
171
+ asks): "Give Priya Naidoo Editor access to Renewal calls?", with the note as
172
+ its body.
173
+ - **Not decided yet**: withdrawing a request, turning requests off, and approval
174
+ chains ([known-gaps.md](known-gaps.md)).
175
+
176
+ ## The words
177
+
178
+ | Where | Say |
179
+ | --- | --- |
180
+ | The role chip | the role's name: "Viewer" |
181
+ | Where the act was the first step | "Only Editors can create interviews. Ask Ruan Spies for Editor access." |
182
+ | A value they can't change | "Only Owners can change this." |
183
+ | Sharing they can't change | "Only Owners can change Sharing." |
184
+ | The account | "To create one, ask an admin of Acme." |
185
+ | A target list with some left out | "Only projects you can edit are listed." |
186
+ | The check failed | "Couldn't check what you can change here." with Try again |
187
+ | Refused anyway | "Couldn't save the interview", then "Only Editors can change it, and you're now a Viewer. Ask Ruan Spies for Editor access." |
188
+ | A request | "Ask for Editor access?", "Request sent · Waiting for Ruan Spies", "Declined by Ruan Spies: …", "You're now an Editor on Renewal calls" |
189
+
190
+ - **Roles are names**, capitalised wherever they name the role: Owner, Editor,
191
+ Viewer ("Ask one of its Owners"). What each can do is in `words.json`, and
192
+ Sharing says it in those words.
193
+ - **Name the person** when the product knows who can grant it. When it doesn't,
194
+ name the role.
195
+ - **"Access" is the word for being let in**: "You don't have access", "Request
196
+ access", "Editor access". Never "permission" or "permissions", "rights",
197
+ "access level", "read-only" (the lattice's word), "view-only" or "Read only".
198
+
199
+ ## Before you hand it back
200
+
201
+ 1. Sign in as a Viewer and walk every screen you touched. Is any control drawn
202
+ that the service would refuse?
203
+ 2. Open each link into an editor, and each Alis offer, as a Viewer. Does any open
204
+ a form?
205
+ 3. Make the check fail. Does anything appear that the service could refuse?
206
+ 4. Take the role away halfway through a form. Is everything entered still there,
207
+ and does the alert say who to ask?
208
+ 5. Is "permission" written anywhere a person reads?
package/rules/errors.md CHANGED
@@ -23,7 +23,9 @@ What went wrong?
23
23
  │ asked for the refresh
24
24
  ├─ They may not open this, or it isn't there → a pane state in the content's place
25
25
  ├─ They may not do this one thing → the control leaves, or says why
26
- │ beside it
26
+ │ beside it (access.md)
27
+ ├─ The service refused what they had begun → the error alert, naming who can
28
+ │ help (access.md § Refused anyway)
27
29
  ├─ The connection dropped → one page-level notice until it
28
30
  │ returns
29
31
  ├─ They were signed out → a dialog over the screen as it was
@@ -67,7 +69,7 @@ environment. Check the name, then try again."
67
69
  | It will likely work again | "Try again.", with Try again as the action |
68
70
  | It needs a moment | "Wait a moment, then try again." |
69
71
  | They need to change something | what to change: "Use lowercase letters, numbers and hyphens only." |
70
- | Someone else has to act | who: "Ask one of its owners to add you." |
72
+ | Someone else has to act | who, by name when the product knows: "Ask Ruan Spies to add you."; otherwise the role: "Ask one of its Owners to add you." ([access.md](access.md) § The words) |
71
73
  | Nothing they can do | what happens to their work, and **Copy details** for support |
72
74
 
73
75
  - **Details for support are copied, never shown.** Copy details is the notice's
@@ -86,7 +88,8 @@ neutral tile.
86
88
  | | Headline | Line | Action |
87
89
  | --- | --- | --- | --- |
88
90
  | **Couldn't load** | "Couldn't load environments" | "Check your connection, then try again." | Try again, led by `refresh` |
89
- | **No access** | "You don't have access to Renewal calls" | "Ask one of its owners to add you." | Request access, where the product can ask |
91
+ | **No access** | "You don't have access to Renewal calls" | "Ask Ruan Spies to add you." | Request access, where the product can ask |
92
+ | **Can read it, not change it** (a link into an editor) | "Only Editors can change the research plan" | "Ask Ruan Spies for Editor access." | Request access, where the product can ask |
90
93
  | **Not there** | "This project doesn't exist" | "It may have been deleted, or the link may be wrong." | Go to projects |
91
94
  | **The service won't say which** | "You can't open this project" | "It may have been deleted, or you may not have access. Ask the person who sent you the link." | Go to projects |
92
95
 
@@ -118,9 +121,13 @@ neutral tile.
118
121
 
119
122
  ## What they may not do
120
123
 
121
- - **Never theirs here**: leave the control out. The bar's verbs follow what can
122
- be done ([page.md](page.md) § The title bar).
123
- - **Theirs, but not now** (it needs a published version first, a limit is
124
+ The whole of it, from roles to asking for more, is [access.md](access.md). In
125
+ short:
126
+
127
+ - **Not theirs** (their role or their place in the account doesn't allow it):
128
+ leave the control out. The bar's verbs follow what can be done
129
+ ([page.md](page.md) § The title bar), and a Viewer's role is named in the bar.
130
+ - **Theirs, but not yet** (it needs a published version first, a limit is
124
131
  reached): the control stays, disabled, with the reason in a supporting line
125
132
  beside it. Never in a tooltip ([AppTooltip](../components/AppTooltip.md)), and
126
133
  a lead that starts disabled is text until it can act
@@ -5,7 +5,7 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
5
5
  ## Components not in the set
6
6
 
7
7
  - **Date and time pickers**. Use a text field with a format hint.
8
- - **A bar of actions for several chosen rows** ("3 selected"). [AppCheckbox](../components/AppCheckbox.md) chooses them; what acts on them has no pattern yet.
8
+ - **A bar of actions for several chosen rows** ("3 selected"). [AppCheckbox](../components/AppCheckbox.md) chooses them; what acts on them has no pattern yet. When some of the chosen are beyond the person's role, how the bar counts and reports them is already settled ([access.md](access.md) § Several at once).
9
9
  - **The marketing components** (`.ax-*`, alisx.com) are not in this package: it covers the product register. A layout class for a grid of lattices is missing too.
10
10
  - **What the Skill store and the Specialists offer**, beyond their one-line descriptions in [README.md](README.md). Marketing copy about them needs a product brief.
11
11
  - **File upload**, and a **dismissible alert**.
@@ -15,7 +15,8 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
15
15
  - **Finding anything across the product** (a project, an interview, a skill, an environment) from any screen. A screen's search narrows the list in front of you ([page.md](page.md) § Search); this is a different job. The likely shape is a Search row at the top of the rail with ⌘ K (reserved for it: [shortcuts.md](shortcuts.md)), opening a dialog grouped like the `@` menu, once a search across products exists.
16
16
  - **Navigation inside a project.** Open objects can sit in the navigation pane as secondary rows under a heading ([AppShell](../components/AppShell.md)), and an object's own views are route tabs in its title bar. A project's own destinations beside the app's have no pattern yet.
17
17
  - **Versions of generated content.** Regenerating replaces a synthesis; keeping or comparing earlier versions has no pattern.
18
- - **Withdrawing a request, and approval chains.** A person can't withdraw a request they made, and a request that needs several approvers in turn has no pattern ([AppAsk](../components/AppAsk.md) § Who asks). An approval chain would be its own component: its parts and interaction differ.
18
+ - **Withdrawing a request, turning requests off, and approval chains.** A person can't withdraw a request they made, Owners can't choose whether anyone may ask, and a request that needs several approvers in turn has no pattern ([AppAsk](../components/AppAsk.md) § Who asks, [access.md](access.md) § Asking for more). An approval chain would be its own component: its parts and interaction differ.
19
+ - **An account's own roles, and seats.** `words.json` names the roles on a thing (Owner, Editor, Viewer); an account's roles (an admin, a builder, a curator) and its seats are not in it yet. Say what the person needs in the screen's own words ("ask an admin of Acme"), and add the entries with the first change.
19
20
  - **Build's and Admin's words.** `words.json` names what Alis Ideate and every product share; Build's own things (an environment, a workstation, a build partner) are not in it yet. Name them as the screen already does, and add the entry with the first change ([words.md](words.md)).
20
21
  - **A log viewer.** "View logs" goes to the logs' own screen; there is no pattern for showing logs inside a pane.
21
22
  - **Each product's destinations** (the rows under its heading in the rail) are product content, not part of this system. Use the capability marks for the tools they name.
package/rules/page.md CHANGED
@@ -66,6 +66,10 @@ means another route.
66
66
  back or close button pulls its glyph onto the 24px edge the title uses.
67
67
  - **The verbs follow the route**: each route tab shows the verbs that act on what
68
68
  it shows, and none when nothing can be done.
69
+ - **And they follow the role**: a verb the person's role doesn't allow isn't
70
+ drawn. When their role can't change the thing at all, a label chip after the
71
+ name says the role ("Viewer") and opens Sharing. That is who they are here, not
72
+ a status ([access.md](access.md) § A role).
69
73
 
70
74
  ## Close or back
71
75
 
@@ -263,6 +267,23 @@ leads its content with it, or leaves it out. What a failure shows, and where, is
263
267
  at the top.
264
268
  - **A switch** applies at once on its own, and with the rest on Save inside a form.
265
269
 
270
+ ### Settings read back
271
+
272
+ A screen that shows what was chosen and lets you change it (an interview's
273
+ setup, its review before publishing, a settings page) is a **field list**
274
+ ([AppListRow](../components/AppListRow.md) § Field), never the form itself
275
+ left open, and never a card per setting.
276
+
277
+ - **The name leads, the value follows**: the name in object-title, the value
278
+ under it in ink, so the eye finds the setting by its name and reads what it
279
+ holds. One line between fields; groups under a `section-title`, 48 apart.
280
+ - **One shape for every value**, a sentence or a paragraph or a date: never a
281
+ name-left column for the short ones and a stack for the long.
282
+ - **The row opens its edit in place**, one at a time; its `edit` glyph is an
283
+ icon, not a button. A field that can't change says why instead.
284
+ - **Names are names** from `words.json`; a question belongs to the edit form's
285
+ label ([words.md](words.md)).
286
+
266
287
  ### A form in steps
267
288
 
268
289
  ```
@@ -67,6 +67,7 @@ AppShell
67
67
  | Waiting, shape unknown | `AppLoader` |
68
68
  | Work you can count (a deploy, an upload) | `AppProgress`, with `AppSteps` for named stages |
69
69
  | A screen or pane that couldn't load, or that they can't open | `AppEmptyState` without the drafting field: what couldn't happen, what to do, one action ([errors.md](errors.md)) |
70
+ | Something their role doesn't let them do | leave it out; a Viewer gets the role chip in the bar, and an empty state says who can ([access.md](access.md)) |
70
71
  | Something they did failed | one `AppAlert tone="error"` at the top of the form or pane, in words a person wrote; never a snackbar, never the machine's message |
71
72
  | Nothing yet | `AppEmptyState` filling the pane; keep the bar's name and verb, hide search and the filter row |
72
73
 
package/rules/styling.md CHANGED
@@ -15,6 +15,7 @@ the same split holds.
15
15
  | Shadow | `elevation-1`, `-2`, `-3`, or nothing ([spacing.md](spacing.md)). Never a shadow and a border |
16
16
  | Font, size, line height, tracking, weight | A `text-*` style. Beside it: `.text-mono` (the face), `.text-emphasis` (600), `.text-selected` (700, selection only) |
17
17
  | Spacing | `space-*` |
18
+ | A component's size: height, density, padding | The component: one size, or the sizes its guide names. Never chosen at a site, a framework's size prop (`density`, `size`, `height`) included |
18
19
  | Hover, focus, pressed on a plain element | The state layer, `.app-state` ([selection.md](selection.md)) |
19
20
  | Rendered markdown | `.prose`, `.prose-compact` ([type.md](type.md)). Never reach into prose to restyle it |
20
21
  | A card chosen among others | [AppSelectTile](../components/AppSelectTile.md) |
@@ -28,6 +29,11 @@ inherit the system. Never fight the framework with a local override, a
28
29
  forced-priority rule (`!important`) or a selector reaching into a component's
29
30
  internals: settle it once, app-wide, in the theme, or not at all.
30
31
 
32
+ **A component looks the same wherever it is used.** Its size, ink and alignment
33
+ are set once, in the theme, so a site only places it. A size prop at a site is a
34
+ local override like any other: when every page has to remember `density`, the
35
+ one that forgets looks different, and nothing tells you which one is right.
36
+
31
37
  ## May stay at a site
32
38
 
33
39
  - **Layout.** Grid templates and placement, flex, widths and min/max sizes (never
@@ -100,5 +106,6 @@ The package ships what can be linted, so every app checks the same things
100
106
  theme) is known once the file that declares it is named.
101
107
 
102
108
  Check by hand what a linter can't see: a computed style binding, a value behind
103
- a variable of your own, and a case transform in code (`toUpperCase()` on
104
- displayed text), which shouts exactly as `text-transform` would.
109
+ a variable of your own, a case transform in code (`toUpperCase()` on
110
+ displayed text), which shouts exactly as `text-transform` would, and a size
111
+ prop on a component in a template, unless the app's own template lint fails it.
package/rules/type.md CHANGED
@@ -105,7 +105,8 @@ subtitle is never body.
105
105
  | Shape | Role |
106
106
  | --- | --- |
107
107
  | A note beside a dialog's message, tinted or not | supporting; the message stays body |
108
- | A key and its value | the key meta in `on-surface-variant`, the value supporting in ink. On one line ("Current balance: 40 credits") the whole line is the value's: supporting in ink |
108
+ | A key and its value, inside a line, a cell, a tooltip or a stat | the key meta in `on-surface-variant`, the value supporting in ink. On one line ("Current balance: 40 credits") the whole line is the value's: supporting in ink |
109
+ | A saved setting read back, its name over its value (a field list) | the name is the row's title, object-title; the value supporting in ink, wrapping; a value not set the same role in `on-surface-variant`, saying what happens instead ([AppListRow](../components/AppListRow.md) § Field). The name leads, because people find the setting by it |
109
110
  | A value with its verb ("Updated 3 minutes ago") | meta |
110
111
  | A card's only title | object-title, whatever the card's size |
111
112
  | A caption naming the one block below it ("What we learned") | a key: meta in `on-surface-variant`, and the block keeps the role it would have alone. Over a list, table or set of stats it is a group heading instead |
@@ -122,7 +123,7 @@ subtitle is never body.
122
123
  | A not-applicable value ("None", "n/a") | meta in `on-surface-variant`. Disabled styling is for disabled controls only |
123
124
  | A placeholder in a name's slot ("Pending title…") | the name's role, in `on-surface-variant`, so the row keeps its height |
124
125
  | A status line | the role its position gives it, in its status ink; a warning line keeps the role's ink beside a `warning` icon |
125
- | A pane filled by an error, or by a state that is not a failure (no permission, nothing yet) | under its own heading, supporting; an error with no heading is body |
126
+ | A pane filled by an error, or by a state that is not a failure (no access, nothing yet) | under its own heading, supporting; an error with no heading is body |
126
127
  | An empty line inside working content | one supporting line ([page.md](page.md)) |
127
128
  | An empty state inside working content with a heading and a hint | supporting on both, and report the copy: [page.md](page.md) asks for one line |
128
129
  | A drop target's line | supporting, in `primary` while something is dragged over |
package/words.json CHANGED
@@ -44,7 +44,31 @@
44
44
  "product": "all",
45
45
  "means": "Who can open a thing, and what they can do with it. The page and the dialog are Sharing; the action that opens them is Share. The roles are Owner, Editor and Viewer.",
46
46
  "retired": ["Access and ownership", "Add owners"],
47
- "avoid": ["permissions", "IAM"]
47
+ "avoid": ["permissions", "permission", "IAM", "rights", "access level", "read-only (the lattice's word)", "view-only"]
48
+ },
49
+ {
50
+ "name": "Owner",
51
+ "plural": "Owners",
52
+ "product": "all",
53
+ "means": "A role on a thing. Can do everything an Editor can, and change Sharing. Capitalised wherever it names the role: \"Ask one of its Owners\".",
54
+ "retired": [],
55
+ "avoid": ["admin (of a thing)"]
56
+ },
57
+ {
58
+ "name": "Editor",
59
+ "plural": "Editors",
60
+ "product": "all",
61
+ "means": "A role on a thing. Can create and change what is in it. \"Editor access\" is what someone asks for.",
62
+ "retired": [],
63
+ "avoid": ["contributor", "member (of a thing)"]
64
+ },
65
+ {
66
+ "name": "Viewer",
67
+ "plural": "Viewers",
68
+ "product": "all",
69
+ "means": "A role on a thing. Can open and read everything in it, and change nothing. Named in the title bar's role chip.",
70
+ "retired": ["Read only", "View only"],
71
+ "avoid": ["read-only", "view-only", "guest"]
48
72
  },
49
73
  {
50
74
  "name": "credits",
@@ -161,6 +185,55 @@
161
185
  "retired": [],
162
186
  "avoid": ["responses"]
163
187
  },
188
+ {
189
+ "name": "purpose",
190
+ "product": "ideate",
191
+ "means": "What an interview needs to find out. Alis works from it, and the report is written against it.",
192
+ "retired": [],
193
+ "avoid": ["objective"],
194
+ "code": "plan.objective"
195
+ },
196
+ {
197
+ "name": "instructions for Alis",
198
+ "product": "ideate",
199
+ "means": "How Alis should run an interview: tone, areas to cover, what to avoid. Participants don't see them.",
200
+ "retired": [],
201
+ "avoid": ["interviewer instructions"],
202
+ "code": "plan.instructions"
203
+ },
204
+ {
205
+ "name": "opening question",
206
+ "plural": "opening questions",
207
+ "product": "ideate",
208
+ "means": "The first thing Alis asks in an interview. Not set, Alis opens the conversation.",
209
+ "retired": [],
210
+ "avoid": ["opener"],
211
+ "code": "plan.opener"
212
+ },
213
+ {
214
+ "name": "length",
215
+ "product": "ideate",
216
+ "means": "How long an interview should take. Alis paces the conversation to it.",
217
+ "retired": [],
218
+ "avoid": ["duration (of an interview)", "target minutes"],
219
+ "code": "plan.targetMinutes"
220
+ },
221
+ {
222
+ "name": "report focus",
223
+ "product": "ideate",
224
+ "means": "What an interview's report should concentrate on: its focus, audience and length. Participants don't see it.",
225
+ "retired": [],
226
+ "avoid": ["report instructions"],
227
+ "code": "reportInstructions"
228
+ },
229
+ {
230
+ "name": "materials",
231
+ "product": "ideate",
232
+ "means": "What participants can look at during an interview, and the background Alis reads that participants don't see.",
233
+ "retired": [],
234
+ "avoid": ["review materials", "references (an interview's background)"],
235
+ "code": "plan.reviewMaterials, plan.references"
236
+ },
164
237
  {
165
238
  "name": "summary",
166
239
  "product": "ideate",
@@ -216,6 +289,7 @@
216
289
  { "name": "Delete", "means": "It stops existing for everyone, and nobody can bring it back from the product." },
217
290
  { "name": "Remove", "means": "It leaves this place and still exists: a person from Sharing, a project from a collection, a file from a message." },
218
291
  { "name": "Archive", "means": "Only where there is a place to find archived things and bring them back. Otherwise it is Delete." },
219
- { "name": "Share", "means": "Opens Sharing." }
292
+ { "name": "Share", "means": "Opens Sharing." },
293
+ { "name": "Request access", "means": "Asks whoever can grant it for a role here, with an optional note (rules/access.md). Afterwards the control reads \"Request sent\" until they decide; a refusal reads \"Declined by …\" with Request again." }
220
294
  ]
221
295
  }