Edgewall Software
Modify

Ticket #2168 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Universal TracLinks argument

Reported by: cboos Owned by: cboos
Priority: normal Milestone: 0.11
Component: wiki system Version: devel
Severity: minor Keywords: TracLinks
Cc:
Release Notes:
API Changes:

Description (last modified by cboos) (diff)

Currently, each flavor of TracLinks implements its own "sub" syntax.

There is some consistency however, for example,
a trailing "#fragment" is used to locate a specific anchor in the targeted
objects.
This works for section anchors in Wiki pages and more recently
for line numbers in repository files.

Also, there's some support for the special "?format=raw" argument
which works for attachment: links, and it was suggested that source:
links adopt the same convention.

What becomes apparent from the above is that those conventions
are pretty much the same as those used for URIs.

Therefore, I propose to add the query URI syntax
to the TracLinks syntax, for the short and long form of links
(but not for the shorthand forms).

Examples:

Attachments

Change History

comment:1 Changed 6 years ago by cboos

See also #1209, for a similar request concerning milestone: links.

comment:2 Changed 6 years ago by cboos

  • Milestone set to 0.9.1

See also #2078, for a similar request concerning changeset: links.

comment:3 Changed 6 years ago by cmlenz

  • Milestone changed from 0.9.1 to 0.9.2

comment:4 Changed 6 years ago by cmlenz

  • Milestone changed from 0.9.3 to 1.0

comment:5 Changed 6 years ago by cboos

See also #2635 for a discussion about uniform handling of
versioning arguments (e.g. type:id@version for addressing
a specific version of the object, and type:id@versionx:versiony
for addressing a specific change or group of changes for the object).

comment:6 follow-up: Changed 6 years ago by cboos

  • Milestone changed from 1.0 to 0.11

We should also allow fragment identifiers after tickets
(e.g. ticket:2168#comment:5 or #2168#comment:5)
and changesets (e.g. r1231#file3, see #2078).

comment:7 in reply to: ↑ 6 Changed 5 years ago by cboos

Replying to cboos:

We should also allow fragment identifiers after tickets
(e.g. ticket:2168#comment:5 or #2168#comment:5)
...

How funny, I just wanted to write a comment here saying just that... again!

I find the current comment link syntax (e.g. comment:ticket:3555:5) a bit irritating... It was initially modelled after the attachment syntax (e.g. attachment:<resource>:<file>), but in the case of comments, it's really annoying to have to split the comment: prefix and the comment number.

Maybe we could change both syntaxes to thing:which_thing:type:id?
Ideally, this could even be "recursive", e.g. comment:4:attachment:the_file.txt:ticket:345.

Just brainstorming...

comment:8 Changed 5 years ago by cboos

(side-note: the syntax changes suggested in comment:7 were implemented in [3824:3828])

comment:9 Changed 5 years ago by cboos

r4364 added argument support for ticket: TracLinks, as well as support for the comment syntax suggested in comment:6.

comment:10 Changed 5 years ago by cboos

  • Keywords TracLinks added

r4367 added argument and fragment support for changeset: and diff: TracLinks.

comment:11 Changed 5 years ago by cboos

  • Description modified (diff)
  • Status changed from new to assigned

r4368 added argument and fragment support for source: and log: TracLinks. export: TracLinks have only support for fragments, as the reason to have export: link was specifically to not have any arguments in URLs (see r4242).

comment:12 Changed 5 years ago by cboos

  • Resolution set to fixed
  • Status changed from assigned to closed

... and finally with r4371 and the milestone: TracLinks, the main purpose of this ticket is fulfilled. If there's any issue with the changes introduced (or omissions), please create new defect tickets.

In future iterations of the Wiki engine, more things could probably be done at the generic level, but until that time, the functionality as at least there.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.