-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add option to shorten a display name #33
Conversation
Just to double check if I understood correctly, did you mean that "the result is really I agree the solution is not perfect, because if for example the user decides to add some separation characters in the disMacro, you could end up with a strange result: But at the same time I know it's a complex topic, because different contexts often lead to different display names. For example, we had a few customers that wanted to use the |
Interesting point on the separation characters @gretadj2. It makes me wonder what that perfect solution could be later on down the road |
I've taken everyone's feedback on board and have redesigned the approach here. @gretadj2 I think your comments regarding how customers use separators is really important. I think @EliteScientist has raised some good ideas with me too. I've simplified the approach here. Now if a display name is shortened, it moves the precedence of resolving the Let me know what you think. I originally created this PR to kick around a few ideas and see what works best for people. |
👍 I like it, thanks @garethj2 ! |
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.
I think the changes are good! I left some super minor comments based on the changes. Thanks Gareth
We need some support for shortened display names.
This differs from the relative display names that exist in Haxall. In our use case, we may not have the parent when we have a shortened display name.
So how to handle it? Firstly we need to understand that display names can be processed in different ways (
dis
,disMacro
,name
etc). A long display name normally incorporates refs to other records. This usesdisMacro
. For example, if there was adisMacro
tag on a point with$equipRef $navName
, the result may include the display names for all the parents of the record and the point itself.An easy to deal with this is by skipping any
Ref
values when processing thedisMacro
. Therefore the result is really$equipRef
.I admit this isn't a perfect solution. I'd argue the relative display names in
Haxall
are worse since you always need to know the parent. This is a pain when you want to render short display names from a list and not a tree control.