Граф коммитов

622 Коммитов

Автор SHA1 Сообщение Дата
Valentin Shergin f02feb8d38 Fabric: Codegen for PullToRefresh component
Summary:
Straightforward.
Rick, I rename some stuff, I hope you are cool with that.

Reviewed By: mdvacca

Differential Revision: D15403306

fbshipit-source-id: 1dbd34060052a9bd39ed4211010f14b76fffcde6
2019-05-19 17:44:40 -07:00
Valentin Shergin e8b2145263 Fabric: Standard PullToRefresh component
Summary: This is implementation of standard PullToRefresh component that uses standard iOS component and modern integration approach.

Reviewed By: mdvacca

Differential Revision: D15403308

fbshipit-source-id: 5c877f7c18af9f5ac40e15a4ba44118614ba80bc
2019-05-19 17:44:40 -07:00
Valentin Shergin 197c644f7a Fabric: Make measuring ScrollView::contentOffset-aware
Summary:
This is the final piece of change that makes measuring (`LayoutableShadowNode::getRelativeLayoutMetrics()`) take ScrollView content offset into account (on iOS).

It works pretty simply: at the end of scrolling (or zooming) action ScrollView updates the state which later can be used for computing `transform` which measuring uses to adjust values in LaoutMetrics.

Reviewed By: mdvacca

Differential Revision: D15323688

fbshipit-source-id: fdf86c6cd9bdfd56caddd4b39bdd1185760b9f94
2019-05-15 10:30:29 -07:00
Valentin Shergin cd231da27a Fabric: Migrate ScrollView from LocalData to State
Summary: Seems we need this now to enable future improvements in ScrollView such as correct measure, pull-to-refresh and so on.

Reviewed By: mdvacca

Differential Revision: D15323687

fbshipit-source-id: fae37431ccbbf2faec9c84752396153689b873ef
2019-05-15 10:30:29 -07:00
Valentin Shergin 4001ffb7ce Fabric: Refinements in State management infra
Summary: A couple of new methods in ConcreteShadowNode allows us to deal with State in more LocalData-like manner.

Reviewed By: mdvacca

Differential Revision: D15323686

fbshipit-source-id: ede4aa1f1d0ad6f876bd963e57a00a0ad470c1c0
2019-05-15 10:30:28 -07:00
Joshua Gross 04782ff57a Send ReactNative C++ State to Android `measure` API
Summary:
The `measure` API receives LocalData and Props, it should also receive State.

This will also be used in future diffs.

Reviewed By: mdvacca

Differential Revision: D15325182

fbshipit-source-id: 6cb46dd603ce7d46673def16f0ddb517e2cf0c4f
2019-05-14 14:22:10 -07:00
David Vacca ac9195a506 Include pointScaleFactor into the equality method of LayoutMetrics
Summary:
Previously the pointScaleFactor field was not being compared properly in LayoutMetrics equality method.
This diff fixes that

Reviewed By: shergin

Differential Revision: D15303555

fbshipit-source-id: 8863e9e1fbad15b43400afc32b97bf6d252cbe55
2019-05-10 16:32:01 -07:00
Valentin Shergin 184073813e Fabric: Making `YogaStylableProps.yogaStyle` protected
Summary: `YogaStylableProps.yogaStyle` is designed to be consumed by Yoga only. Making it `protected` allows us to avoid confusion and misuse of this props.

Reviewed By: JoshuaGross

Differential Revision: D15296474

fbshipit-source-id: cf9e416afee99fb426d72765557b34d303a63dbe
2019-05-10 15:34:25 -07:00
David Vacca 5f9bb72bb3 Replace abort() with assert() when a prop-value is not found during parsing
Summary: This diff replaces usage of abort() with assert() when a prop-value is not found during parsing of prop values

Reviewed By: shergin

Differential Revision: D14563338

fbshipit-source-id: c799420e6b49df35e1d7ccdbd4bc4845067d33cc
2019-05-09 16:24:13 -07:00
Valentin Shergin 8c0ba25f19 Fabric: Storing ImageLoader (instead of ImageManager) in ContextConteiner
Summary:
ImageLoader is an actual external dependency, not a ImageManager.
That change allows to remove dependency on ImageManager from SurfacePresenter and make some other code simpler.

Reviewed By: mdvacca

Differential Revision: D15242047

