Skip to content

Conversation

@ENvironmentSet
Copy link
Collaborator

While aligning edge height with paper heigth

@changeset-bot
Copy link

changeset-bot bot commented Nov 27, 2025

🦋 Changeset detected

Latest commit: 6dd4ccf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stackflow/plugin-basic-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2025

Deploying stackflow-demo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6dd4ccf
Status: ✅  Deploy successful!
Preview URL: https://8af63525.stackflow-demo.pages.dev
Branch Preview URL: https://appscree-font-scaling.stackflow-demo.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 27, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
stackflow-docs 6dd4ccf Commit Preview URL Nov 27 2025, 07:51 AM

@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Transition offset and app screen dim height are now customizable parameters instead of hard-coded values, with platform-specific defaults for Android and iOS.
  • Bug Fixes

    • Fixed edge height calculations with improved app bar margin handling using safe-area insets for better responsive behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Parameterizes previously hardcoded UI dimensions and transition offsets in plugin-basic-ui by introducing global variables dimHeight and defaultTransitionOffSet with platform defaults and option mappings. Adds a hasAppBar styling variant and propagates it from the AppScreen component; updates transforms and edge height usages to rely on the new variables.

Changes

Cohort / File(s) Summary
Changesets
​.changeset/real-swans-tickle.md, ​.changeset/thirty-melons-invite.md
Added two changeset entries describing a patch and a minor release for @stackflow/plugin-basic-ui (fix edge height; parameterize default appscreen transition offset and dim height).
Global CSS vars & option mapping
extensions/plugin-basic-ui/src/basicUIPlugin.css.ts, extensions/plugin-basic-ui/src/basicUIPlugin.tsx
Introduced globalVars.dimHeight and globalVars.defaultTransitionOffSet with Android and Cupertino defaults; wired dimHeight and defaultTransitionOffSet into the plugin options → inline CSS variable mapping.
AppBar styles
extensions/plugin-basic-ui/src/components/AppBar.css.ts
Replaced hard-coded translate3d offsets with globalVars.defaultTransitionOffSet for exit/transition states (Cupertino and Android variants).
AppScreen styles
extensions/plugin-basic-ui/src/components/AppScreen.css.ts
Added hasAppBar.true variant that initializes vars.appBar.topMargin (with @supports safe-area handling); set dim height to globalVars.dimHeight; switched paper and edge transforms to use globalVars.defaultTransitionOffSet; moved topMargin initialization out of paper to appScreen; edge.hasAppBar now uses vars.appBar.topMargin for top/height.
AppScreen component
extensions/plugin-basic-ui/src/components/AppScreen.tsx
Forwards derived hasAppBar flag into CSS-in-TS class/style calls so the new styling variant can apply at render.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review focus:
    • extensions/plugin-basic-ui/src/components/AppScreen.css.ts — verify hasAppBar variant, @supports safe-area handling, and removal of duplicated topMargin logic.
    • Verify propagation of dimHeight and defaultTransitionOffSet from basicUIPlugin.tsx into styles and platform-specific overrides.
    • Confirm AppBar and paper/edge transform changes preserve expected animations across platforms.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main changes: parameterization of appscreen dim height and default transition offset, which matches the core modifications across multiple files.
Description check ✅ Passed The description mentions aligning edge height with paper height, which relates to the changes in AppScreen.css.ts where edge and paper styling were updated with new topMargin logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch appscree-font-scaling

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3c78e87 and 6dd4ccf.

