Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: clipsToBounds support #9539

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

Draft
wants to merge 59 commits into
base: main
Choose a base branch
from
Draft

feat: clipsToBounds support #9539

wants to merge 59 commits into from

Conversation

rigor789
Copy link
Member

@rigor789 rigor789 commented Sep 7, 2021

@farfromrefug here's a branch with the clipsToBounds changes - we had to revert them in the release branch here: 7785405

We've seen some issues with this change, some with the borders and some with boxShadow, so we'd like to step back a bit and make sure everything works as expected before we release this.

farfromrefug and others added 30 commits August 10, 2021 13:21
…' on fwd navigation (#8791)

Changes the behavior of android fragment transactions to use `add` instead of `replace` on forward navigation.

BREAKING CHANGE:

Changes the internal behavior of Android navigation:

* while navigating forward, the page navigated from is not unloaded anymore
* events order is changed in the sense that now `unloaded` happens after `navigatedFrom` instead of before

There are multiple plus sides to this:

* no more black views on navigation when using opengl (maps, ...)
* navigation is faster, especially the navigation back! No longer need to recreate the page anymore. Navigation forward also gets faster as we no longer unload the previous page
* navigatedFrom event happens faster
* this the default behavior used by most of the android native apps
…'replace' on fwd navigation (#8791)

This reverts commit e498c9d.
Fixed the incorrectly applied short form of "transform: translate" style property.

closes #5202
It was unnecessary to make multiple calls requestLayout inside initNativeView (properties set)
* performance improvements around border handling

BREAKING CHANGE:

* if you have broder-radius or clip-path, it will clip by default
rigor789 and others added 21 commits August 29, 2021 18:08
This feature needs some more work & will be included in a future version
* feat: Frame replacePage by entry

* feat(webpack): improved svelte HMR (#9497)

* update svelte config to use svelte-loader

* handle null config

* fix: worker support in .svelte files & update snapshots

* fix after merge

Co-authored-by: halfnelson <[email protected]>
Co-authored-by: Igor Randjelovic <[email protected]>

* feat(webpack): use svelte-loader and fallback to svelte-loader-hot

Allows running older projects

* feat: allow overwriting replacePage transition

Co-authored-by: farfromrefuge <[email protected]>
Co-authored-by: halfnelson <[email protected]>
WIP - needs more work
@cla-bot cla-bot bot added the cla: yes label Sep 7, 2021
@rigor789 rigor789 changed the base branch from master to release/8.1.0 September 7, 2021 21:01
Base automatically changed from release/8.1.0 to master September 10, 2021 17:52
@farfromrefug
Copy link
Collaborator

@dimitrisrk you cant use setClipToBounds as it is a rect. It wont work with rounded corners. setClipToOutline is the way to go on api >21.
@rigor789 what issue did you see? But yes clipToBounds will clip shadows. Maybe we should disable it by default (better perfs). But then what do we do on iOS?

@CatchABus
Copy link
Contributor

CatchABus commented Oct 22, 2021

@dimitrisrk you cant use setClipToBounds as it is a rect. It wont work with rounded corners. setClipToOutline is the way to go on api >21. @rigor789 what issue did you see? But yes clipToBounds will clip shadows. Maybe we should disable it by default (better perfs). But then what do we do on iOS?

I'm leaving notes as a feedback regarding this feature.

From my experience at trying to get rid of clipping in android, I have concluded that setting clipping to false for scrollable views will let their children overflow during scrolling.
I believe clipping should be true by default for such views (e.g. ListView, RadListView, ScrollView).

@CatchABus
Copy link
Contributor

@dimitrisrk you cant use setClipToBounds as it is a rect. It wont work with rounded corners. setClipToOutline is the way to go on api >21. @rigor789 what issue did you see? But yes clipToBounds will clip shadows. Maybe we should disable it by default (better perfs). But then what do we do on iOS?

I was wondering why this PR had flaws and It seems Outline has its own limitations.

As of API 33, all Outline shapes support clipping. Prior to API 33, only Outlines that could be represented as a rectangle, circle, or round rect supported clipping.

https://developer.android.com/reference/android/graphics/Outline#canClip()

It seems that setClipToOutline will not clip paths for the time being. :(

@farfromrefug
Copy link
Collaborator

@CatchABus indeed this is why i am using clipping path (if i remember correctly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants