Skip to content
Merged
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
7 changes: 7 additions & 0 deletions .changeset/action-group-tracker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astryxdesign/core': patch
---

[internal] One tracker for a held finger across a group of targets (an alert's or an action sheet's actions, a menu's rows, a segmented control's segments, a page control's dots): it reads the targets' rects once, resolves the finger against them (or by the owner's rule), paints or reports the highlight, and runs the target through its own click at the lift. Nothing a consumer sees changes.

@vjeux
28 changes: 28 additions & 0 deletions packages/core/src/hooks/actionGroupTracker.exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Meta Platforms, Inc. and affiliates.

/**
* @file actionGroupTracker.exports.test.ts
* @input The core package's hooks entry point and its package exports
* @output Proof that the action-group tracker stays internal: neither the
* hooks entry point nor the package's `exports` map reaches it
* @position Export lock for /packages/core/src/hooks/actionGroupTracker.ts
*/

import {readFileSync} from 'node:fs';
import {resolve} from 'node:path';
import {describe, expect, it} from 'vitest';
import * as hooks from './index';

describe('the action-group tracker is internal to core', () => {
it('is not exported from the hooks entry point', () => {
expect(Object.keys(hooks)).not.toContain('createActionGroupTracker');
});

it('has no package export of its own', () => {
const manifest = readFileSync(
resolve(__dirname, '../../package.json'),
'utf8',
);
expect(manifest).not.toContain('actionGroupTracker');
});
});
Loading
Loading