📒 Files selected for processing (3)
  • extensions/plugin-basic-ui/src/basicUIPlugin.css.ts (3 hunks)
  • extensions/plugin-basic-ui/src/basicUIPlugin.tsx (1 hunks)
  • extensions/plugin-basic-ui/src/components/AppScreen.css.ts (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • extensions/plugin-basic-ui/src/basicUIPlugin.tsx
  • extensions/plugin-basic-ui/src/basicUIPlugin.css.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Write source in TypeScript with strict typing enabled across the codebase

Files:

  • extensions/plugin-basic-ui/src/components/AppScreen.css.ts
extensions/plugin-*/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Plugins must implement only the documented lifecycle hooks (onInit, onBeforePush/onPushed, onBeforePop/onPopped, onBeforeReplace/onReplaced, onBeforeStepPush/onStepPushed, onBeforeStepPop/onStepPopped, onBeforeStepReplace/onStepReplaced, onChanged)

Files:

  • extensions/plugin-basic-ui/src/components/AppScreen.css.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: stackflow-docs
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
extensions/plugin-basic-ui/src/components/AppScreen.css.ts (4)

52-78: Safe‑area‑aware hasAppBar variant wiring looks solid

Centralizing vars.appBar.topMargin in appScreen.hasAppBar.true and layering the @supports‑guarded constant/env(safe-area-inset-top) logic will keep all app‑bar‑aware children consistent while preserving a sane fallback. No issues from my side here.


82-108: Dim overlay height parameterization via globalVars.dimHeight

Adding height: globalVars.dimHeight on top of f.posAbsFull gives you a single tunable control for dim coverage (including partial‑height cases) without complicating selectors. As long as the default is 100% for the full‑screen case, this looks good.


118-130: Using defaultTransitionOffSet for initial transforms improves configurability

Driving both the Cupertino X offset and Android Y offset from globalVars.defaultTransitionOffSet is a nice abstraction and should make tuning transitions much easier. Just ensure platform themes assign this var with the appropriate units for their respective directions.


206-210: Edge hasAppBar alignment with vars.appBar.topMargin matches content

Basing top and height on vars.appBar.topMargin keeps the gesture edge vertically aligned with the visible paper/paperContent when an app bar is present and removes the hard dependency on a global fixed app‑bar height. This looks consistent and correct.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 27, 2025

@stackflow/demo

yarn add https://pkg.pr.new/@stackflow/[email protected]

commit: 6dd4ccf

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
extensions/plugin-basic-ui/src/basicUIPlugin.css.ts (1)

15-15: Consider using consistent casing: defaultTransitionOffset.

The variable name uses "OffSet" with capital 'S', but the conventional casing would be "Offset". This affects both the GLOBAL_VARS key and the CSS custom property name.

-  defaultTransitionOffSet: "default-transition-off-set",
+  defaultTransitionOffset: "default-transition-offset",

Note: This would require updating all references in AppBar.css.ts, AppScreen.css.ts, and basicUIPlugin.tsx.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c23c5e6 and 3c78e87.

📒 Files selected for processing (7)
  • .changeset/real-swans-tickle.md (1 hunks)
  • .changeset/thirty-melons-invite.md (1 hunks)
  • extensions/plugin-basic-ui/src/basicUIPlugin.css.ts (3 hunks)
  • extensions/plugin-basic-ui/src/basicUIPlugin.tsx (1 hunks)
  • extensions/plugin-basic-ui/src/components/AppBar.css.ts (1 hunks)
  • extensions/plugin-basic-ui/src/components/AppScreen.css.ts (5 hunks)
  • extensions/plugin-basic-ui/src/components/AppScreen.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Write source in TypeScript with strict typing enabled across the codebase

Files:

  • extensions/plugin-basic-ui/src/basicUIPlugin.css.ts
  • extensions/plugin-basic-ui/src/basicUIPlugin.tsx
  • extensions/plugin-basic-ui/src/components/AppBar.css.ts
  • extensions/plugin-basic-ui/src/components/AppScreen.tsx
  • extensions/plugin-basic-ui/src/components/AppScreen.css.ts
extensions/plugin-*/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Plugins must implement only the documented lifecycle hooks (onInit, onBeforePush/onPushed, onBeforePop/onPopped, onBeforeReplace/onReplaced, onBeforeStepPush/onStepPushed, onBeforeStepPop/onStepPopped, onBeforeStepReplace/onStepReplaced, onChanged)

Files:

  • extensions/plugin-basic-ui/src/basicUIPlugin.css.ts
  • extensions/plugin-basic-ui/src/basicUIPlugin.tsx
  • extensions/plugin-basic-ui/src/components/AppBar.css.ts
  • extensions/plugin-basic-ui/src/components/AppScreen.tsx
  • extensions/plugin-basic-ui/src/components/AppScreen.css.ts
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Include a Changeset entry for any user-facing package change

Files:

  • .changeset/thirty-melons-invite.md
  • .changeset/real-swans-tickle.md
🧬 Code graph analysis (1)
extensions/plugin-basic-ui/src/components/AppBar.css.ts (2)
extensions/plugin-basic-ui/src/basicUIPlugin.css.ts (2)
  • globalVars (50-53)
  • android (110-112)
extensions/plugin-basic-ui/src/index.ts (1)
  • globalVars (3-3)
🪛 LanguageTool
.changeset/thirty-melons-invite.md

[grammar] ~5-~5: Ensure spelling is correct
Context: ...ic-ui": minor --- Parameterize default appscreen transition offset and appscreen dim hei...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~5-~5: Ensure spelling is correct
Context: ...default appscreen transition offset and appscreen dim height

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: stackflow-docs
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (15)
.changeset/real-swans-tickle.md (1)

1-5: LGTM!

The changeset follows the correct format for a patch release. The description is concise and relates to the edge height fix.

.changeset/thirty-melons-invite.md (1)

1-5: LGTM!

Minor release is appropriate for adding new configurable options. The description accurately reflects the parameterization changes.

extensions/plugin-basic-ui/src/basicUIPlugin.css.ts (2)

61-64: LGTM!

The android values use fixed rem-based offsets appropriate for Android's subtle slide transitions.


99-100: LGTM!

The cupertino overrides correctly use percentage-based values for iOS-style full-screen slide transitions.

extensions/plugin-basic-ui/src/components/AppScreen.tsx (1)

238-246: LGTM!

Passing hasAppBar to the css.appScreen recipe enables the new CSS variant for conditional top margin and safe-area calculations. This is a clean integration with the CSS-in-TS styling system.

extensions/plugin-basic-ui/src/basicUIPlugin.tsx (2)

72-72: LGTM!

The dimHeight option is correctly wired to the global CSS variable.


79-80: LGTM!

The defaultTransitionOffSet option is correctly wired to enable runtime configuration of transition offsets.

extensions/plugin-basic-ui/src/components/AppBar.css.ts (3)

47-53: LGTM!

The Cupertino exit transition now uses the configurable offset variable, enabling consistent parameterization across the UI.


54-62: LGTM!

The Android base transform now uses the configurable offset variable, aligning with the parameterization effort.


81-87: Verify: Hardcoded 100% in slideInLeft variant.

The slideInLeft variant still uses a hardcoded translate3d(100%, 0, 0) while other transitions now use globalVars.defaultTransitionOffSet. Is this intentional because slideInLeft requires a full-screen horizontal slide regardless of the configured offset?

extensions/plugin-basic-ui/src/components/AppScreen.css.ts (5)

52-78: LGTM!

The hasAppBar variant centralizes the top margin calculation with proper safe-area inset handling. The @supports blocks correctly provide fallbacks for both legacy constant() and modern env() safe-area functions, ensuring broad browser compatibility.


89-89: LGTM!

The dim height is now parameterized via globalVars.dimHeight, enabling platform-specific values (10rem for Android gradient dim, 100% for Cupertino full overlay).


118-120: LGTM!

Cupertino paper transform now uses the configurable transition offset.


127-130: LGTM!

Android paper transform now uses the configurable transition offset.


206-211: Good fix for edge height calculation.

The edge element now correctly uses vars.appBar.topMargin which includes safe-area insets, instead of only globalVars.appBar.height. This aligns the swipe-back edge with the actual content area, fixing the edge height issue mentioned in the patch changeset.

@ENvironmentSet ENvironmentSet merged commit 151b13f into main Nov 27, 2025
9 checks passed
@ENvironmentSet ENvironmentSet deleted the appscree-font-scaling branch November 27, 2025 10:38
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.

2 participants