#13056 closed enhancement (fixed)
Allow macros to be hidden from documentation
| Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3.6 |
| Component: | wiki system | Version: | |
| Severity: | normal | Keywords: | macro |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: |
Macros can be hidden from the |
||
| Internal Changes: | |||
Description (last modified by )
For "internal use only" macros like WikiMacros#LatestRelease-macro, it would be good to hide from the wiki macro help. We could either hide the macros with no documentation, or have a class attribute that indicates the macro should be hidden.
Another possible application is to hide documentation for that require a permission that the user does not possess.
Attachments (0)
Change History (9)
comment:1 by , 7 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 7 years ago
| Description: | modified (diff) |
|---|---|
| Milestone: | next-major-releases → 1.3.4 |
| Owner: | set to |
| Status: | new → assigned |
follow-up: 6 comment:3 by , 7 years ago
I like to add property to hide (e.g. hidden_macro_index) like IRequestHandler.is_valid_default_handler rather than _description = None.
If you'd like to use macro description is None, I think we should add the same document to IWikiMacroProvider.get_macro_description(). Macro can be implemented IWikiMacroProvider without WikiMacroBase.
Also, th:WikiAutoCompletePlugin uses WikiSystem.macro_providers and get_macro_description(). It might be good to provide patch.
comment:4 by , 7 years ago
| Milestone: | 1.3.4 → 1.3.5 |
|---|
comment:5 by , 6 years ago
| Milestone: | 1.3.5 → 1.3.6 |
|---|
comment:6 by , 6 years ago
Replying to Jun Omae:
I like to add property to hide (e.g.
hidden_macro_index) likeIRequestHandler.is_valid_default_handlerrather than_description = None.
Sounds good. I will make those changes.
comment:9 by , 6 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |



The proposed changes (log:rjollos.git:t13056_hidden_macros)
_description = NoneIf that change looks okay I'll add tests.
To hide macro documentation based on user permissions we'd need to pass
formattertoget_macro_description, so thatformatter.reqcould be used. To be consistent with arguments of other methods we'd have to change:I don't have a particular use for that change now, so I'll skip it.