Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug 782184 - mention optional 'label' in simple-prefs docs #524

Closed
wants to merge 2 commits into from

2 participants

@erikvold
Owner

No description provided.

packages/addon-kit/docs/simple-prefs.md
@@ -105,9 +105,14 @@ These are attributes that all settings *may* have:
</tr>
<tr>
+ <td><code>label</code></td>
+ <td>Button text for the `control` type.</td>
@wbamberg Owner

You apparently can't use Markdown inside certain HTML block elements including tables, so this has to be <code>control</code>. It's painful, I know.

@erikvold Owner

hehe darn.. got it!

@wbamberg Owner

Bah, I should not review pull requests before coffee. The table you're adding this to is "Optional Common Attributes", which contains "attributes that all settings may have". But this attribute is specific to the control type, so should be documented in the table under "Setting Types" alongside the control type - which it already is.

It's possible that this is terribly confusing, but I think if the table just presents all the attributes and lists which ones apply to which types, then it will be even more confusing.

@erikvold Owner

I don't think there will be many optional settings.. when I was reading this page last night this is where I immediately looked for what is the label property, not seeing it there caused my to look harder which is why I made the bug.

@wbamberg Owner

I don't think there will be many optional settings

label isn't actually optional, is it? It's mandatory for the control type, I think. So "Optional Common Attritbutes" is the wrong table for it anyway.

There aren't many settings-specific attributes. If it's confusing to document setting-specific attributes along with the settings themselves, then this PR should do something like:

  • rename "Mandatory Common Attributes" to "Mandatory Attributes", change its description accordingly, add label as well as boolint's on and off attributes, and explain when they're used and what they mean
  • for consistency, rename "Optional Common Attributes" to "Optional Attributes" and change its description accordingly.

Or, you also merge "Mandatory Common Attributes" and "Optional Common Attributes", and describe for each attribute which types is applies to, and whether it's mandatory or optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@erikvold erikvold closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 packages/addon-kit/docs/simple-prefs.md
View
7 packages/addon-kit/docs/simple-prefs.md
@@ -105,9 +105,14 @@ These are attributes that all settings *may* have:
</tr>
<tr>
+ <td><code>label</code></td>
+ <td>Button text for the <code>control</code> type.</td>
+ </tr>
+
+ <tr>
<td><code>value</code></td>
<td>A default value for the setting. Depending on the setting type,
- this may be an integer, string, or boolean value.</td>
+ this may be an integer, string, or boolean value.</td>
</tr>
</table>
Something went wrong with that request. Please try again.