Conversation
… adjust Logo layout
| <a | ||
| class={getClasses()} | ||
| href={props.href} | ||
| target={ | ||
| props["router-link"] || props.href?.startsWith("#") | ||
| ? undefined | ||
| : "_blank" | ||
| } | ||
| rel={ | ||
| props["router-link"] || props.href?.startsWith("#") | ||
| ? undefined | ||
| : "noreferrer noopener" | ||
| } | ||
| {...ariaLabel()} | ||
| {...(props["router-link"] ? { "router-link": "" } : {})} | ||
| onClick={() => props.onClick?.()} | ||
| onMouseEnter={() => props.onMouseEnter?.()} | ||
| onMouseLeave={() => props.onMouseLeave?.()} | ||
| {...props.dataset} | ||
| > | ||
| {content} |
There was a problem hiding this comment.
Button now allows onClick in BaseProps, and callers (e.g. nav start button) pass onClick while also providing href (anchor mode). The anchor branch never binds onClick, so the handler is silently ignored (restart-on-click etc. breaks). Either wire onClick onto the <a> element too, or disallow onClick when href is present (restore the onClick?: never typing + remove from BaseProps).
| @@ -11,17 +11,17 @@ import { | |||
| import { getConfig } from "../../signals/config"; | |||
| import { getActivePage } from "../../signals/core"; | |||
| import { showModal } from "../../stores/modals"; | |||
| import { qsr } from "../../utils/dom"; | |||
| // import { qsr } from "../../utils/dom"; | |||
| import { getNumberWithMagnitude } from "../../utils/numbers"; | |||
| import AsyncContent from "../common/AsyncContent"; | |||
| import { Button } from "../common/Button"; | |||
| import { ChartJs } from "../common/ChartJs"; | |||
| import { Fa } from "../common/Fa"; | |||
| import { H2, H3 } from "../common/Headers"; | |||
|
|
|||
| qsr("nav .view-about").on("mouseenter", () => { | |||
| prefetch(); | |||
| }); | |||
| // qsr("nav .view-about").on("mouseenter", () => { | |||
| // prefetch(); | |||
| // }); | |||
There was a problem hiding this comment.
This file now contains commented-out imports and a fully commented prefetch handler/function. If prefetch-on-hover is intentionally removed, delete the dead code; if it's still desired, re-enable it in a Solid-friendly way (e.g. attach onMouseEnter in the header/nav component and call queryClient.prefetchQuery(...)).
| it("saves to localstorage if nosave=false", async () => { | ||
| //GIVEN | ||
| replaceConfig({ numbers: false }); | ||
|
|
||
| //WHEN | ||
| Config.setConfig("numbers", true); | ||
|
|
||
| //THEN | ||
| //wait for debounce | ||
| await vi.advanceTimersByTimeAsync(2500); | ||
|
|
||
| //show loading | ||
| expect(accountButtonLoadingMock).toHaveBeenNthCalledWith(1, true); | ||
|
|
||
| //save | ||
| expect(dbSaveConfigMock).toHaveBeenCalledWith({ numbers: true }); | ||
|
|
||
| //hide loading | ||
| expect(accountButtonLoadingMock).toHaveBeenNthCalledWith(2, false); | ||
| }); |
There was a problem hiding this comment.
The config tests previously asserted the account spinner/loading toggling during debounced saves. That coverage was removed when migrating off AccountButton.loading(...). Consider replacing it with an assertion on the new mechanism (e.g. spy on setAccountButtonSpinner from signals/header) so regressions in spinner behavior are still caught.
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
…ter type handling
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
|
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. |
No description provided.