fbshipit-source-id: 8622d15b8fdb5c3a7e25091adf7be1108f87ecd5
2019-05-09 15:49:18 -07:00
Valentin Shergin 335c81ec31 Fabric: Optimizations in view flattening algorithm
Summary:
This diff changes the condition in `ViewShadowNode::isLayoutOnly()` removing checking for `onLayout` event listener.
We needed that before because the mechanism of emitting events was based on analyzing mutation instructures (we needed those to be generated for nodes with `onLayout`).
Recenly we changed that algorithm deeply integrating in layout infra, so we don't need this anymore.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D15273491

fbshipit-source-id: 2d43f00d1b87369d5993fe5ba70c2de36b8ce0c5
2019-05-09 10:56:44 -07:00
Valentin Shergin d8677752f8 Fabric: Enable `useLegacyStretchBehaviour` for Yoga in Fabric
Summary: Apparently, Yoga has a "quirks mode" and we have to enable that for Fabric. Which is probably a mistake that we have to make one more time.

Reviewed By: davidaurelio

Differential Revision: D15267852

fbshipit-source-id: 88a910fafc9ff64fb19376f4b74a2f2fd5827eba
2019-05-08 17:56:16 -07:00
Valentin Shergin 3238d3d3b4 Fabric: Fixing a typo/error in ConcreteState
Summary: I don't recall why the mutation function return rvalue reference, but it is totally incorrect (the function cannot own the object, so returning a reference introducing a dungling pointer and will crash).

Reviewed By: mdvacca

Differential Revision: D15156312

fbshipit-source-id: 497d10de22a41906efe71cd10139e3710ae11a79
2019-05-07 19:15:43 -07:00
Valentin Shergin b2756eb051 Fabric: Farewell kFloatUndefined
Summary: Apparently it's not used anymore. And that a good this.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D15219258

fbshipit-source-id: e3258d851d1eec5955d86f99a0b0d8a1b0304cb4
2019-05-06 17:06:41 -07:00
Valentin Shergin b5d0b6fc2a Fabric: Fixed parsing of `backfaceVisibility` prop
Summary: I have noticed that `backfaceVisibility` example crashes (because actual value is a string/enum, not a boolean), so I fixed it.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D15219261

fbshipit-source-id: 27f76cd10903794d597adacb9da7300a42813f8e
2019-05-06 17:06:41 -07:00
Valentin Shergin fb85e90487 Fabric: Using `LayoutableShadowNode::getTransform` in measuring
Summary: After this change, all measuring operations based on `LayoutableShadowNode::getRelativeLayoutMetrics` will take into account the transformation matrices provided by shadow nodes. This will allow implementing scroll-offset-aware and custom-transform-aware measuring.

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D15219259

fbshipit-source-id: 1d7cd8c0ee4406f4dd0002cd442dc0679391922b
2019-05-06 17:06:40 -07:00
Valentin Shergin 40bf82898f Fabric: Applying a transformation matrix to a point
Summary: The diff implements a function that applies given transformation to a point.

Reviewed By: JoshuaGross

Differential Revision: D15219263

fbshipit-source-id: 4cc0595b0dda38c1ede1f2885b800cbe57f54243
2019-05-06 17:06:40 -07:00
Valentin Shergin 0e35406e4e Fabric: LayoutableShadowNode::getTransform
Summary:
`LayoutableShadowNode::getTransform` returns a transform object that represents transformations that will/should
be applied on top of regular layout metrics by mounting layer.

Reviewed By: mdvacca

Differential Revision: D15219262

fbshipit-source-id: e7aeb85b5f7e2fce3f8faf9dfcaee5dae3217d36
2019-05-06 17:06:40 -07:00
Valentin Shergin 0f2a09d1f6 Fabric: MountingCoordinator - the new way to ensure ordering of mount transaction
Summary:
TBD.
This thing fixes flickering during appearing of Fabric screens on iOS.

Reviewed By: mdvacca

Differential Revision: D15116079

fbshipit-source-id: 95ed0ba94667cad67fe4317025128d01b34f69c5
2019-05-03 15:11:35 -07:00
Valentin Shergin 4803cab8c4 Fabric: MountingTelemetry and refinments in TimeUtils
Summary: This diff implements encapsulating all time metrics in a single class for better extensibility and readability.

Reviewed By: JoshuaGross

Differential Revision: D15179835

