Skip to content

docs: update architecture exploration and proposals - #50

Merged
cixzhang merged 1 commit into
mainfrom
docs-architecture
Jan 28, 2026
Merged

cixzhang merged 1 commit into
mainfrom
docs-architecture

Conversation

@mellyeliu

Copy link
Copy Markdown
Member

Context

  • Updates component-reference.md to use modern contextual styles syntax (inner mq/pseudoclasses)
  • Updates stylex-patterns.md with theming approach from feat: rework base theming architecture #21
  • Updates xds-architecture.md proposal

The rest of the line changes are from ESLint.

- Update component-reference.md with latest patterns
- Update stylex-patterns.md with theming approach
- Update xds-architecture.md proposal
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 24, 2026
@mellyeliu
mellyeliu requested a review from cixzhang January 26, 2026 17:35
// Use in stylex.create() calls:
const styles = stylex.create({
container: {
backgroundColor: allTokens['--xds-surface'],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these don't quite match up.

@cixzhang
cixzhang merged commit b1ac2d7 into main Jan 28, 2026
2 checks passed
@cixzhang
cixzhang deleted the docs-architecture branch February 20, 2026 14:41
cixzhang pushed a commit that referenced this pull request Apr 26, 2026
- Update component-reference.md with latest patterns
- Update stylex-patterns.md with theming approach
- Update xds-architecture.md proposal
imdreamrunner added a commit that referenced this pull request Aug 18, 2026
… iOS (#5178)

Below the tallest detent, a pull up inside the sheet's content did nothing on a
real device while the grab handle worked fine.

iOS Safari raises PointerEvents for a finger under the SAME numeric id it puts
in `Touch.identifier`. The touch path builds its pointer-shaped event out of
that identifier, so the drag it starts is keyed to a live pointer: `beginDrag`
captures it, WebKit takes the capture straight back for its own gesture
handling, and the `lostpointercapture` that follows a millisecond later cancels
the drag one event after it began. Measured on iOS 26.5, one gesture:

  touchmove #1 -> promote, beginDrag
    gotpointercapture   pointerId=-1239851261   (= the Touch.identifier)
    lostpointercapture  pointerId=-1239851261   willCancel=true
    cancelDrag
  touchmove #2..#50     drag gone; the sheet ignores the rest of the pull

Chromium keeps the two id spaces apart, so emulated touch never reproduces it;
the unit tests stub `setPointerCapture`, so jsdom never fires the cancelling
event. The handle keeps working because it runs on real pointer events, which
legitimately hold the capture. The mid-gesture content-end handoff (#5172)
usually survives only by timing: it promotes after WebKit has already given up
that pointer at scroll commit.

Touch-driven drags are now marked as such. They take no pointer capture, and
`lostpointercapture`, `pointercancel` and `pointermove` for the same finger no
longer cancel, end, or double-drive them.

Test Plan:
- Two new cases in useSheetGestures.test.ts dispatch onLostPointerCapture and
  onPointerCancel with a pointerId equal to the touch identifier. Both fail on
  main ("expected false to be true") and pass here.
- packages/core/src/BottomSheet suite: 163/163.
- On an iPhone 17 Simulator (iOS 26.5), one continuous touch per case, sheet
  at the 0.5 detent; numbers are the scrolling body's height, 309 = mid detent,
  395 = fully open:

  | case                                     | before      | after     |
  |------------------------------------------|-------------|-----------|
  | fresh touch at the content end, pull up  | 309 (inert) | 309 -> 395|
  | scroll to the end mid-gesture, keep pull | 309 -> 395  | unchanged |
  | top-edge pull-down in the body           | 395 -> 309  | unchanged |
  | ordinary mid-content scroll              | scroll only | unchanged |
  | grab-handle drag                         | works       | works     |

- tsc --noEmit clean; lint:strict 0 errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants