-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat: update.href
api
#6248
feat: update.href
api
#6248
Conversation
add `update.href` property option to update objects send via `Context::send_webxdc_status_update()`. when set together with `update.info`, UI can implement the info message as a link that is passed to the webxdc via `window.location.href`. for that purpose, UI will read the link back from `Message::get_webxdc_href()`. Practically, this allows e.g. an calendar.xdc to emits clickable update messages opening the calendar at the correct date.
src/webxdc.rs
Outdated
/// Get link attached to an info message. | ||
/// | ||
/// The info message needs to be of type SystemMessage::WebxdcInfoMessage. | ||
/// Typically, this is used to start the corresponding |
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.
Start the corresponding what? :o)
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.
the corresponding excursion of rocket scientists 🚀
|
||
/** | ||
* Get link attached to an webxdc info message. | ||
* The info message needs to be of type DC_INFO_WEBXDC_INFO_MESSAGE. |
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.
so this will not work for notifications using update.notify
setting a summary but no info message 🤔 when showing such a notification (which potentially will have info-message sometimes) I guess we will add an "open" to the notification to jump to the app, for notifications with info-messages it would work for not for summary, it is a limitation but probably not a big deal for the first iterations and could be improved at a later point I guess
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.
indeed, that is not possible currently. but that is no conceptual flaw, we could probably easily add the hash to the event as well, if we consider that an important usecase as well (or just to make documentation easier :)
however, i suggest to do that after this PR and after all UI have adapted to href approach - that way we can see if things work out as we exepect. if so, adpating UI for event-href is easy :)
add
update.href
property option to update objects send viaContext::send_webxdc_status_update()
.when set together with
update.info
,UI can implement the info message as a link that is passed to the webxdc via
window.location.href
.for that purpose, UI will read the link back from
Message::get_webxdc_href()
.Practically,
this allows e.g. an calendar.xdc
to emits clickable update messages
opening the calendar at the correct date.
closes #6219
documentation at webxdc/website#90