Skip to content

feat(lynx): add Lynx tutorial example ports (gallery, bank-cards, swiper) - #414

Merged
leonidaz merged 4 commits into
octanejs:mainfrom
Huxpro:feat/lynx-tutorial-examples
Jul 30, 2026
Merged

leonidaz merged 4 commits into
octanejs:mainfrom
Huxpro:feat/lynx-tutorial-examples

Conversation

@Huxpro

@Huxpro Huxpro commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add three example apps under packages/rspeedy-plugin-octane/examples/, porting the official Lynx tutorial projects from ReactLynx to @octanejs/lynx:
    • gallery — “Tutorial: Product Gallery” (waterfall <list>, like taps, invoke('autoScroll'), main-thread-scripted scrollbar)
    • swiper — “Tutorial: Product Detail” (MTS touch-driven swiper, rAF snap animation with a cross-thread easing prop, runOnMainThread/runOnBackground indicator)
    • bank-cards — the BankCards gallery example (scroll-view selection, CSS 3D card flip)
  • Each app has a tutorial README documenting the ReactLynx → Octane porting differences and the device evidence.

Why

Changes

  • New self-contained example apps (config, tsconfig, sources, assets, README) run via pnpm exec rspeedy dev --root examples/<name> from packages/rspeedy-plugin-octane. No package code changes.

Validation

  • tsrx-tsc --noEmit for all three examples
  • rspeedy build for all three examples (production bundles build cleanly)
  • prettier --check on all added css/mjs/ts/md files
  • device evidence on Lynx Explorer 3.9 (iOS simulator), with the sibling fix PRs applied: gallery waterfall + auto-scroll + MTS scrollbar + like taps; bank-cards selection + CSS flip on adopted first screen; swiper MTS drag + eased snap + runOnMainThread jump

Risk / follow-ups


Note

Low Risk
Documentation and example-only additions; runtime behavior depends on sibling fix PRs noted in the description, not on changes in this diff.

Overview
Adds three self-contained rspeedy sample apps under packages/rspeedy-plugin-octane/examples/—gallery, bank-cards, and swiper—each a port of an official Lynx tutorial from ReactLynx to Octane (.lynx.tsrx, @octanejs/lynx, pluginOctane). There are no changes to framework or plugin source; only configs, sources, assets, and READMEs.

gallery covers a waterfall <list>, like taps, invoke('autoScroll'), and a main-thread scrollbar via __AddInlineStyle / __FlushElementTree. bank-cards covers payment UI with <scroll-view>, row selection, and a CSS 3D card flip; dataUriLimit: 0 avoids Explorer data-URI image warnings. swiper covers MTS touch dragging, rAF snap with a cross-thread easing prop, and runOnMainThread / runOnBackground for the page indicator.

Each README documents ReactLynx → Octane authoring differences and device validation notes (e.g. gallery’s first-screen <list> exclusion, swiper’s PageConfig / firstScreenRender: 'engine' fix reference).

Reviewed by Cursor Bugbot for commit d9e88ad. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
octane-website Skipped Skipped Jul 30, 2026 2:04pm
octane-website-mcp Skipped Skipped Jul 30, 2026 2:04pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 08:34 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 08:35 Inactive

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit add9512. Configure here.

const handleItemClick = (index: number) => {
setCurrent(index);
updateIndex(index);
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Indicator jump ignores snap animation

Medium Severity

handleItemClick / updateIndex jump the offset through runOnMainThread(updateOffset) without calling cancelAnimate. Touch start cancels the rAF snap, but indicator taps do not, so during the 3s eased snap the loop keeps writing offsets and pulls the carousel (and later runOnBackground index updates) away from the tapped page.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit add9512. Configure here.

@trueadm

trueadm commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Find fixing CI and also the PR feedback?

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 13:26 Inactive
@Huxpro

Huxpro commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

The swiper README's known-limitation section is now resolved: the black offscreen slides came from elements created during main-thread script evaluation baking in unconfigured PageConfig defaults (defaultOverflowVisible), fixed in #419 by deferring the application first screen to the engine's __RenderPage lifecycle. The README in this PR has been updated accordingly.

@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 13:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 14:00 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 14:00 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp July 30, 2026 14:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website July 30, 2026 14:04 Inactive
@leonidaz
leonidaz merged commit 0a43dd6 into octanejs:main Jul 30, 2026
28 checks passed

This branch was previously deployed

2 inactive deployments
Preview – octane-website — d9e88adb Deployed Jul 30, 2026 by vercel[bot]
Preview – octane-website-mcp — d9e88adb Deployed Jul 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants