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
Using names to unique identify templates has never been ideal but I've just stuck with it instead of rethinking. Since this is the full release I'd like to sort this out now, even if it introduces greater risk.
Concept
Templates are now uniquely identified using a new, randomly generated, key property
Keys of predefined templates avoid conflicts and allow exportation by using the key structure PREDEFINED.00001
All cases where a template is retrieved based on its name should be changed to reference its key instead (unless required to support compatibility with older versions - in which case duplicate the functionality for keys)
toolbarTemplateName option tag should be changed to toolbarKey and store the templates key instead of name while, during the version update, deriving any previously defined template and storing its key
Description of the toolbarKey option tag in the guide should be updated
Generate a new key when adding a new template for the first time or importing a custom template from an older version
When updating versions or importing a predefined template from an older version, map the names of known predefined templates to their static keys
Description of the popular complex tag in the guide should remove the mention of the name property
popular needs to be changed to hold the key of the most popular template instead of its name
Try to consider all possibilities!
Hash Generator
max=0xfffffmin=0x10000parts= []
parts.pushnewDate().getTime()
parts.pushMath.floor(Math.random() * (max - min +1)) + min
parts[i] =part.toString16for part, i in parts
parts.join('.').toUpperCase()
Which should output something like 13514DABC0F.A46C0
The text was updated successfully, but these errors were encountered:
I'm happy with the results and I'm going to close this now after fixing some issues surrounding export/import functionality.
However, I feel it's worth mentioning that, if a custom template is imported from a previous version (earlier than 1.0.0) more than once, it will be duplicated as there's no way of knowing it's exactly the same as the old name field is discarded after being imported.
Using names to unique identify templates has never been ideal but I've just stuck with it instead of rethinking. Since this is the full release I'd like to sort this out now, even if it introduces greater risk.
Concept
key
propertyPREDEFINED.00001
toolbarTemplateName
option tag should be changed totoolbarKey
and store the templates key instead of name while, during the version update, deriving any previously defined template and storing its keytoolbarKey
option tag in the guide should be updatedpopular
complex tag in the guide should remove the mention of thename
propertypopular
needs to be changed to hold the key of the most popular template instead of its nameHash Generator
Which should output something like
13514DABC0F.A46C0
The text was updated successfully, but these errors were encountered: