Guidance on implementing display name precedence

I’m digging a bit for the best approach to implementing this pr-welcome feature (I first thought “okay, let’s change this in the one front file where it will solve this proposition”), and stumbled upon the BasicUserSerializer (“app/serializers/basic_user_serializer.rb”).

So what about adding a display_name method in the User model, which would return the right value according to the site settings, and use this in all the serializers returning users (or parts), then in all the front components ?

This is a bigger change for sure and may have an impact on performances but seems to be a good start to easily unify the value without performing a check in every ember file.

5 Likes

Hi @manut,

Thanks for digging into this and thinking about a broader fix!

However, for this PR I’d recommend simply keeping things focused on the change to the front file and thus fix the change for the calendar participants list.

The broader approach is definitely something worth considering. But, we’ll need to evaluate the approach to use and it’s implications separately since it’s a larger architectural discussion that goes beyond the scope of this fix.

Thanks for being willing to tackle this! Looking forward to your PR!

5 Likes