-
Notifications
You must be signed in to change notification settings - Fork 23
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
added configuration from remote side #7
base: master
Are you sure you want to change the base?
Conversation
the parent may now update the instance id on the client in the federation phase
Hi, |
@DaniHaag I apologize, but this slipped through the cracks. What's the reason? Well, my 3rd son was born recently, I homeschool 2 other kids, I work 2 jobs most of the time and I maintain several other OSS projects - and try to sleep somewhere in the midst of all that. I didn't intentionally neglect your PR, it honestly slipped through the cracks. Now that I'm aware, I will try and set aside some time to review it. I would ask that you be patient, considering the list I just shared. :-) |
Hi Jim, |
Hi @DaniHaag Just wanted to let you know I've finally started squeezing time in at night here to try and look over things. I definitely like the idea of being able to pass a remote config. In fact, @dcneiner and I have talked about things along these lines before - I'm curious if he has any thoughts as well... |
Hey @ifandelse and @DaniHaag – Just looked over this request in detail and have a couple questions/thoughts:
I have explored being able to give remote frames "roles" where filters are specified on a per role instance, so it is similar in some ways to defining roles remotely. |
@dcneiner My use case is like this. I have an outer iframe and 1 to n inner iframes. It is even possible to have the same iframe in the screen more than once (with different url) parameters. About the security considerations, I am totally with you to set the default to the more secure option. |
Thanks @DaniHaag! Sorry its taken so long to respond, I've unfortunately been quite sick this week :( Even with these changes, how do you ensure your parent page wires up these children correctly? Are you matching the I know how I've solved this problem, but it involved quite a bit of hacking I hope to contribute back soon. I used custom data |
@DaniHaag & @dcneiner Apologies for taking a bit. I've been catching up on several tasks related to postal & postal add-ons as well as machina. I definitely need more info and input on this. Here are my concerns:
I've faced situations similar to this, where a parent page loaded several 3rd party widgets into iframes. One means that is immediately obvious to me is that if you need the parent to be able to set a child postal instanceId, then pass it on the url to the iframe and have infrastructure code in your iframe that parses the value off of the query string and passes it to Another approach - though it involves a bit more "handshaking" - would be to have the child frame ask for remote configuration data. This is possible today if you hand roll your own approach.... you could ensure that both iframe and parent have filters allowing a (for example) "configuration" channel to cross back and forth. The child iframe could send a request.config message topic, to which the parent window is listening and would then reply with the correct information for that child iframe, etc. I still need to look over @dcneiner's code in depth as well - since he's doing some interesting work in allowing "roles/modes" to be assigned to remote instances as they federate (this sets up local filters on how to talk to that remote instance, etc.) - depending on what he and I generalize there, it may land in postal.federation, or in a federation add-on. If you both think having a formalized federation message type for asking for remote configuration data from the child is worth looking into, I can add that to my tasks to investigate. Regardless, though, this kind of behavior is possible now, I believe, if you use one of the approaches I mentioned above..... |
With this change it is possible to allow the parent to define the instanceId of the iframe. It is also possible to define the filter configuration the same way.
@see #6