A user may be disabled or pending, in which case we shouldn't link to the user's url
If a user isn't found, I don't think having a link to # is very helpful, maybe better to just leave it as plain text?
Might be good to have the test check slightly more complex text like hi @admin1, are you there
I also remembered that allura may cache the results of markdown rendering, so just keep that in mind. When all the user mention work is done, we can invalidate all the caches so html output is generated (via the bugfix_rev variable in cached_convert). There may also be minor inconsistencies if users are created or removed over time but the cached output doesn't update its links (similar to wiki pages links in [#8236]) but that should be relatively rare and seems like a very hard problem to solve. But when you get to data like full names within the hover info card we'll want to make sure that is not part of the markdown output so that it isn't cached, but instead is added via JS more dynamically.
Thanks for the feedback. Yeah I noticed the caching in markdown conversion
Do you mean we can do like this with the user's status vs mention link as per below?
if user is not found --> plain text eg @abcd1
if user is found but !disabled and !pending --> clickable link
if user is found but disabled or pending --> link with red color?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
disabled or pending should be treated the same as not found. And then I'd be ok with those being either plain text (simplest) or a red link if you want to show that a user doesn't exist with that username.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A user may be
disabled
orpending
, in which case we shouldn't link to the user's urlIf a user isn't found, I don't think having a link to
#
is very helpful, maybe better to just leave it as plain text?Might be good to have the test check slightly more complex text like
hi @admin1, are you there
I also remembered that allura may cache the results of markdown rendering, so just keep that in mind. When all the user mention work is done, we can invalidate all the caches so html output is generated (via the
bugfix_rev
variable incached_convert
). There may also be minor inconsistencies if users are created or removed over time but the cached output doesn't update its links (similar to wiki pages links in [#8236]) but that should be relatively rare and seems like a very hard problem to solve. But when you get to data like full names within the hover info card we'll want to make sure that is not part of the markdown output so that it isn't cached, but instead is added via JS more dynamically.Related
Tickets: #8236
Hi.. Dave
Thanks for the feedback. Yeah I noticed the caching in markdown conversion
Do you mean we can do like this with the user's status vs mention link as per below?
if user is not found --> plain text eg @abcd1
if user is found but !disabled and !pending --> clickable link
if user is found but disabled or pending --> link with red color?
disabled or pending should be treated the same as not found. And then I'd be ok with those being either plain text (simplest) or a red link if you want to show that a user doesn't exist with that username.
Yeah agree. Since red link is usually having an anchor tag, I aslo think we can go with plain text for now. I will update with required modifications.
Hi.. Dave
I have improved the tests and also changed the extension logic
Last edit: Shalitha Suranga 2019-05-15