Closed tmedwards closed 4 years ago
I think I would have named the new context field alias
instead of displayName
. The existing name
can then be consider the canonical name and alias
already semantically means it is not canonical (meaning the name it was invoked under and errors, etc. can use it for display purposes, etc.).
MacroContext
needs arealName
/baseName
property—something to that effect—so that user aliases may reference the correct macro.Currently, macros that have multiple names by default—e.g.,
<<button>>
and<<link>>
—often usethis.name
to select features of the macro—e.g., which element to use, which behaviors, etc. User aliases break that by changing the name of the macro. Thus,MacroContext
instances should include a property that specifies the real/base name of the macro, so that the handler may use that name when selecting features, rather than the current/apparent name. With that, user aliases of such macros would always use the proper code.This will likely require modifications to
Macro
as well.