daily-focus 0.1.1-dev.11 → 0.1.1-dev.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daily-focus",
3
- "version": "0.1.1-dev.11",
3
+ "version": "0.1.1-dev.8",
4
4
  "description": "An interactive dashboard of what you should focus on today at work",
5
5
  "keywords": [
6
6
  "dashboard",
package/public/app.js CHANGED
@@ -2653,7 +2653,6 @@ function renderActions(item, state2, ui2, handlers2) {
2653
2653
  {
2654
2654
  type: "button",
2655
2655
  class: "button",
2656
- "aria-haspopup": "menu",
2657
2656
  "aria-expanded": String(ui2.menuFor.value === item.id),
2658
2657
  onClick: () => handlers2.toggleMenu(item.id)
2659
2658
  },
@@ -2677,9 +2676,9 @@ function renderSnoozeMenu(item, now, handlers2, { indefinite = true, longRange =
2677
2676
  presets.push(["Next month", addMonths(now, 1), true], ["Next quarter", addMonths(now, 3), true]);
2678
2677
  }
2679
2678
  let dateInput = null;
2680
- return k(
2681
- Menu,
2682
- { class: "menu" },
2679
+ return el(
2680
+ "div",
2681
+ { class: "menu", role: "menu" },
2683
2682
  presets.map(
2684
2683
  ([label, until, dated]) => el(
2685
2684
  "button",
@@ -2728,14 +2727,6 @@ function renderSnoozeMenu(item, now, handlers2, { indefinite = true, longRange =
2728
2727
  )
2729
2728
  );
2730
2729
  }
2731
- function Menu({ class: className, children }) {
2732
- const ref = A2(null);
2733
- _2(() => {
2734
- const node = ref.current;
2735
- if (node?.showPopover && !node.matches(":popover-open")) node.showPopover();
2736
- });
2737
- return el("div", { class: className, role: "menu", popover: "manual", ref }, children);
2738
- }
2739
2730
  function addDays(from, days) {
2740
2731
  return localDateKey(new Date(from.getFullYear(), from.getMonth(), from.getDate() + days));
2741
2732
  }
@@ -3078,7 +3069,6 @@ function renderPullActions(row, ui2, handlers2) {
3078
3069
  type: "button",
3079
3070
  class: "button",
3080
3071
  title: "Park this until a date",
3081
- "aria-haspopup": "menu",
3082
3072
  "aria-expanded": String(ui2.menuFor.value === row.id),
3083
3073
  onClick: () => handlers2.toggleMenu(row.id)
3084
3074
  },
@@ -3330,7 +3320,6 @@ function renderTicketStatus(row, state2, ui2, handlers2) {
3330
3320
  type: "button",
3331
3321
  class: "pill pill--status pill--button",
3332
3322
  title: `Move ${row.key} to another status`,
3333
- "aria-haspopup": "menu",
3334
3323
  "aria-expanded": String(ui2.statusFor.value === row.id),
3335
3324
  onClick: () => handlers2.toggleStatus(row.id)
3336
3325
  },
@@ -3347,9 +3336,9 @@ function ticketStatusOptions(row, state2) {
3347
3336
  }
3348
3337
  function renderStatusMenu(row, offered, ui2, handlers2) {
3349
3338
  const busy = ui2.pending.value.has(row.id);
3350
- return k(
3351
- Menu,
3352
- { class: "menu menu--status" },
3339
+ return el(
3340
+ "div",
3341
+ { class: "menu menu--status", role: "menu" },
3353
3342
  offered.map(
3354
3343
  (status) => el(
3355
3344
  "button",
@@ -3400,7 +3389,6 @@ function renderTicketActions(row, ui2, handlers2) {
3400
3389
  type: "button",
3401
3390
  class: "button",
3402
3391
  title: "Park this until a date",
3403
- "aria-haspopup": "menu",
3404
3392
  "aria-expanded": String(ui2.menuFor.value === row.id),
3405
3393
  onClick: () => handlers2.toggleMenu(row.id)
3406
3394
  },
package/public/style.css CHANGED
@@ -1152,29 +1152,14 @@ body[data-session-active='true'] #today .item:not([data-running='true']):focus-w
1152
1152
 
1153
1153
  /* snooze menu */
1154
1154
 
1155
- /*
1156
- * A popover in the top layer (`Menu` in client/items.ts says why), hung from the
1157
- * button that opened it. Only one menu is ever open, so only one button is
1158
- * expanded and the one anchor name is never ambiguous. `inset` and `margin`
1159
- * undo the popover's own centring on the viewport.
1160
- */
1161
- [aria-haspopup='menu'][aria-expanded='true'] {
1162
- anchor-name: --menu;
1163
- }
1164
-
1165
1155
  .menu {
1166
- position: fixed;
1167
- position-anchor: --menu;
1168
- inset: auto;
1169
- top: anchor(bottom);
1170
- right: anchor(right);
1171
- margin: 4px 0;
1172
- /* Above the button instead, when the window has no room left below it. */
1173
- position-try-fallbacks: flip-block;
1156
+ position: absolute;
1157
+ top: 34px;
1158
+ right: 10px;
1159
+ z-index: 5;
1174
1160
  /* Wide enough that the date field below still shows its own placeholder. */
1175
1161
  min-width: 204px;
1176
1162
  padding: 5px;
1177
- color: var(--ink-2);
1178
1163
  background: var(--surface);
1179
1164
  border: 1px solid var(--border);
1180
1165
  border-radius: var(--radius-sm);
@@ -1651,11 +1636,10 @@ body[data-view='settings'] .layout {
1651
1636
  * line up with the other tabs' however wide the display is. The 460px floor is
1652
1637
  * what drops it to one column on a narrow window rather than squeezing two.
1653
1638
  *
1654
- * An absolutely positioned child is still fragmented by the columns, and counts
1655
- * toward balancing them. `.item__actions` stays inside its card, so it travels
1656
- * with the card into its column and nothing notices. Anything that hangs below a
1657
- * card must not be in here at all: the row menus once were, and were split
1658
- * across both columns and pushed the next section down. They are popovers now.
1639
+ * The abspos worry that picked the grid does not apply: `.item` is
1640
+ * `position: relative`, so `.item__actions` and the snooze `.menu` resolve
1641
+ * against the card and travel with it into its column. Only a child resolving
1642
+ * against the multicol container itself would land beside the wrong row.
1659
1643
  */
1660
1644
  #tickets .list {
1661
1645
  display: block;
@@ -1852,13 +1836,14 @@ body[data-view='settings'] .layout {
1852
1836
  }
1853
1837
 
1854
1838
  /*
1855
- * Hung from the pill's left edge, where the park menu hangs from its button's
1856
- * right: the pill sits in the card's left gutter, so each menu opens toward the
1857
- * middle of its own card.
1839
+ * Anchored to the gutter rather than the card's right edge, unlike the park
1840
+ * menu: it belongs to the pill that opened it, and the two menus must not be
1841
+ * able to appear in the same place.
1858
1842
  */
1859
1843
  .menu--status {
1844
+ top: 26px;
1860
1845
  right: auto;
1861
- left: anchor(left);
1846
+ left: 0;
1862
1847
  min-width: 9rem;
1863
1848
  }
1864
1849