Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: test headless over-prefetching with 1.12.1 #1047

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"packageManager": "[email protected]",
"devDependencies": {
"@axe-core/playwright": "^4.9.1",
"@builder.io/qwik": "^1.9",
"@builder.io/qwik-city": "^1.9",
"@builder.io/qwik": "https://pkg.pr.new/@builder.io/qwik@7324",
"@builder.io/qwik-city": "https://pkg.pr.new/@builder.io/qwik-city@7324",
"@changesets/cli": "^2.27.3",
"@changesets/get-github-info": "^0.6.0",
"@changesets/types": "^6.0.0",
Expand Down Expand Up @@ -97,7 +97,7 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-playwright": "^1.6.2",
"eslint-plugin-qwik": "^1.9",
"eslint-plugin-qwik": "https://pkg.pr.new/eslint-plugin-qwik@7324",
"focus-trap": "7.5.4",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
useContextProvider,
sync$,
} from '@builder.io/qwik';
import { useBoundSignal } from '../../utils/bound-signal';
import { CheckboxContext } from './checkbox-context';
import type { QwikIntrinsicElements } from '@builder.io/qwik';
import { useBoundSignal } from '../../utils/bound-signal';

type AllowedElements = 'li' | 'div' | 'span';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
Orientation,
toggleGroupRootApiContextId,
} from './toggle-group-context';
import { KeyCode } from '../../utils';
import { Toggle } from '../toggle';
import { KeyCode } from '../../utils/key-code.type';

type NavigationKeys =
| KeyCode.ArrowRight
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ToggleGroupMultipleProps,
ToggleGroupSingleProps,
} from './toggle-group-root';
import { useBoundSignal } from '../../utils/bound-signal2';
import { useBoundSignal } from '../../utils/bound-signal';

function useRootItemsRepo() {
const items = useSignal<Map<ItemId, Signal<Item>>>(new Map());
Expand Down
2 changes: 1 addition & 1 deletion packages/kit-headless/src/components/toggle/toggle.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PropsOf, QRL, Signal } from '@builder.io/qwik';
import { $, component$, Slot, sync$, useTask$ } from '@builder.io/qwik';
import { useBoundSignal } from '../../utils/bound-signal2';
import { useBoundSignal } from '../../utils/bound-signal';

export type ToggleProps = PropsOf<'button'> & {
/**
Expand Down
10 changes: 5 additions & 5 deletions packages/kit-headless/src/utils/bound-signal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { createSignal, Signal, useConstant } from '@builder.io/qwik';

/**
* Creates a bound signal that synchronizes with an external signal if provided.
* This hook is useful for two-way binding scenarios, especially when dealing with
Expand All @@ -10,11 +12,9 @@
* The returned signal will update the external signal (if provided) whenever its value changes,
* and will also update itself when the external signal changes.
*/

import { createSignal, Signal, useConstant } from '@builder.io/qwik';

export const useBoundSignal = <T,>(
givenSignal?: Signal<T>,
initialValue?: T,
): Signal<T> =>
useConstant(() => givenSignal || (createSignal(initialValue) as Signal<T>));
): Signal<T> => {
return useConstant(() => givenSignal || (createSignal(initialValue) as Signal<T>));
}
20 changes: 0 additions & 20 deletions packages/kit-headless/src/utils/bound-signal2.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/kit-headless/src/utils/index.ts

This file was deleted.

9,627 changes: 5,155 additions & 4,472 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Loading