also looking at this
Promote main to production: signed-out chrome and the subscriber tables
#17
54 files
+4252
-1353
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -720,17 +720,30 @@ onMount(() => { | ||
| 720 | 720 | <Icon name="lucide:moon" size="17" class="h-[17px] w-[17px] ic-moon" /> |
| 721 | 721 | </button> |
| 722 | 722 | {{-- x-tooltip lives on this WRAPPER, not on the StxLink, and that is |
| 723 | load-bearing. component-renderer.ts:154-159 rewrites any x-* attribute | |
| 724 | on a COMPONENT to a `:` signal binding unless the name is in its | |
| 725 | ALPINE_PASSTHROUGH set — and x-tooltip is not in that set, even though | |
| 726 | the signals runtime lists it in X_HANDLED (signals.ts:2295) as an | |
| 727 | attribute it consumes itself. So x-tooltip="Settings" on the StxLink | |
| 728 | became :tooltip="Settings", stx tried to evaluate the bare identifier | |
| 729 | Settings as an expression, and the page logged | |
| 730 | "hydration invariant failed after DOMContentLoaded: 1 expression(s) | |
| 731 | never evaluated — Settings is not defined". Filed upstream. The same | |
| 732 | trap applies to <Icon> and every other component; a plain element is | |
| 733 | the only safe host until the two lists agree. | |
| 723 | still load-bearing — but not for the reason this comment used to give, | |
| 724 | so here is the current state measured on the installed 0.2.532. | |
| 725 | ||
| 726 | WHAT WAS WRONG AND IS NOW FIXED. component-renderer rewrites any x-* | |
| 727 | attribute on a COMPONENT to a `:` signal binding unless the name is in | |
| 728 | its ALPINE_PASSTHROUGH set, and x-tooltip was not in that set even | |
| 729 | though the runtime consumed it itself. So x-tooltip="Settings" became | |
| 730 | :tooltip="Settings", stx evaluated the bare identifier, and the page | |
| 731 | logged "hydration invariant failed after DOMContentLoaded: 1 | |
| 732 | expression(s) never evaluated — Settings is not defined". The two | |
| 733 | lists agree now: ALPINE_PASSTHROUGH is built FROM | |
| 734 | RUNTIME_HANDLED_X_ATTRS, which lists x-tooltip, so no rewrite happens | |
| 735 | and the crash is gone. | |
| 736 | ||
| 737 | WHAT IS STILL WRONG, AND IS QUIETER. The attribute escapes the | |
| 738 | rewrite and then never reaches the element: processComponents emits it | |
| 739 | only inside data-stx-props, while the tooltip runtime reads | |
| 740 | el.getAttribute("x-tooltip"). So x-tooltip on a component now costs | |
| 741 | the tooltip instead of the page. title and aria-label both forward to | |
| 742 | the concrete root correctly (stx#2063); x-tooltip falls in the gap | |
| 743 | between the two. Filed as stacksjs/stx#2077. | |
| 744 | ||
| 745 | So the wrapper stays, and a plain element is still the only safe host | |
| 746 | — for <Icon> and every other component too. | |
| 734 | 747 | |
| 735 | 748 | The span is inline-flex so it behaves as the same flex item the |
| 736 | 749 | anchor used to be, and the hover area is unchanged. --}} |
| @@ -1404,7 +1404,8 @@ onMount(() => { | ||
| 1404 | 1404 | |
| 1405 | 1405 | `title` instead would work and would be a different tooltip -- |
| 1406 | 1406 | the browser's, not the app's. Not worth trading a consistent |
| 1407 | surface for a spinner. Filed upstream; revisit when it lands. | |
| 1407 | surface for a spinner. Filed as stacksjs/stx#2077; revisit | |
| 1408 | when it lands. | |
| 1408 | 1409 | tests/unit/button-vocabulary.test.ts fails if a <Button> here |
| 1409 | 1410 | ever gets an x-tooltip. --}} |
| 1410 | 1411 | <button @click="removeMember('')" :disabled="removingMember() === ''" :text="memberBtnLabel('')" class="btn-danger btn-xs" x-tooltip="Remove">Remove</button> |