fbshipit-source-id: 62bdf94435a0d37a87ad9bad613cc8e38043a235
2019-05-03 15:11:34 -07:00
Valentin Shergin 01523ae660 Fabric: TinyMap in Differentiator
Summary: Diffing algorithm uses a small map for every layer of shadow tree; that's a lot of maps. Luckily, it does not need a complex feature-full map (which is not free to allocate and use), it needs a tiny map with a dozen values. Why do we need to pay for what we don't use? This diff introduces a trivial map optimized for constraints that we have here. (See more details in the code.)

Reviewed By: mdvacca

Differential Revision: D15200495

fbshipit-source-id: d859b68b9543253840b403e7430f945a0b76d87b
2019-05-03 12:36:29 -07:00
Valentin Shergin c5f0969fba Fabric: Code style changes in Differentiator
Summary: Trivial. Code style-only changes.

Reviewed By: mdvacca

Differential Revision: D15200497

fbshipit-source-id: 00b5f2e6ce7491e80e03ceb7f433571f397c2392
2019-05-03 12:36:29 -07:00
Valentin Shergin f8c5fa37d9 Fabric: `insertedPairs` in `calculateShadowViewMutations` now stores pointers (not values)
Summary:
This is a small micro-optimization in Diffing algorithm.
Seems we don't need to store full ShadowView objects in `insertedPairs` map, we can store only pointers to them. That can save memory and CPU cycles because we will not need to store full objects and copy shared pointers (which is somewhat expensive).

Reviewed By: mdvacca

Differential Revision: D15200498

fbshipit-source-id: 2a268c3ee80755555bff3317e10e679be1cf9830
2019-05-03 12:36:28 -07:00
Valentin Shergin 30c3ea5c3f Fabric: Using move semanic in Differentiator
Summary: Diffing is already pretty fast, but using move semantic should make it even faster. ShadowViews have shared pointers, so moving them can save us atomic counter bumps.

Reviewed By: mdvacca

Differential Revision: D15200496

fbshipit-source-id: 6fb0eb79e07cd6ae9b3100713497c634f306bc18
2019-05-03 12:36:28 -07:00
Joshua Gross 4a1d532674 Convert FabricUIManager.measure params to floats
Summary: Convert FabricUIManager.measure params to floats. Currently we convert parameters to ints across the JNI boundary, and then back to floats several times in Java. This is unnecessary and actually makes measurements trickier. The new implementation uses floats across the JNI boundary and uses Float.POSITIVE_INFINITY to represent unconstrained values, which is consistent with Fabric C++ as well.

Reviewed By: shergin, mdvacca

Differential Revision: D15176108

fbshipit-source-id: cf849b3773007637f059279460163872f300a4aa
2019-05-03 12:36:28 -07:00
Valentin Shergin ea8a57116f Fabric: A new way to compute nodes for `onLayout` event
Summary:
Previously we computed the list of nodes that need to be notified about layout changes using a list of mutation instructions. That was fine, but that's not really compatible with some other changes that I plan to make, so I decided to change it (make it better).

Besides the better design (debatable; fewer dependencies to unrelated moving pieces), here is why I believe the new way is more performant:

* The new approach has no `dynamic_casts`, whereas the previous has tons of them (two per a mutation). If a `dynamic_cast` takes 10 ns, for 500 nodes it can take up to 5ms only for casts. (Non-scientific assumption.)
* After removing dependency to mutation instruction, we can enable flattening for views which have `onLayout` event.

Reviewed By: mdvacca

Differential Revision: D15110725

fbshipit-source-id: 31a657ccfd02441734ad1d71a833653223163289
2019-05-01 16:27:55 -07:00
Valentin Shergin b273516b02 Making UITemplateProcessorTest not instrumentation
Summary: Instrumentation tests are expensive and flaky. Luckly this one does not need to be instrumentation one.

Reviewed By: mdvacca

Differential Revision: D15158985

fbshipit-source-id: 3c88e5a0d82db2cd00f5866c3f9956409cc8fc7f
2019-05-01 10:47:11 -07:00
David Vacca 5200ea8a1a Expose first implementation of the legacy method UIManager.measureInWindow on Fabric
Summary: This diff exposes the Legacy method UIManager.measureInWindow as part of Fabric

Reviewed By: shergin

Differential Revision: D15110795

fbshipit-source-id: 2b4bf47452f7272fd3edc4e580e65ae7ec2f2622
2019-04-30 23:49:20 -07:00
Valentin Shergin 1d65244376 Changes in float-family conversion infra
Summary:
Different frameworks use different kinds of floats, optional floats, and floats with assigned unit names. All those approaches use different ways to represent undefined and empty values. To deal with it we need to have some helper functions.

