Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1645
Right now we publish Yoga by transforming in-place, and rewriting the entrypoint to point to the generated vanilla JavaScript.
It is nice to include the original source, e.g. so that users can use sourcemaps when debugging, but putting these files on top of each other has been causing problems, like https://github.com/facebook/yoga/issues/1637#issuecomment-2049099690
This changes the packaging step to instead put all the outputs into a "dist" folder, and point the package entrypoints there. We still include original source for sourcemap usage.
Reviewed By: yungsters
Differential Revision: D56093470
fbshipit-source-id: ecd52dddd9040294aae66747cf1fdf48c7f602e7
Summary:
X-link: https://github.com/facebook/react-native/pull/44010
Pull Request resolved: https://github.com/facebook/yoga/pull/1641
Yoga has quirk where newly constructed nodes are clean, which isn't really correct. Normally never shows in in real code because setting a style or children will dirty. Fabric doesn't use the public APIs that do this dirtying, so it ends up getting creative instead.
We should fix so that newly constructed nodes are dirty. Copy-constructed Nodes (also only a Fabric thing, will retain original dirty flag.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D55855328
fbshipit-source-id: be49efaf8ac29351f8e5ec509bd9912546944332
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1640
Added two captures that were captured from a mobile device.
**profile-ios**: A profile-like view with a central picture and some text information underneath. Captured on iOS device
**feed-android** A feed-like view with a scrollable list of images and text. Captured on Android device.
Fixed a bug that would not deserialize undefined values
Reviewed By: NickGerleman
Differential Revision: D55712235
fbshipit-source-id: ed32b393c088c695d8191149c729e51008df4e7e
Summary:
X-link: https://github.com/facebook/react-native/pull/43752
Gentest tests started failing because Chrome changed behavior of overflowed align-content container. Spec says should fallback to "safe center", which is really just "start", instead of previous "center" behavior. This changes behavior accordingly.
There is one bit where I think we are doing the wrong thing wrt alignment of flex start vs start (which we don't support yet), but couldn't repro a failing chrome test.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D55617689
fbshipit-source-id: 08f23d198c75f2c2f51ccaa8795289e6e4a92cb8
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1635
Accidentally set to May instead of March.
Differential Revision: D55286740
fbshipit-source-id: 260f15258b265a79a2017a57152f41e4d67b6a68
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1623
I copied these over from the default Docusaurus template but they don't add much value, and it is too heavy/irrelevant right now.
Before:
{F1468497789}
After:
{F1468497977}
Reviewed By: joevilches
Differential Revision: D54886187
fbshipit-source-id: c9ad11c59c7809d14c7a110e0ee2dd735505e28a
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1620
A couple of these are labeled as TypeScript. We expose TypeScript types, but this also works as plain-old JavaScript, and is the label we use in most of the documentaion.
Reviewed By: joevilches
Differential Revision: D54884484
fbshipit-source-id: 763c56843a797db0a4f78776c55397eaa9b4a966
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1622
Update the date, link to some documentation we added, small other tweaks for consistency.
Reviewed By: joevilches
Differential Revision: D54883806
fbshipit-source-id: f20a8f1aa51c1dfe1b205aa0a3b530ef5632ffd2
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1613
So that GitHub links to edit a page point to the right place.
This will fail in OSS build until I switch the directory used by Vercel instance, but I am waiting to do that until ready to land, since that would cause other in progress changes to fail when exported.
Reviewed By: joevilches
Differential Revision: D54837857
fbshipit-source-id: 9bec90232dbe3ec8638568685671185d597fcf2d
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1612
Moving new website to `/website` before publishing, so that edit links point to the right eventual place in the GitHub repo.
Reviewed By: joevilches
Differential Revision: D54837808
fbshipit-source-id: 46de8a638ad9bce18558fd768ed8c080892b828e
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1617
tsia, this was added recently and did not exist in the old docs
Reviewed By: yungsters
Differential Revision: D54830687
fbshipit-source-id: bbc7c833fdabe281367edeb0fbdc85960fe982fb
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1616
This is based on a few comments earlier in the stack and my own discretion on what should change. But I went through all of the examples and changed the following:
* Only add code tick marks in a few cases where it would make sense. Things like `start` and `end`, `undefined` as a value, etc. There ends up not being that many after this. Previously, any property or value was tick marked even if it was more of a concept than actual code. **I replaced those cases with a link to their respective documentation as I feel like this keeps the indication that this is a keyword without labeling it as code**.
* Any reference to "element" was changed to "node"
* Capitalize words that follow a colon
* Run code examples through prettier for consistent style
Reviewed By: yungsters
Differential Revision: D54816609
fbshipit-source-id: 20ee925cf46bd1c519cc88bab9327321e926ac56
Summary: Remove some outdated information and make sure that npmjs shows the builtin TypeScript typings (now that we no longer have clever resolution schemes).
Reviewed By: javache
Differential Revision: D54788636
fbshipit-source-id: 76e7663924189fd68ac62b27730f44213b13ad85
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1608
Fixes up layout when embedded into document, and removes the copy button taking more horizontal real estate than it is worth, when we want to show a horizontal playground at 75% width.
Before:
{F1467611957}
{F1467613069}
{F1467613795}
After:
{F1467611817}
{F1467612896}
{F1467613557}
Reviewed By: javache
Differential Revision: D54787261
fbshipit-source-id: 2177d896baf81971d1b979c060eecf51535de4c5
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1599
tsia. Had to add JS api support for set/get direction
Reviewed By: yungsters
Differential Revision: D54778992
fbshipit-source-id: 346152e1d61c80aa524b515e8b30a96fe32fe7c3
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1593
X-link: https://github.com/facebook/react-native/pull/43417
There was a bug where we did not position absolute nodes correctly if the static node had a different main/cross axis from the containing node. This fixes that. The change is somewhat complicated unfortunately but I tried to add sufficient comments to explain what is happening
Reviewed By: NickGerleman
Differential Revision: D54703955
fbshipit-source-id: 096c643f61d4f9bb3ee6278d675ebd69b57350d7
Summary:
X-link: https://github.com/facebook/react-native/pull/43405
Pull Request resolved: https://github.com/facebook/yoga/pull/1592
Fixes https://github.com/facebook/yoga/issues/1590
Yoga may be built with a high warning level. This is helpful in letting Yoga be used in more places, and finding defects. We currently set these in the internal BUCK build, the CMake reference build, and the Yoga Standalone (not RN) CocoaPods build.
Yoga's reference CMake build and spec are consumed today by users of Yoga, instead of just Yoga developers. Here, it makes more sense to avoid anything that could break compiler-to-compiler compatibility.
We default these to a less intense (`-Wall -Werror`). I kept `/W4`, for pragmatic reasons, and since it is relatively standard for MSVC.
We continue to build with strict flags on Buck build on Clang.
Reviewed By: cortinico
Differential Revision: D54735661
fbshipit-source-id: 130e35ac9dcffa2f7e70e48d18770f1275864e2a
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1589
Adds a skeleton to the new website of documentation and such for us to fill out.
Reviewed By: joevilches
Differential Revision: D54567186
fbshipit-source-id: 700dfe0787fcb9806c3daa0675e838540119bbc0
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1587
Adds release notes for Yoga 3.0. Tentatively going to try to polish up the rest of the website bits, to be able to put this out on Monday.
If we get the website bits finished, I will add some bits about the new documentation.
Reviewed By: joevilches
Differential Revision: D54560841
fbshipit-source-id: 237f94985d2b804cf5a1e1737a23dc8a7a03695a
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1588
This was previously running on Ubuntu, but just happened to work until the setup job assumed macOS. Run the job on macOS.
Reviewed By: cipolleschi
Differential Revision: D54563775
fbshipit-source-id: 2311029cf9b56527608e9cb000d5c09320607a99
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1585
When used alone, yoga has no visibility over the USE_FRAMEWORKS variable set by React Native.
In this case, there is no other way to know whether the current target that will install the spec is using use_framewors or not. As a failsafe, condition, let's always add the `"$(PODS_TARGET_SRCROOT)"` to the search paths to make sure that archiving won't fail.
Whe used in other context, that should not be a problem: search paths are just directory Xcode uses to find headers that are needed.
Reviewed By: NickGerleman
Differential Revision: D54417386
fbshipit-source-id: aa2ae41c077e4346c0417c73291a37c992a06b58
Summary:
X-link: https://github.com/facebook/litho/pull/976
Pull Request resolved: https://github.com/facebook/yoga/pull/1586
X-link: https://github.com/facebook/react-native/pull/43299
Add the React Clang Tidy config to Yoga, run the auto fixes, and make some manual mechanical tweaks.
Notably, the automatic changes to the infra for generating a Yoga tree from JSON capture make it 70% faster.
Before:
{F1463947076}
After:
{F1463946802}
This also cleans up all the no-op shallow const parameters in headers.
{F1463943386}
Not all checks are available in all environments, but that is okay, as Clang Tidy will gracefully skip them.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D54461054
fbshipit-source-id: dbd2d9ce51afd3174d1f2c6d439fa7d08baff46f
Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1581
This is better than just trusting the order of the measure func call. Now each measure function I/O is associated with a node in the JSON.
Reviewed By: NickGerleman
Differential Revision: D53776790
fbshipit-source-id: 793cf2d9cbf6f663d24848af0af30aa297614eea
Summary:
To sanity check that a capture is working as expected when running benchmark
We could maybe even throw here as a bad measure function will throw off the rest of the benchmark.
Reviewed By: NickGerleman
Differential Revision: D53681506
fbshipit-source-id: f5ab7e00e76df0ac899d62c3f6b4535b3780d45d