Skip to content

Commit 77fa7c8

Browse files
committed
Docs - expand documentation on custom fields for selects a bit
Summary: ...and fix an error where lines that start with ##X## are rendering incorrectly by switching to alternate syntax `X`. Fixes T5806. Test Plan: read the docs and they looked good Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T5806 Differential Revision: https://secure.phabricator.com/D10165
1 parent 20a65b2 commit 77fa7c8

18 files changed

+38
-30
lines changed

src/docs/contributor/javascript_coding_standards.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ see @{article:Javascript Object and Array}.
107107
break;
108108
}
109109

110-
##break## statements should be indented to block level. If you don't push them
110+
`break` statements should be indented to block level. If you don't push them
111111
in, you end up with an inconsistent rule for conditional ##break## statements,
112112
as in the ##2## case.
113113

src/docs/contributor/php_coding_standards.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ visually and react better to "Find Next..." in editors.
112112
break;
113113
}
114114

115-
##break## statements should be indented to block level.
115+
`break` statements should be indented to block level.
116116

117117
**array literals:**
118118

src/docs/contributor/using_oauthserver.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to use the Phabricator OAuth Server.
66
= Overview =
77

88
Phabricator includes an OAuth Server which supports the
9-
##Authorization Code Grant## flow as described in the OAuth 2.0
9+
`Authorization Code Grant` flow as described in the OAuth 2.0
1010
specification:
1111

1212
http://tools.ietf.org/html/draft-ietf-oauth-v2-23

src/docs/flavor/javascript_pitfalls.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ usually after operators.
2929

3030
= ##with## is Bad News =
3131

32-
##with## is a pretty bad feature, for this reason among others:
32+
`with` is a pretty bad feature, for this reason among others:
3333

