I got an email about this and was very confused as I didn’t recall making a post like this.
I’m curious how the “taylor” got swapped here in the quote reply? Is this some manual edit mistake (I’m not sure how to do a quote block with a source manually, or if that is even possible). Or is there a bug somewhere in the reply logic? @tshenry
With the site settings of prioritize username in uxturned on and display name on poststurned off you should see the username in the quote, and vice versa for seeing the full name.
Sorry, I could have been much more helpful there. I just tried quoting several of the posts in this topic, and there were some odd results in my composer:
[quote=", post:114, topic:13395"]
you right! That took all of a couple minutes and I was instantly approved. Simple fixes are always nice! :smile:
[/quote]
[quote="Taylor, post:113, topic:13395"]
You can gain access to the v1.1 API for free under the Elevated plan. You simply need to apply from your developer dashboard. I found it very quick and easy. Discourse Twitter logins worked flawlessly after that :tada:
[/quote]
(that’s the style of one @taylor got a notification for)
In updating the quote logic to allow for us to toggle username or full name via a site setting I have run into a problem (part of the problem was noted above), let me create a hypothetical scenario…
Tim creates a post
Site Setting is added and activated to toggle the OP display name to be username (was active) or full name (now active)
A user quotes Tim in a new post, but because we are now using the full name for quotes, our other user TimTam, full name: Tim, gets notified that someone quoted him on a post he never created.
Rebaking all of the quotes is also a no go. If this site setting was toggled multiple times, and we rebake multiple times, a quote that is being converted from a full name → username is not unique and could find multiple users.
The avenue I see us taking is adding an additional data attribute to the quote of data-full-name="true"(or something) to check if we should replace the username with the full name in the ux, instead of manipulating the data-username
and save ourselves the hassle of worrying if we are querying or sending notifications on username or full name. Thoughts? Is this worth the effort of updating PrettyText and our quote builder for this change?
I prefer not to add support for a switchover. This is a decision you make early in your community setup, supporting super smooth switchover is extremely expensive and comes with a bunch of trade-offs.
If I quote you with username prioritized we render this markdown
Are you saying you would recommend we scrap trying to add the ability to display quotes with full names? We are inevitably going to run into these switchover cases… eg. any existing community with a quote
Nope, not fully scratch it… meta has prioritize username in ux disabled. The quote I just made should be: (which is missing an avatar which needs fixing)
The markup here should be:
[quote="Isaac Janzen, post:14, topic:217633"]
Are you saying you would recommend we scrap trying to add the ability to display quotes with full names?
[/quote]
Only change needed it to make the quote widget be aware of the setting so it fills in full name instead of username. Do not worry about migration and history.
So why is the name missing from the quote above? Was the change rolled back?
Agree we need to do more here:
We need to grab the username from “post / topic” combination and place it in the cooked markdown (we should do that unconditionally), otherwise we can not display avatars for the full name.
It also lets us fix this edge case, so it does not show my avatar on this mis-quote. (or even highlights a misquote)
I am totally open to fix a few edge cases while there:
username mismatch
what do we do about avatar?
what do we do about username?
full name mismatch
what do we do about avatar?
what do we do about name?
I think the best thing to do for now is just “override”. If the post has a name / username, use it over the one that was supplied in the quote. Cook in current name / current username.
I guess I can accept a markdown change so we work around needing to go into a rabbit hole of an enormous security adventure. However the change needs to be hyper surgical.
Can you confirm that the new verbose syntax only ever happens if both siteSettings.display_name_on_posts && !siteSettings.prioritize_username_in_ux ?
Mentioning @tobiaseigen here for visibility cause this relates to previous discussions.
Bottom line:
IMO OK to change markdown format for now for this edge case - and only this edge case - @codinghorror to confirm.
TBD schedule security work so quote block becomes [quote="TOTALLY OPTIONAL WILL BE FISHED FROM POST IF SECURITY LINES UP AND INFO ON POST IS PRIORITIZED OVER THIS TEXT, post:3, topic:7"]. - recommend we wait a while on this.