Skip to content

Implementing overflow prop in View component #14527

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 3 commits into
base: main
Choose a base branch
from

Conversation

HariniMalothu17
Copy link
Contributor

@HariniMalothu17 HariniMalothu17 commented Apr 14, 2025

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Why

Implement the overflow property for the fabric implementation of View.
This property was available in RNW Paper via ViewViewManager,NativeUIManager.

See https://reactnative.dev/docs/layout-props#overflow for details.

Resolves #13103

What

Implemented the overflow property for the fabric implementation of View.

Screenshots

Recording.2025-04-14.163816.mp4

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Changelog

Yes

Added a brief summary of overflow to use in the release notes for the next release.

Microsoft Reviewers: Open in CodeFlow

@HariniMalothu17 HariniMalothu17 requested a review from a team as a code owner April 14, 2025 10:43
@HariniMalothu17 HariniMalothu17 marked this pull request as draft April 14, 2025 10:49
);

// Apply the clipping path to the visual
Visual().as<::Microsoft::ReactNative::Composition::Experimental::IVisualInterop>()->SetClippingPath(
Copy link
Collaborator

Choose a reason for hiding this comment

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

We already setting the clipping path when we have borderRadii, in ComponentView::updateClippingPath. -- I think that is done today to ensure that the background has a rounded corner too.

So I think the fix here will be more complex than this.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Apr 14, 2025
@anupriya13 anupriya13 requested a review from Copilot April 17, 2025 15:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • change/react-native-windows-4a6abd7a-5513-40a7-bc6d-a7527518ba51.json: Language not supported
Comments suppressed due to low confidence (2)

vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h:231

  • [nitpick] Consider adding an inline comment to explain the purpose of m_shouldClipChildren for future maintainability.
bool m_shouldClipChildren{false};

vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp:1092

  • Ensure that the overflow property exclusively covers valid states (e.g., 'Hidden' and 'Scroll') when clipping children, and verify that this behavior is consistent with usage elsewhere in the codebase.
m_shouldClipChildren = (newViewProps.yogaStyle.overflow() != facebook::yoga::Overflow::Visible);

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity Issue/PR has gone stale and may be closed (label applied by bot) label Apr 24, 2025
Copy link
Contributor

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) no-recent-activity Issue/PR has gone stale and may be closed (label applied by bot)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement overflow property for View for fabric
2 participants