completion-kit 0.5.24 → 0.5.26

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40c107320c801c5cfcb008355620aadb4bf8ec4776113f52dd5e2d5c130a2ce8
4
- data.tar.gz: 840088253b8efcd92163e858f4d95783889007c6b9c32662db3a1004225462a9
3
+ metadata.gz: 312676093066234886bea6d8cb908e669d045dfdb02660b2872266c6baeb3e59
4
+ data.tar.gz: '0974b8805e344059b9c063d7979b61ab9c08b2182a5438f230386d2244b29d91'
5
5
  SHA512:
6
- metadata.gz: b5efc624e8fe825ac927ec9bb87ffbc750e7862ec8aeb064a830d3f4b585136119db33a3f3d41a6064fb60db05fd93675bff9cb5b71007e9aea7722d79e6bdd6
7
- data.tar.gz: d664c0f3e623ba91750f2752b60b4f2bc147a08f8287558f3cff466a7da5d60242d8275db63e15c10ea818fe5fe6f2dc4066ff85a138383c2e10e6cdd2b79ace
6
+ metadata.gz: 2ab3528c3521917d7309bb95b8639645e17cfa28b250245cf33eefd6d9220548c7424592180ab6c911ae2bf181a5443a77395f8e4434e1c9043510fa67827ba9
7
+ data.tar.gz: 6b8ae35b53a6a82d164155978a324f1915211153818b90e53e808d1d6368f7345e27a1fef185c98f275d9f729c654f48e21dd83811c325e138abb96d72d42062
@@ -2837,6 +2837,19 @@ select.ck-input {
2837
2837
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
2838
2838
  z-index: 50;
2839
2839
  }
2840
+
2841
+ /* Dashboard prompt-changes row stacks instead of cramming the name into
2842
+ a few characters. */
2843
+ .ck-improvement {
2844
+ flex-direction: column;
2845
+ align-items: flex-start;
2846
+ gap: 0.3rem;
2847
+ }
2848
+ .ck-improvement__name { white-space: normal; }
2849
+ .ck-improvement__delta { min-width: 0; text-align: left; }
2850
+
2851
+ /* Onboarding's decorative field bleeds ±3rem past the page — clip it. */
2852
+ .ck-launch { overflow-x: clip; }
2840
2853
  }
2841
2854
 