So, this diff changes some ways that we convert some corner values (like NaN and empty value). That change is motivated by recent personal discoveries in this field that shifted my vision on that. E.g. ComponentKit does not use `CGFloatMax` value as `Infinite` value. UIKit is also (surprisingly to me) okay with using `Infitite` instead of `CGFloatMax`. And, in general, seems using really conceptually appropriate values (instead of UIKit-inspired ones) it's the right thing to do.

Reviewed By: mdvacca

Differential Revision: D15155189

fbshipit-source-id: 33e15141f1ca3efb400a7160811224335de34ba1
2019-04-30 16:38:26 -07:00
Valentin Shergin 0196654f29 Fabric: Using `Infinity` instead of `Undefined` in LayoutConstraints
Summary: `kFloatUndefined` means "no value here", but in this particular case, we have to have `Infinity` value that represents maximum available space.

Reviewed By: mdvacca

Differential Revision: D15155190

fbshipit-source-id: d2de20681ad04da7444331eff44b93d2bd0200e3
2019-04-30 16:38:26 -07:00
Valentin Shergin 181b42bfce Fabric: Inlining (and removing) kFloatMax and kFloatMin constants
Summary:
We don't need to have those constants because this functionality is available in STL via `std::numeric_limits<YourParticularFloatType>::infinity()` (or `::min()` and `::max()`).
At the same time usage of `kFloatMax` was replaced with `Infinity` (which is a different value). Using `max` instead of `Infinity` was an attempt to mimic iOS/UIKit model where `Infinity` and `NaN` values usually are not being used. However, now this does not seem like a good idea. This concept is not used anywhere else (even in CK which is totally incompatible with it) and de-facto in RN we use it only in few places. So, let's use Infinity in places where it's logically appropriate.

Reviewed By: mdvacca

Differential Revision: D15155191

fbshipit-source-id: 4d24350c7540cec074a8b040d7c13f257aa812e7
2019-04-30 16:38:25 -07:00
David Vacca 5b73b6771e Expose measureLayout in UIManagerBinding.cpp
Summary: This diff exposes the Legacy method UIManager.measureLayout as part of Fabric

Reviewed By: shergin

Differential Revision: D15103117

fbshipit-source-id: 4cf7ab3776f6a541cf0d6a00789420a0bb008fae
2019-04-30 15:05:02 -07:00
David Vacca 532afbde6e Add support for Modal in Android
Summary: This diff implements Modal for Android in Fabric

Reviewed By: JoshuaGross

Differential Revision: D15069863

fbshipit-source-id: 4171c9590a4a7a1f4f80cf9b08ea9a9e94b9097a
2019-04-30 15:05:01 -07:00
Valentin Shergin 6d9f0a7d2a Fabric: Using full `ShadowNodeFragment` (not just `Props`) during construction of initial state
Summary: It turns out that just only props is not enought to build an initial state value in some cases for some component. Seems we need at least `surfaceId` and `eventEmitter` in some cases (which seems totally reasonable). So, seems using the whole `ShadowNodeFragment` for that purpose is a good choise.

Reviewed By: mdvacca

Differential Revision: D15039135

