Open ainslec opened 7 years ago
I can't speak for Jason, but...I think there's a place for this, and if you're providing the regex, that is a big help. I was just thinking of maybe reporting a trivial issue about something else, but your reporting this issue gave me ideas for maybe more small features to program.
Also, I think that's always how it happens--a good feature is implemented, and then we find details that weren't obvious at first.
In case you are not aware : https://www.debuggex.com/ is an excellent site for debugging regular expression. I know this doesn't have much to do with Trizbort directly, but I never miss an opportunity to plug an amazing tool.
In case you want to try out my adventure system, it's available here (requires desktop client for now) for a while. This version is still very beta and subject to breaking language changes, but see the "..." at the bottom, that accesses a sub-menu, where you can import Trizbort map files. This should give you some idea of how I'm using Trizbort.
Really two different requests here and I'll likely break them into separate issues soon...but I'll add on to the discussion here for now.
I like the regular expression validation, it was on my list of things to implement soon, just hadn't thought through all the details yet.
I like the idea of validation sets that can be setup, saved and reloaded (and ultimately shared). I'm not sold on coding directly towards any particular 3rd party system, though the loading / sharing of validation sets could help towards this as many different ones (including yours) could easily be created and shared....could include some Inform, Tads and all the others as well as their are some subtle differences in what is and isn't allowed when running through the export.
If you are building a validation set dialog, composite validations might be useful too. For example, if I want to export to both Adventuron and Inform, then make sure it matches both sets of validations, but each validation set must stand on their own. This can be achieved either through allowing multiple regular expressions per field (name, description, subtitle, ...) and / or, being able to create composite validation sets that extend one or more other sets.
This might come in phases, but it will be something I'm actively working on as I think it's a good feature set to add and can lead to nice extendability to the system.
Stale issue message
Hello,
I'm back to bother you with the second part of my validation request.
I really like what you did with the validation work in 1.5.9.9, via issue #333 .
I couple of requests for enhancement.
Firstly, when a room fails a validation, I'd like the hover event (over the box with the red cross on it) to show the reason for the validation failure. You can still keep the existing tooltip, but I feel that failing a validation should take priority on the tooltip. As there are 4 current validation categories, it helps to work out at a glance what is going wrong.
Now, there is a two prong things I'd like to suggest.
First, and (maybe??) easiest is the ability to create regular expression validations for room names and room subtitles. The reason for this, is that the importer into my adventure game system uses the format
(in the subtitle field) : My location header text [graphic_id]
Internally, I validate this via the regular expression
^\s*([^\[]+)\s*(?:\[([^\[\] ]+)\])?$
Now, it would be a lot easier if this validation was performed within Trizbort itself, user configurable.
Secondly, and controversially, I'd like to suggest the creation of validation sets, that are easy to toggle on and off. It would be a dialog containing all the validation toggles, including the regular expression settings, and could be saved against an identifier. The validation menu then shows :
Or, more simply, I give you a set of presets validations to bake in for my adventure system, and you bake it into the UI. I don't like this approach terribly, but it's an order of magnitude easier to use for any users of my adventure system and probably easier to code for you. Have a think about it, and I hope the idea is not too repellent.
Chris.