Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API - Style: Bring back 'boxShadow' style property #719

Merged
merged 9 commits into from
Jan 18, 2020

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jan 17, 2020

This brings back the boxShadow property to help unblock shadows for this PR: onivim/oni2#1211

The problem with <BoxShadow />, in its current form, is that it impacts both layout and events. This is a more general blocker to implementing the 'composition components' design here: #489

A component like <BoxShadow /> should purely be about drawing, and not impact layout / or event handling - it's very confusing if it interferes with that!

In order to implement this properly - we'll likely have to revisit our underlying component model, and create lower level primitives representing:

  • Rendering
  • Layout
  • Event handling / gestures

The main problem is that in our current node object hierarchy, each node is responsible for all three of those - and thus, any intermediate node impacts all of those systems.

Style.[
backgroundColor(Colors.blue),
position(`Relative),
width(100),
height(100),
boxShadow(
Copy link
Member Author

Choose a reason for hiding this comment

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

FYI @glennsl - I reverted the example so we could show the boxShadow API in the context of styles

@bryphe bryphe merged commit 674ddf1 into master Jan 18, 2020
@bryphe bryphe deleted the api/style/bring-back-boxshadow branch January 18, 2020 23:58
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.

1 participant