fbshipit-source-id: d9a5f47f971ccf6cdb2f888bd31f7948b37b67ef
2019-04-29 21:21:11 -07:00
Valentin Shergin 2a55939f20 Fabric: `ShadowNodeFragment::Value` - owning counterpart of `ShadowNodeFragment`
Summary:
`ShadowNodeFragment` is very cheap by design because it does not own stuff it contains, so it's great. But... sometimes we need to own the stuff (e.g. to pass it on the other thread), in those cases we can use `ShadowNodeFragment::Value` now.
`ShadowNodeFragment::Value` cannot be used alone, it needs to be constructed from `ShadowNodeFragment` and then used as opaque object and then it can be converted to ``ShadowNodeFragment`.

We will need it soon.

Reviewed By: mdvacca

Differential Revision: D15039136

fbshipit-source-id: d40875cac05f4088358d8d418007d17df9ff14f4
2019-04-29 21:21:11 -07:00
Valentin Shergin 035e0403bb Fabric: `ShadowNodeFragment::rootTag` was renamed to `surfaceId`
Summary:
Trivial.
We are replacing rootTag with surfaceId according to the plan describing here: https://fb.workplace.com/groups/rn.fabric/permalink/1374002366064519/

Reviewed By: JoshuaGross, mdvacca

Differential Revision: D15039134

fbshipit-source-id: ec8c3044f9f3f23939488bc01c66e9b653e651dd
2019-04-29 21:21:10 -07:00
Joshua Gross 3c7d8e0cc1 Remove paragraph_measure_cache experiment code
Summary: QE expired a while ago. Remove the experiment code.

Reviewed By: fkgozali

Differential Revision: D15133830

fbshipit-source-id: 562c3998cc7860497eefa9899dfb6bfcee4fe210
2019-04-29 17:52:08 -07:00
David Aurelio 110a382b59 Expose the value type used by `YGStyle` as `ValueRepr`
Summary:
@public

Adds `YGStyle::ValueRepr` to make code depending on the actual type easier to write.

So far, we have treated `yoga::detail::CompactValue` as an implementation detail, and that’s what it’s supposed to stay.

React Native Fabric has one value conversion overload that depends on that type, though, and used `decltype(YGStyle{}.margin()[0])` until now.
That’s problematic for two reasons:

- we want to constrain the parameter of `operator[](...)` to enum types, making the `0` unsuitable
- we want to return the non-const overload of the operator to return a custom `Ref` type, which is not the type needed by Fabric.

Making the storage type explicit allows to write more forward-compatible code.

Reviewed By: SidharthGuglani

Differential Revision: D15078960

fbshipit-source-id: 932c27ef2f2cdc6ce965b79894268170f0ccdce5
2019-04-29 09:22:31 -07:00
Estevão Lucas ca9a55e28b Remove `accessibilityTraits` prop (accessibility) (#24643)
Summary:
`accessibilityTraits` and `accessibilityComponentType` were removed on #24344. This PR removes `accessibilityTraits` prop from Fabric as well.

[General] [Removed] - Remove `accessibilityTraits` prop from Fabric.
Pull Request resolved: https://github.com/facebook/react-native/pull/24643

Differential Revision: D15120193

Pulled By: cpojer

fbshipit-source-id: 98440ac447569c26205fc38b93ce2591ccf1a3cf
2019-04-29 03:17:58 -07:00
Valentin Shergin 11439eabfc Fabric: Using `#ifndef NDEBUG` instead of `#ifdef DEBUG`
Summary:
Trivial.
Apparently, `DEBUG` is non-standard feature and using `assert` with `DEBUG` is practically asking for bugs. So, if your `assert` relies on some variable which is only defined when `DEBUG` is set, it's easy to get invalid code because NDEBUG and DEBUG can be unsync.
So, we have to use clunky double negative `#ifndef NDEBUG` everywhere where we used DEBUG.

Reviewed By: JoshuaGross

Differential Revision: D15031328

fbshipit-source-id: 036f573e68925741ca46384261885766c87db1e3
2019-04-23 15:13:36 -07:00
David Aurelio 54af7fc645 `YGStyle`: wrap all fields into accessors
Summary:
@public

In order to encapsulate property access on `YGStyle`, as a first measure we wrap all fields with accessors.

This will e.g. enable dynamic property storage and instrumentation in the future.

All accessors have a `const` version that allows direct access via `const&`. For mutation, bit fields are wrapped with a custom reference object.

This style allows for the least amount of changes in client code. Property access simply needs appended parens, eg `style.direction` becomes `style.direction`.

Reviewed By: shergin

Differential Revision: D14999096

fbshipit-source-id: fbf29f7ddab520513d4618f5e70094c4f6330b30
2019-04-23 08:12:35 -07:00
Valentin Shergin b4044e5b1b Fabric: Fixed overlapping border radii
Summary:
UAs must adjust border radius values to fit a content box:
>>> Corner curves must not overlap: When the sum of any two adjacent border radii exceeds the size of the border box, UAs must proportionally reduce the used values of all border radii until none of them overlap.

This diff implements that.

Reviewed By: mdvacca

Differential Revision: D15028325

fbshipit-source-id: 368232ffa2fa0409d13759bbbe7fe10f8474c400
2019-04-22 09:04:54 -07:00
Valentin Shergin 758eb9fa7b Fabric: Fixed incorrect assert condition in MountingTransactionSynchronizer
Summary: Trivial, a classic negative logic trap.

Reviewed By: cpojer

