Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Closed
wants to merge 2 commits into from

2 participants

Erik Vold wbamberg
Erik Vold
Collaborator

No description provided.

packages/addon-kit/docs/simple-prefs.md
@@ -105,9 +105,14 @@ These are attributes that all settings *may* have:
105 105
   </tr>
106 106
 
107 107
   <tr>
  108
+    <td><code>label</code></td>
  109
+    <td>Button text for the `control` type.</td>
5
wbamberg Collaborator
wbamberg added a note August 13, 2012

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.

Erik Vold Collaborator
erikvold added a note August 13, 2012

hehe darn.. got it!

wbamberg Collaborator
wbamberg added a note August 13, 2012

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.

Erik Vold Collaborator
erikvold added a note August 13, 2012

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 Collaborator
wbamberg added a note August 13, 2012

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
Erik Vold erikvold closed this November 13, 2012
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 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  packages/addon-kit/docs/simple-prefs.md
7  packages/addon-kit/docs/simple-prefs.md
Source Rendered
@@ -105,9 +105,14 @@ These are attributes that all settings *may* have:
105 105
   </tr>
106 106
 
107 107
   <tr>
  108
+    <td><code>label</code></td>
  109
+    <td>Button text for the <code>control</code> type.</td>
  110
+  </tr>
  111
+
  112
+  <tr>
108 113
     <td><code>value</code></td>
109 114
     <td>A default value for the setting. Depending on the setting type,
110  
-	this may be an integer, string, or boolean value.</td>
  115
+    this may be an integer, string, or boolean value.</td>
111 116
   </tr>
112 117
 
113 118
 </table>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.