3434
with (object) {
3535
property = 3; // Might be on object, might be on window: who knows.

src/docs/flavor/php_pitfalls.diviner

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ Strongly prefer the ##key## varieties.
153153
= array_uintersect() and array_udiff() are Definitely Slow Too =
154154

155155
These functions have the problems of both the ##usort()## family and the
156-
##array_diff()## family. Avoid them.
156+
`array_diff()` family. Avoid them.
157157

158158
= foreach() Does Not Create Scope =
159159

160160
Variables survive outside of the scope of foreach(). More problematically,
161161
references survive outside of the scope of foreach(). This code mutates
162-
##$array## because the reference leaks from the first loop to the second:
162+
`$array` because the reference leaks from the first loop to the second:
163163

164164
COUNTEREXAMPLE
165165
$array = range(1, 3);
@@ -276,7 +276,7 @@ This doesn't do what you'd expect it to do in C:
276276

277277
This is because the successor to 'z' is 'aa', which is "less than" 'z'. The
278278
loop will run for ~700 iterations until it reaches 'zz' and terminates. That is,
279-
##$c## will take on these values:
279+
`$c` will take on these values:
280280

281281
a
282282
b

src/docs/tech/celerity.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ appropriate references to CSS and JS resources. It uses
4646
resources (so you only have to explicitly include what you're actually using,
4747
and not all of its dependencies) and any packaging rules (so it may be able to
4848
generate fewer resource requests, improving performance). It then generates
49-
##<script />## and ##<link />## references to these resources.
49+
`<script />` and `<link />` references to these resources.
5050

5151
These references point at ##/res/## URIs, which are handled by
5252
@{class:CelerityResourceController}. It responds to these requests and delivers

src/docs/tech/chatbot.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ servers and in different languages.
6767

6868
To allow the bot to access Conduit, you need to create a user that it can login
6969
with. To do this, login to Phabricator as an administrator and go to
70-
##People -> Create New Account##. Create a new account and flag them as a
70+
`People -> Create New Account`. Create a new account and flag them as a
7171
"Bot/Script". Then in your configuration file, set these parameters:
7272

7373
- ##conduit.uri## The URI for your Phabricator install, like

src/docs/tech/conduit.diviner

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ handles.
4444

4545
There is a web interface for viewing and testing Conduit called the "Conduit
4646
Console", implemented by @{class:PhabricatorConduitConsoleController} at
47-
##/conduit/##.
47+
`/conduit/`.
4848

4949
A log of connections and calls is stored by
5050
@{class:PhabricatorConduitConnectionLog} and
5151
@{class:PhabricatorConduitMethodCallLog}, and can be accessed on the web via
5252
@{class:PhabricatorConduitLogController} at ##/conduit/log/##.
5353

5454
Conduit provides a token-based handshake mechanism used by
55-
##arc install-certificate## at ##/conduit/token/##, implemented by
55+
`arc install-certificate` at `/conduit/token/`, implemented by
5656
@{class:PhabricatorConduitTokenController} which stores generated tokens using
5757
@{class:PhabricatorConduitCertificateToken}.

src/docs/tech/files.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ order to make files actually get written to it, you also need to extend
3636
@{class:PhabricatorFileStorageEngineSelector}, provide an implementation which
3737
selects your storage engine for whatever files you want to store there, and then
3838
configure Phabricator to use your selector by setting
39-
##storage.engine-selector##.
39+
`storage.engine-selector`.

src/docs/user/configuration/configuring_accounts_and_registration.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ administrative user.
4444
= Managing Accounts with the Web Console =
4545

4646
To manage accounts from the web, login as an administrator account and go to
47-
##/people/## or click "People" on the homepage. Provided you're an admin,
47+
`/people/` or click "People" on the homepage. Provided you're an admin,
4848
you'll see options to create or edit accounts.
4949

5050
= Manually Creating New Accounts =

src/docs/user/configuration/configuring_inbound_email.diviner

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ If you get a linker error like this:
179179

180180
...you need to edit your php.ini file so that mbstring.so is loaded **before**
181181
mailparse.so. This is not the default if you have individual files in
182-
##php.d/##.
182+
`php.d/`.
183183

184184
= Local MTA: Configuring Sendmail =
185185

@@ -197,13 +197,13 @@ probably means something like this:
197197
- restart sendmail.
198198

199199
Now, you can actually configure sendmail to deliver to Phabricator. In
200-
##/etc/aliases##, add an entry like this:
200+
`/etc/aliases`, add an entry like this:
201201

202202
phabricator: "| /path/to/phabricator/scripts/mail/mail_handler.php <ENV>"
203203

204204
...where <ENV> is the PHABRICATOR_ENV the script should run under. Run
205-
##sudo newaliases##. Now you likely need to symlink this script into
206-
##/etc/smrsh/##:
205+
`sudo newaliases`. Now you likely need to symlink this script into
206+
`/etc/smrsh/`:
207207

208208
sudo ln -s /path/to/phabricator/scripts/mail/mail_handler.php /etc/smrsh/
209209

@@ -213,7 +213,7 @@ Finally, edit ##/etc/mail/virtusertable## and add an entry like this:
213213

214214
That will forward all mail to @yourdomain.com to the Phabricator processing
215215
script. Run ##sudo /etc/mail/make## or similar and then restart sendmail with
216-
##sudo /etc/init.d/sendmail restart##.
216+
`sudo /etc/init.d/sendmail restart`.
217217

218218
= Local MTA: Configuring Lamson =
219219

src/docs/user/configuration/custom_fields.diviner

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,18 @@ value of `maniphest.custom-field-definitions`):
5959
"type": "int",
6060
"caption": "Actual number of hours this took."
6161
},
62+
"mycompany:company-jobs": {
63+
"name": "Job Role",
64+
"type: "select",
65+
"options": {
66+
"mycompany:engineer": "Engineer",
67+
"mycompany:nonengineer": "Other"
68+
}
69+
},
6270
"mycompany:favorite-dinosaur": {
6371
"name": "Favorite Dinosaur",
6472
"type": "text"
65-
}
73+
},
6674
}
6775

