Page MenuHomePhabricator

Add button actions for links
Closed, ResolvedPublic


Add button actions for internal and external links.

The description will also allow links, but sometimes it's important enough to put in the button. Currently you have to hack it up with an onclick. We'll probably do that internally, but for the user-facing API it should be easier. How about:

{ action: "wikiLink", pageName: "Wikipedia:Tutorial", name: "Tutorial" }

{ action: "externalLink", url: "", namemsg: "guidedtour-tour-sometour-some-key" }

These will probably be a little different from the existing actions, in that I don't think they should use the Okay button.

I propose name and namemsg for the button text (for both), for consistency.

Version: master
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:38 AM
bzimport set Reference to bz44734.

Implemented in

I made a couple changes:

  1. I used page instead of pageName for brevity.
  2. They are actual links, not onclicks. However, they still have the button class and look and act like buttons for the most part. But e.g. they show the URL in the status bar (if applicable) and you can open in a new window/tab, like links.