2842
2855
  .ck-api-endpoint {
@@ -2911,6 +2924,10 @@ select.ck-input {
2911
2924
 
2912
2925
  .ck-token-toggle {
2913
2926
  transition: border-color 0.15s, color 0.15s;
2927
+ max-width: 100%;
2928
+ white-space: normal;
2929
+ overflow-wrap: anywhere;
2930
+ text-align: left;
2914
2931
  }
2915
2932
 
2916
2933
  .ck-token-toggle:hover {
@@ -3010,6 +3027,13 @@ select.ck-input {
3010
3027
  grid-template-columns: 1fr;
3011
3028
  }
3012
3029
 
3030
+ /* Without this the nav and panels keep their min-content width and spill
3031
+ past the single grid column — clipped by .ck-api-tabs' overflow:hidden. */
3032
+ .ck-api-tabs__nav,
3033
+ .ck-api-tabs__panels {
3034
+ min-width: 0;
3035
+ }
3036
+
3013
3037
  .ck-api-tabs__nav {
3014
3038
  flex-direction: row;
3015
3039
  flex-wrap: wrap;
@@ -3605,6 +3629,84 @@ table.ck-runs-table {
3605
3629
  white-space: nowrap;
3606
3630
  }
3607
3631
 
3632
+ /* List tables on a phone. A 4–6 column table can't fit a phone width, so each
3633
+ row becomes a stacked block — every cell on its own line, all content
3634
+ visible, nothing scrolling sideways and getting clipped. Placed after the
3635
+ base table rules so it wins on source order; the runs table overrides this
3636
+ with a tailored layout in the block below. */
3637
+ @media (max-width: 640px) {
3638
+ .ck-results-table,
3639
+ .ck-results-table tbody,
3640
+ .ck-results-table tr,
3641
+ .ck-results-table td {
3642
+ display: block;
3643
+ }
3644
+ .ck-results-table { overflow: hidden; }
3645
+ .ck-results-table thead { display: none; }
3646
+ .ck-results-table tr { padding: 0.85rem 0.3rem; }
3647
+ .ck-results-table td {
3648
+ width: auto !important;
3649
+ max-width: 100%;
3650
+ white-space: normal !important;
3651
+ padding: 0.3rem 0.3rem 0;
3652
+ }
3653
+ .ck-results-table td:first-child { padding-top: 0; }
3654
+ .ck-results-table td:empty { display: none; }
3655
+ .ck-results-table td.ck-results-table__arrow { display: none; }
3656
+ /* Each stacked cell carries the column name as a small label so a bare
3657
+ value ("10", "May 14") still reads clearly. */
3658
+ .ck-results-table td[data-label]::before {
3659
+ content: attr(data-label);
3660
+ display: block;
3661
+ margin-bottom: 0.12rem;
3662
+ font-family: var(--ck-mono);
3663
+ font-size: 0.62rem;
3664
+ letter-spacing: 0.07em;
3665
+ text-transform: uppercase;
3666
+ color: var(--ck-dim);
3667
+ }
3668
+ }
3669
+
3670
+ /* Runs table on a phone. Placed after the base .ck-runs-table rules so these
3671
+ win on source order. A 6-column table can't fit a phone, so each run row
3672
+ becomes a stacked block: the run name + sub-line take the full width on
3673
+ top, and the score / timestamp / arrow flow in a row beneath. The two
3674
+ secondary numeric columns (responses, metrics) are dropped — they live on
3675
+ the run's own page. */
3676
+ @media (max-width: 640px) {
3677
+ table.ck-runs-table { display: block; overflow-x: visible; }
3678
+ .ck-runs-table thead { display: none; }
3679
+ .ck-runs-table tbody { display: block; }
3680
+ .ck-runs-table tr {
3681
+ display: flex;
3682
+ flex-wrap: wrap;
3683
+ align-items: center;
3684
+ gap: 0.45rem 0.9rem;
3685
+ padding: 0.9rem 0;
3686
+ }
3687
+ .ck-runs-table td {
3688
+ display: block;
3689
+ padding: 0;
3690
+ }
3691
+ .ck-runs-table td:first-child { flex: 1 1 100%; }
3692
+ .ck-runs-table td:nth-child(2),
3693
+ .ck-runs-table td:nth-child(3) { display: none; }
3694
+ /* width overrides need column-level specificity to beat the base rules
3695
+ (the timestamp column otherwise keeps its desktop width: 1%). */
3696
+ .ck-runs-table td:first-child,
3697
+ .ck-runs-table td:nth-child(4),
3698
+ .ck-runs-table td:nth-child(5),
3699
+ .ck-runs-table td:last-child,
3700
+ .ck-runs-table td:has(time[data-relative-time]) { width: auto; }
3701
+ .ck-runs-table__identity { width: auto; }
3702
+ .ck-runs-table .ck-run-name strong {
3703
+ white-space: normal;
3704
+ overflow: visible;
3705
+ text-overflow: clip;
3706
+ }
3707
+ .ck-runs-table__config { white-space: normal; }
3708
+ }
3709
+
3608
3710
  .ck-response-cell__index {
3609
3711
  font-family: var(--ck-mono);
3610
3712
  font-size: 0.78rem;
@@ -3681,6 +3783,8 @@ table.ck-runs-table {
3681
3783
  border-radius: var(--ck-radius);
3682
3784
  border: 1px solid var(--ck-line);
3683
3785
  user-select: all;
3786
+ min-width: 0;
3787
+ overflow-wrap: anywhere;
3684
3788
  }
3685
3789
 
3686
3790
  .ck-prompt-preview__text {
@@ -4843,3 +4947,17 @@ a.tag-mark {
4843
4947
  color: var(--ck-dim);
4844
4948
  font-size: 0.7rem;
4845
4949
  }
4950
+
4951
+ /* On a phone the popover is anchored to a small mid-footer toggle, so a
4952
+ near-full-width panel spills off the left edge and clips the metric
4953
+ names. Pin it to the bottom of the viewport instead — a bottom sheet
4954
+ that spans the screen and can never clip. */
4955
+ @media (max-width: 640px) {
4956
+ .ck-flyout__panel {
4957
+ position: fixed;
4958
+ inset: auto 0.75rem 0.75rem 0.75rem;
4959
+ width: auto;
4960
+ max-width: none;
4961
+ max-height: 60vh;
4962
+ }
4963
+ }
@@ -35,9 +35,9 @@
35
35
  </div>
36
36
  <% end %>
37
37
  </td>
38
- <td><%= dataset.row_count %></td>
39
- <td><%= dataset.runs.count %></td>
40
- <td class="ck-meta-copy"><time datetime="<%= dataset.created_at.iso8601 %>"><%= dataset.created_at.strftime("%b %-d, %Y") %></time></td>
38
+ <td data-label="Rows"><%= dataset.row_count %></td>
39
+ <td data-label="Used in"><%= dataset.runs.count %></td>
40
+ <td data-label="Created" class="ck-meta-copy"><time datetime="<%= dataset.created_at.iso8601 %>"><%= dataset.created_at.strftime("%b %-d, %Y") %></time></td>
41
41
  <td class="ck-results-table__arrow">&rarr;</td>
42
42
  </tr>
43
43
  <% end %>
@@ -39,8 +39,8 @@
39
39
  </div>
40
40
  <% end %>
41
41
  </td>
42
- <td class="ck-meta-copy"><div class="ck-clamp-2"><%= metric_group.description.presence || "—" %></div></td>
43
- <td>
42
+ <td data-label="Description" class="ck-meta-copy"><div class="ck-clamp-2"><%= metric_group.description.presence || "—" %></div></td>
43
+ <td data-label="Members">
44
44
  <% if metric_group.metrics.any? %>
45
45
  <div class="ck-mg-members">
46
46
  <% metric_group.metrics.each do |m| %>
@@ -34,8 +34,8 @@
34
34
  </div>
35
35
  <% end %>
36
36
  </td>
37
- <td class="ck-meta-copy"><div class="ck-clamp-2"><%= metric.instruction.presence || "—" %></div></td>
38
- <td>
37
+ <td data-label="Instruction" class="ck-meta-copy"><div class="ck-clamp-2"><%= metric.instruction.presence || "—" %></div></td>
38
+ <td data-label="In groups">
39
39
  <% groups = metric.metric_groups %>
40
40
  <% if groups.any? %>
41
41
  <div class="ck-metrics-table__groups">
@@ -9,7 +9,7 @@
9
9
  <%= truncate(response.response_text.to_s, length: 160) %>
10
10
  <% end %>
11
11
  </td>
12
- <td>
12
+ <td data-label="Metrics">
13
13
  <% scored_reviews = response.reviews.select { |r| r.ai_score.present? }.sort_by { |r| r.metric_name.to_s.downcase } %>
14
14
  <% if scored_reviews.any? %>
15
15
  <span class="ck-metric-bar ck-metric-bar--compact">
@@ -24,14 +24,14 @@
24
24
  <span class="ck-response-cell__dim">—</span>
25
25
  <% end %>
26
26
  </td>
27
- <td>
27
+ <td data-label="Avg score">
28
28
  <% if response.reviewed? %>
29
29
  <span class="<%= ck_badge_classes(ck_score_kind(response.score.to_f)) %>"><%= response.score %></span>
30
30
  <% else %>
31
31
  <span class="ck-response-cell__dim">—</span>
32
32
  <% end %>
33
33
  </td>
34
- <td>
34
+ <td data-label="Status">
35
35
  <% case response.status
36
36
  when "pending" %>
37
37
  <span class="ck-chip">Queued</span>
@@ -26,7 +26,7 @@
26
26
  <% breakdown = by_type.map { |(_, type), n| pluralize(n, type.demodulize.titleize.downcase) }.join(" · ") %>
27
27
  <tr onclick="window.location='<%= edit_tag_path(tag) %>'" style="cursor: pointer;">
28
28
  <td><span class="tag-mark tag-mark--lg" style="--mark-color: var(--tag-<%= tag.color %>);"><%= tag.name %></span></td>
29
- <td class="ck-meta-copy">
29
+ <td data-label="Applied to" class="ck-meta-copy">
30
30
  <% if count.zero? %>
31
31
  <span class="ck-tags-table__unused">Not used yet</span>
32
32
  <% else %>
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.5.24"
2
+ VERSION = "0.5.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.24
4
+ version: 0.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin