Modify

Opened 12 years ago

Closed 9 years ago

#10499 closed enhancement (fixed)

DeprecatedNotice macro

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TracHacksPlugin
Severity: normal Keywords:
Cc: Steffen Hoffmann, Jun Omae, Michael Renzmann Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Here is an example of a deprecated notice at the top of the WikiStatsPlugin page:

Notice: This macro is deprecated. Please see the WikiMacros provided by the AccountManagerPlugin and the features provided by the TracStatsPlugin if you need this functionality.

I'm envisioning a very simple macro to replace this markup:

{{{
#!html
<div class="system-message" float="left" overflow="auto">
<b>Notice:</b> This macro is deprecated. Please see the WikiMacros provided by the <a href=http://trac-hacks.org/wiki/AccountManagerPlugin/WikiMacros>AccountManagerPlugin</a> and the features provided by the <a href=http://trac-hacks.org/wiki/TracStatsPlugin>TracStatsPlugin</a> if you need this functionality.
</div>
}}}

with this:

[[DeprecatedNotice(This macro is deprecated. Please see the WikiMacros
provided by the AccountManagerPlugin and the features provided by the
TracStatsPlugin if you need this functionality.)]]

Perhaps there is also room to make this a bit fancier and catch people's attention.

Attachments (0)

Change History (8)

comment:1 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 10 years ago by Ryan J Ollos

Cc: Jun Omae Michael Renzmann added
Component: TracHacksTracHacksPlugin
Status: newassigned

comment:3 Changed 9 years ago by Ryan J Ollos

We could use one of the #!box WikiProcessors from the WikiExtrasPlugin.

comment:4 Changed 9 years ago by Ryan J Ollos

WikiExtrasPlugin installed, documentation can be found at WikiMacros#box-macro. Just the one component enabled for now: tracwikiextras.boxes.boxes = enabled.

One page edited so far: RenameUsersScript@11. Thoughts, particularly on the style? We might want to use different styles depending on the reason for deprecating the plugin, and which version of Trac it is deprecated for relative to the current stable release of Trac. For example, TicketDeletePlugin is deprecated but still useful for Trac < 0.12. LineNoMacro is deprecated as of Trac 1.1.2.

comment:5 in reply to:  4 Changed 9 years ago by Steffen Hoffmann

Replying to rjollos:

WikiExtrasPlugin installed, documentation can be found at WikiMacros#box-macro. Just the one component enabled for now: tracwikiextras.boxes.boxes = enabled.

One page edited so far: RenameUsersScript@11.

Added two more: RenameTracUsersScript and RenameUserPlugin

Thoughts, particularly on the style? We might want to use different styles depending on the reason for deprecating the plugin, and which version of Trac it is deprecated for relative to the current stable release of Trac. For example, TicketDeletePlugin is deprecated but still useful for Trac < 0.12. LineNoMacro is deprecated as of Trac 1.1.2.

I see. First make sure to have Trac version tagging correct according to such recommendations.

Other than that it could probably be enough to adopt a clear note style like (examples for versioned deprecation and another note without link to a specific Trac version):

  • This <hack_type> is deprecated <short reason and link to better alternative, if available>.
  • Deprecated for Trac > 1.1.2 - this <hack_type> is still useful for older Trac applications.

comment:6 Changed 9 years ago by Ryan J Ollos

I'll soon make an enhancement to the Maintainer macro so that it displays none (deprecated) rather than none (needsadoption) when the deprecated tag is present on the page.

comment:7 Changed 9 years ago by Ryan J Ollos

Use of box WikiProcessor is documented on the TracHacks/SiteMaintenance page.

comment:8 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

In 14776:

3.0.0dev: Maintainer macro indicates deprecated hacks.

Maintainer macro outputs none (deprecated) when the hack doesn't have an owner. Fixes #10499.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.