Differential Revision: D15027218

fbshipit-source-id: c17c9b39c7ee7fff817edf15b2b537e53422595d
2019-04-21 10:10:14 -07:00
Valentin Shergin 94969edf7c Fabric: Say hello to `MountingTransactionSynchronizer`
Summary:
ShadowTree commits happen concurrently with limited synchronization that only ensures the correctness of the commit from ShadowTree perspective.
At the same time artifacts of the commit () needs to be delivered (also concurrently) to the proper thread and executed in order (not-concurrently). To achieve this we need some synchronization mechanism on the receiving  (mounting) side. This class implements this process.

Practically, this diff fixes a problem with glitching UI during the very first render of Fabric screen.

Reviewed By: JoshuaGross

Differential Revision: D15021794

fbshipit-source-id: 62982425300c515e92b91e1e660b45455a5446e9
2019-04-20 10:53:16 -07:00
Valentin Shergin af0daaf583 Fabric: Introducing MountingTransaction
Summary:
`MountingTransaction` encapsulates all artifacts of `ShadowTree` commit, particularly list of mutations and meta-data.
We will rely on this heavily in the coming diffs.

Reviewed By: JoshuaGross

Differential Revision: D15021795

fbshipit-source-id: 811da7afd7b929a34a81aa66566193d46bbc34f8
2019-04-20 10:53:16 -07:00
Valentin Shergin c257a57e8e Fabric: Quick and diry fix for `UnimplementedNativeView`
Summary: We have to figure out a different way to request for a fallback component in ComponentDescriptorRegistry and in general, in public APIs. But now, to stop crashing here the fix.

Reviewed By: JoshuaGross

Differential Revision: D15021796

fbshipit-source-id: a60c66838e76ace990f2eb764c86c29d24db2141
2019-04-20 10:53:16 -07:00
Joshua Gross c31602acdc `getContextContainer` should be marked as const
Summary: `getContextContainer` should be marked as const so that const instances can call it.

Reviewed By: shergin

Differential Revision: D14969981

fbshipit-source-id: 8812f24ecf0642a38496580689943fbd43cddad1
2019-04-19 02:27:50 -07:00
Valentin Shergin 832164169d Fabric: Unification of registration process of `ComponentView`s and `ComponentDescriptor`s
Summary:
Registries, providers, providers of registries, registres of providers. All that can be really confusing, but that represents best the constraints and desires that we have:
* We need to be able to register components on-the-fly (so we need a mechanism that will propagate changes);
* We don't want to register ComponentDescriptors separately from ComponentView classes;
* C++ not always gives us abstractions that we want (e.g. pointers to constructors).

After the change, we can remove the whole Buck target that has a bunch of handwritten boilerplate code.

There is a still room for polish and removing some concepts, types or classes but this diff is already huge.

Reviewed By: JoshuaGross

Differential Revision: D14983906

fbshipit-source-id: ce536ebea0c905059c7a4d644dc25233e2809761
2019-04-17 22:44:20 -07:00
Valentin Shergin 00eab3d6fb Fabric: Introducing ComponentDescriptorProvider
Summary:
ComponentDescriptorProvider represents unified way to create a particular descriptor.
Now all ComponentViews (which support RCTComponentViewProtocol) expose a `ComponentDescriptorProvider` which will allow creating and registering ComponentDescriptor instances for all visual components automatically as a part of ComponentView registration process.
Don't panic, everything is still being as explicit as it always was, no magic involved; we just will have only one registration step instead of two parallel.

That also opens a way to register components on the fly.

Reviewed By: JoshuaGross

Differential Revision: D14963488

fbshipit-source-id: 9e9d9166fabaf7b30b35b8647faa6e3a19cd2435
2019-04-17 22:44:20 -07:00
Valentin Shergin 45ae1e4411 Fabric: `[]`-family of methods was removed from ComponentDescriptorRegistry
Summary:
Motivation:
 * We don't use them much, and we already have `at`-methods, which are better.
* We don't want to expose `ComponentDescriptor`s as shared pointers (because it's not clear, not so performant, and because we don't want to store them as shared pointer in the future);
* In idiomatic C++ `[]` operator has mutating semantic, that's not what we want to communicate via the interface of the class.

Reviewed By: sahrens

Differential Revision: D14963487

fbshipit-source-id: dbfddee2ba90d70c3bb8dcf1959d553571c47bab
2019-04-17 13:39:20 -07:00