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
See issue #569. It would be nice to be able to enter custom display formats in the Edit Display format dialog when the format you require isn't part of the list. Bonus points for remembering custom display formats and having an option to give them names etc.
There are two problems here though. Both requiring us to add some more error checking code:
If the user types in some invalid code we'd get a syntax error. Not sure how we'd react there but we definitely don't display a proper error message.
The user could type in some code that generates more than one column. This one is tricky because it doesn't produce a syntax error but would cause a lot of confusion throughout the application. So by some means we'd have to detect this case and prohibit it.
I first encountered the custom option when selecting one of the other available options (hex, octal, round number, etc) on a colum, and then going back to "edit display format". I noticed my selection was not what I previously selected (hex, octal, round number, etc), but rather it was "custom".
I think, most of the custom formats, that the users would want to add, would be a call to the sfrtime, printf or similar format functions for the column (one example is in #1213). What if we only allow custom formats of this form, that could be easily validated using regexps? It would be at least an improvement over the current situation.
@mgrojo That sounds like a pretty decent concept. It also doesn't sound super complex to get working, though it could turn out to be trickier than expected (unsure though). 😄
Activity
jungle-boogie commentedon Apr 22, 2016
I first encountered the custom option when selecting one of the other available options (hex, octal, round number, etc) on a colum, and then going back to "edit display format". I noticed my selection was not what I previously selected (hex, octal, round number, etc), but rather it was "custom".
justinclift commentedon Apr 22, 2016
That's a good point, I've noticed that too. The label for the chosen option should probably be kept, instead of switching to "custom". 😄
mgrojo commentedon Nov 6, 2017
I think, most of the custom formats, that the users would want to add, would be a call to the sfrtime, printf or similar format functions for the column (one example is in #1213). What if we only allow custom formats of this form, that could be easily validated using regexps? It would be at least an improvement over the current situation.
justinclift commentedon Nov 18, 2017
@mgrojo That sounds like a pretty decent concept. It also doesn't sound super complex to get working, though it could turn out to be trickier than expected (unsure though). 😄
Allow custom display formats
Check number of columns in custom display format
Allow custom display formats (#1720)
mgrojo commentedon Feb 15, 2019
Closing this, as PR #1720 is already merged.