-
Notifications
You must be signed in to change notification settings - Fork 12
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
Intents improvements (onReadyCallback, exposeFrameRemoval) #189
Conversation
So API-design wise that's all, the code is good too. I know you plan to update the changelog, but could you please also update the intent documentation? |
Thanks @y-lohse! Sure, I was hesitating about the |
e6c75a3
to
64ff1f6
Compare
64ff1f6
to
7da4d57
Compare
7da4d57
to
ae80581
Compare
46f52ef
to
720ff12
Compare
The changes are excellent! However I'm afraid I have a new question (just thought about it, sorry). |
Hum, you're right, I'll think about that to be simpler and less error prone 👍 |
Ok, cool. Sorry again I didn't mention it during the first review, the thought only occured to me later :/ |
@y-lohse That was a very very good point in fact! Better late than never^^ Now it's even better, if the intent find a boolean |
ca8376c
to
c4d5b07
Compare
…cording to the client data 📝
c4d5b07
to
4a10117
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I think this API makes sense. Ready to ship as far as I am concerned!
Thanks @y-lohse 🎉 |
Two main points:
Handle
exposeIntentFrameRemoval
data flag to terminate the service without removing the intent DOM node directly but by providing the removal function to the clientExample of usage: Claudy has an animated (CSS) menu closing. Using this feature it will be possible to terminate the intent
.then
listen the animation ending before removing the intent iframe node using the resolvedremoveIntentFrame
function (and avoiding a sudden blank view in the Claudy view)Add an
onReadyCallback
optional argument to thecreate
method in order to allow providing a callback function to be run when the intent iframe will be loaded (iframeonload
listener).Example of usage: Claudy will now wait the intent iframe to be totally loaded before beginning its opening animation in order to keep having a fluid UX.
Edit: Rename
exposeRemoving
toexposeFrameRemoval
and use a data flag instead of a method