Skip to content

Try: Absolutely positioned frame view approach to simplify the logic for border/space calculations of InnerBlocks #1948

@pinarol

Description

@pinarol

I forked this RN starter project and tried a different approach about putting borders & spaces around different blocks. https://github.com/pinarol/react-native-starter

The example is in a super primitive state but I tried to write down my mindset in code comments here: https://github.com/pinarol/react-native-starter/blob/124a7e9d4d9060753760b996957c708823da8434/src/modules/home/HomeView.js#L60

test

The frame view is absolutely positioned behind the blue view, but it is not blue view’s parent, they are at the same level

So we don’t need to make calculations for blue view’s paddings/margins/borders for different states.

All we need to do is positioning the frame view relative to blue view.

So when ready, we can give this approach a chance

cc @jbinda @lukewalczak

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions