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

Add static position feature #254

Merged
merged 11 commits into from
Jun 16, 2024

Conversation

heoblitz
Copy link
Contributor

@heoblitz heoblitz commented Jun 15, 2024

What is this PR for?

Add feature for the static position supported in Yoga version 3.0.0.

  • Due to the default behavior of Yoga, insets like top, left, bottom, and right also affect relative position view. Accordingly, the README, docs and comments have been updated to match the Yoga specifications.
  • Added static case to position and unit tests.

https://www.yogalayout.dev/docs/styling/position
https://www.yogalayout.dev/docs/styling/insets

Tests

It does not affect the existing project functionality.

UnitTests ✅
Cocoapods, SPM Example projects build & run ✅

- Applies to: `flex items`
- Parameter: CGFloat

**Method:**

* **`position(_: Position)`**
The position property tells Flexbox how you want your item to be positioned within its parent. Position values:
* **`relative (default)`**
* **`absolute`**: The view is positioned using properties: top(), bottom(), left(), right(), start(), end().
* **`relative (default)`** The view is positioned using Insets properties (top, bottom, left, right, start, end) from its normal position within its flex container and will take up space within the flex container. This node will always form a containing block.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there are any awkward phrases or sentences that do not align with the project's tone, please let me know.

@@ -1,71 +0,0 @@
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to InsetTests.

@heoblitz heoblitz force-pushed the feature/add_static_position branch 3 times, most recently from 1d9ffb5 to fd74198 Compare June 16, 2024 13:03
Copy link
Member

@lucdion lucdion left a comment

Choose a reason for hiding this comment

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

Very nice work 👍

@lucdion lucdion merged commit eb8ee81 into layoutBox:master Jun 16, 2024
1 check passed
@lucdion
Copy link
Member

lucdion commented Jun 16, 2024

New release. Thanks
https://github.com/layoutBox/FlexLayout/releases/tag/2.0.9

@heoblitz
Copy link
Contributor Author

Thank you for reviewing the PR and releasing it 😄

@heoblitz heoblitz deleted the feature/add_static_position branch June 16, 2024 23:23
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.

2 participants