[v3] Fix view style mismatch with web styles.#393
[v3] Fix view style mismatch with web styles.#393zoriya wants to merge 6 commits intoLegendApp:webfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfc2e8ed73
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
src/components/PositionView.tsx
Outdated
| const base: CSSProperties = { | ||
| contain: "paint layout style", | ||
| display: "flex", | ||
| flexDirection: "column", |
There was a problem hiding this comment.
Preserve column flex direction when merging web styles
The new base style sets flexDirection: "column", but it is merged as { ...base, ...composed }, and Container still passes flexDirection: undefined for horizontal rows without a separator (src/components/Container.tsx), which overwrites the fallback and leaves the DOM element at browser default row. In that scenario the web layout still diverges from React Native defaults (e.g., alignSelf behavior), so this fix is incomplete for non-separator horizontal items (and the same pattern is repeated in the sticky variant).
Useful? React with 👍 / 👎.
|
There's the |
|
Thanks @zoriya! The padding changes look good, but the others could cause problems:
|
|
Sorry for the delay, those issues should be fixed! |
|
I pushed a few more commits because:
|
This fixes bugs in v3 introduced due to switching to
<div>instead of<View>:display: flex; flex-direction: columnis the default on aView, it's not on a div and that breaks component styles such asalign-self: centerstickyHeaderConfigprops in thePositionViewStateto make sure it doesn't get forwarded to the dom (and raise a warning saying this prop is not recognize)stickyHeaderConfig.backdropComponent