You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gnprice opened this issue
May 13, 2024
· 0 comments
Labels
a-apiImplementing specific parts of the Zulip server APIa-contentParsing and rendering Zulip HTML content, notably message contentsa-modelImplementing our data model (PerAccountStore, etc.)
The feature is in the midst of API changes that will also involve a rename. The old/existing API will still be present in Zulip Server 9, though, so we'll need to support it in any case. This issue is for supporting the existing API, which we can go ahead and merge as soon as the implementation is ready; supporting the new/future API will be a separate followup issue.
There are two parts to implementing this:
Store and maintain the user's list of alert words. This means taking the data from the initial snapshot, adding it to PerAccountStore, and keeping it up to date with events.
Using the alert words in the UI, by highlighting them in messages.
For the second part, see the corresponding code in zulip-mobile, in src/webview/html/processAlertWords.js. Also see the current corresponding code in Zulip web — the zulip-mobile code was copied from there but there may have been changes since then.
We'll want to copy the web and zulip-mobile behavior as closely as possible from a user perspective. That code operates by munging the message's HTML, with regexes. We could probably accomplish something bug-compatible by munging the HTML in the same way, before parsing it… but since we're parsing the HTML anyway, let's do better than that:
We'll look for alert words only in the parts that truly are text, where treating a match as an alert word would be appropriate. This means the strings that are held by TextNode, CodeBlockSpanNode, and possibly others.
The text was updated successfully, but these errors were encountered:
gnprice
added
a-content
Parsing and rendering Zulip HTML content, notably message contents
a-api
Implementing specific parts of the Zulip server API
a-model
Implementing our data model (PerAccountStore, etc.)
labels
May 13, 2024
a-apiImplementing specific parts of the Zulip server APIa-contentParsing and rendering Zulip HTML content, notably message contentsa-modelImplementing our data model (PerAccountStore, etc.)
Uh oh!
There was an error while loading. Please reload this page.
I.e., this Zulip feature:
https://zulip.com/help/dm-mention-alert-notifications#alert-words
The feature is in the midst of API changes that will also involve a rename. The old/existing API will still be present in Zulip Server 9, though, so we'll need to support it in any case. This issue is for supporting the existing API, which we can go ahead and merge as soon as the implementation is ready; supporting the new/future API will be a separate followup issue.
There are two parts to implementing this:
PerAccountStore
, and keeping it up to date with events.For the second part, see the corresponding code in zulip-mobile, in
src/webview/html/processAlertWords.js
. Also see the current corresponding code in Zulip web — the zulip-mobile code was copied from there but there may have been changes since then.We'll want to copy the web and zulip-mobile behavior as closely as possible from a user perspective. That code operates by munging the message's HTML, with regexes. We could probably accomplish something bug-compatible by munging the HTML in the same way, before parsing it… but since we're parsing the HTML anyway, let's do better than that:
TextNode
,CodeBlockSpanNode
, and possibly others.The text was updated successfully, but these errors were encountered: