-
Notifications
You must be signed in to change notification settings - Fork 535
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
Deprecate Container.setAutoReconnect()
, Container.resume()
, IContainer.connected
, and IFluidContainer.connected
.
#9167
Comments
I think what you are trying to say is that developer wants pull model (FF asks it) vs. push model (developer changing auto-reconnect property as new data on his/her side arrives). I have bigger issues with continuing to introduce these things on Container - I believe things like that should be exposed on Loader object, such that they apply to all containers under same context (here, "context" object is a loader, I do not think we need another context object). That way, it works great for things like guest components, where container points to a component from another container, and thus child container is loaded under same loader - doing operations on one container will miss this kind of scenario). |
This is a good point to consider. If we do this at a loader level, is it still a natural place to inject If the container is disconnected (say for an inactive tab), and you come back to it, what/who initiates reconnections? |
I do not understand why callbacks are needed, so I can't answer that question. Access to information does not matter here though, as you can achieve same thing - the question is really why pull model is preferred over push, IMHO, and is this difference warrants more complicated API? Is there an example of scenario demonstrating it? I have not seen one. Today, in FFX case, I believe OWH code initiates reconnect, I believe they use React capabilities to learn if user is there (any input generated), though I believe browser has similar capability (at global level). |
Comments were for @scottn12 to clarify "information which the developer has access to", to understand need for callback. Scott - is this is all around "user inputs"? |
Yes, user inputs such as mouse movements or clicks which are not accessible by Fluid. There may also be other relevant information, such as browser tab focus, for example. That said, based on feedback I received we probably won't be refactoring |
setAutoReconnect()
setAutoReconnect()
to remove immediate connection/disconnect logic
setAutoReconnect()
to remove immediate connection/disconnect logicsetAutoReconnect()
to remove immediate connection/disconnect logic
setAutoReconnect()
to remove immediate connection/disconnect logicContainer.setAutoReconnect()
, Container.resume()
, and IContainer.connected
FYI, this issue has been updated to reflect the changes in #8745 |
Container.setAutoReconnect()
, Container.resume()
, and IContainer.connected
Container.setAutoReconnect()
, Container.resume()
, IContainer.connected
, and IFluidContainer.connected
.
…ume()`, and `connected` (#9439) For context on the reasoning behind these changes see: #8745 This PR adds `connect()` and `disconnect()` to `Container` and `IContainer`. These functions will combine to replace the functionality of `Container.setAutoReconnect()` (which is deprecated here). Furthermore, `connect()` is essentially a rename of `Container.resume()`, hence `resume()` has been deprecated as well. In addition, `IContainer.connected` has been deprecated in favor of `IContainer.connectionState`. To make `IFluidContainer` consistent with these changes, `connectionState` has been added to `IFluidContainer`, and `IFluidContainer.connected` has been deprecated as well. Follow up items: 1. Add `connect()` and `disconnect()` to `IFluidContainer` and `IContainer` 2. Add tests for the new functionality 3. Update documentation referencing deprecated APIs 4. Explore behavior if `disconnect()` is called while the container is attempting to connect Closes #9396, #9167, #9744
This PR removes the APIs deprecated in 0.58 via #9439, which include `Container.setAutoReconnect()`, `Container.resume()`, `IContainer.connected`, and `IFluidContainer.connected`. Additionally, this PR replaces any remaining usages/references of the above APIs with their respective replacements (see #9167). Closes #9397
As described in #8745, the following APIs will be deprecated.
Contianer.setAutoReconnect()
This function is being deprecated to keep the reconnection logic internal. To replace its functionality,
Container.connect()
andContainer.disconnect()
were introduced.Container.resume()
This function is essentially being renamed to
Container.connect()
. This is done to provide developers a more intuitive API to connect a container. To avoid duplicate functionality, this function will be deprecated and removed.IContainer.connected
This API serves the same purpose as
IContainer.connectionState
, and therefore will be deprecated and removed.IFluidContainer.connected
This API serves the same purpose as
IFluidContainer.connectionState
(newly added), and therefore will be deprecated and removed.The text was updated successfully, but these errors were encountered: