Page MenuHomePhabricator

Blacklist monograms which are also used in normal discussions, like "Q1" (quarter 1)
Closed, ResolvedPublic

Description

Problem: in comments, etc, all mentions of

W###
can result in links being created to Dashboard Panels.
In our organization, W### stands for something non-phabricator related, and the need to link to panels is not very likely.

Is there a way to disable what can be smart-linked?
Otherwise, where can I patch the source to disable only this kind of smart link locally?

Event Timeline

timor raised the priority of this task from to Needs Triage.
timor updated the task description. (Show Details)
timor added projects: Dashboards, Phabricator.
timor added a subscriber: timor.

I'm inclined to just let you specify a regexp of patterns to ignore when matched out-of-context. For example, Q1..Q4 are commonly used to mean "Quarter 1" through "Quarter 4". I think we implicitly ignore these right now, but it would be better to make this explicit.

You could then ignore all W... patterns.

Specifying regexps would be a nice option.

One could then invent a syntax to explicitely activate the ignored link again if necessary, e.g. something like ![W..] or !{W..} for inline links, respectively

In the meantime, i really would like to deactivate this in our install. Would patching this here be easy? If so, where do i look?

Make PhabricatorApplicationDashboard->getRemarkupRules() return an empty array.

Path forward here should be something like this:

  • Add an option like remarkup.ignored-object-names, which has a regular expression.
  • Default value should be something like /^(Q|V)\d$/ I guess, to blacklist Q1 through Q9 and V1 through V9. I think these are the only things that sometimes conflict with normal, non-specialized text.
  • In PhabricatorObjectRemarkupRule->markupObject(), test $params['ref'] against this blacklist, and return the original text if the ref matches.
  • Remove the hard-coded blacklisting of Q1..Q4 in PonderRemarkupRule.
  • Maybe mention this in the Remarkup documentation.
epriestley renamed this task from allow disabling of Wxx smart links to Panels to Blacklist monograms which are also used in normal discussions, like "Q1" (quarter 1).Aug 6 2014, 10:29 PM