6876
The fields will then appear in the other config option for the application
@@ -82,8 +90,8 @@ When defining custom fields using a configuration option like
8290
- **int**: An integer, rendered as a text field.
8391
- **text**: A string, rendered as a text field.
8492
- **bool**: A boolean value, rendered as a checkbox.
85-
- **select**: Allows the user to select from several options, rendered
86-
as a dropdown.
93+
- **select**: Allows the user to select from several options as defined
94+
by **options**, rendered as a dropdown.
8795
- **remarkup**: A text area which allows the user to enter markup.
8896
- **users**: A typeahead which allows multiple users to be input.
8997
- **date**: A date/time picker.

src/docs/user/installation_guide.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ document for you:
7373

7474
If those work for you, you can skip directly to the
7575
@{article:Configuration Guide}. These scripts are also available in the
76-
##scripts/install## directory in the project itself.
76+
`scripts/install` directory in the project itself.
7777

7878
Otherwise, here's a general description of what you need to install:
7979

src/docs/user/userguide/arcanist_lint_unit.diviner

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ When you run ##arc list --trace##, you should see a message to the effect that
5757
it has loaded your library.
5858

5959
For debugging or testing, you can also run Arcanist with the
60-
##--load-phutil-library## flag:
60+
`--load-phutil-library` flag:
6161

6262
arc --load-phutil-library=/path/to/library <command>
6363

6464
You can specify this flag more than once to load several libraries. Note that
6565
if you use this flag, Arcanist will ignore any libraries listed in
66-
##.arcconfig##.
66+
`.arcconfig`.
6767

6868
= Use the Class =
6969

src/docs/user/userguide/diffusion_symbols.diviner

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ write such a script, and run this command to see its output:
6161
$ find . -type f -name '*.php' | ./scripts/symbols/generate_php_symbols.php
6262

6363
To actually build the symbol index, pipe this data to the
64-
##import_project_symbols.php## script, providing the project name:
64+
`import_project_symbols.php` script, providing the project name:
6565

6666
$ ./scripts/symbols/import_project_symbols.php yourproject < symbols_data
6767

@@ -77,7 +77,7 @@ configuration.
7777
To configure Differential integration, you need to tell Phabricator which
7878
projects have symbol indexes you want to use, and which other projects they
7979
should pull symbols from. To do this, go to
80-
##Repositories -> Arcanist Projects -> Edit## as an administrator. You need to
80+
`Repositories -> Arcanist Projects -> Edit` as an administrator. You need to
8181
fill out these fields:
8282

8383
- **Repository**: Associate the project with a tracked repository.

src/docs/user/userguide/libraries.diviner

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ step.
8080
But, if you intend to use this library with Phabricator, you need to define its
8181
dependency on Phabricator by creating a ##.arcconfig## file which points at
8282
Phabricator. For example, you might write this file to
83-
##libcustom/.arcconfig##:
83+
`libcustom/.arcconfig`:
8484

8585
{
8686
"project.name" : "libcustom",
@@ -134,7 +134,7 @@ invoke, so your code will keep working as the upstream changes.
134134

135135
When developing libraries to work with libphutil, Arcanist and Phabricator, you
136136
should respect method and property visibility and extend only classes marked
137-
##@stable##. They are rendered with a large callout in the documentation (for
137+
`@stable`. They are rendered with a large callout in the documentation (for
138138
example: @{class@libphutil:AbstractDirectedGraph}). These classes are external
139139
interfaces intended for extension.
140140

src/docs/user/userguide/mail_rules.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Phabricator sends a variety of mail headers that can be useful in crafting rules
3535
to route and manage mail.
3636

3737
Headers in plural contain lists. A list containing two items, ##1## and
38-
##15## will generally be formatted like this:
38+
`15` will generally be formatted like this:
3939

4040
X-Header: <1>, <15>
4141

src/docs/user/userguide/remarkup.diviner

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ This produces a block like this:
213213
}
214214

215215
You can use ##lines=N## to limit the vertical size of a chunk of code, and
216-
##name=some_name.ext## to give it a name. For example, this:
216+
`name=some_name.ext` to give it a name. For example, this:
217217

218218
lang=text
219219
lang=html, name=example.html, lines=12, counterexample

0 commit comments

Comments
 (0)