Message378

Author retroj
Recipients
Date 2009-06-11.00:10:12
Content
As primary investigator into this feature, I'll outline my own preferred answers to the
questions I posed:

  There would be one command, called, for example `show-attribute'.  When called, it
would prompt for an attribute to show, and generate labels for the entire web page
showing the value of that attribute for all the nodes that had it.  These labels would
persist.

  To remove the labels, you would call `show-attribute' with universal-argument.  It
would prompt you for which set of labels to remove---because perhaps you are displaying
several sets of attribute labels.  This prompt would use $require_match completion
on the attributes currently shown.

  In order to accomadate the display of multiple attribute sets, the labels would need
to be colored, or have their text include an identifier like "alt:", or even both.  If
labels for any given attribute had a unique class name, then CSS would be the cleanest
way to enable configuration.  For example, for colors, the CSS property "background",
and for textual id, the CSS pseudo-selector ":before" could be used.

  It would also be possible to use user-defined functions to retrieve colors and
text-formatting, but these decorations seem more properly the domain of CSS.

  We would want to be a little careful with choosing a binding, so that we don't use up
one that we might want to use later, for example, if we implemented a "highlight" module
patterned after the one that Emacs has.  `C-x w a' seems like a fair choice.  The `a'
would be a mnemonic for "attribute".
History
Date User Action Args
2009-06-11 00:10:12retrojsetmessageid: <1244679012.73.0.820777899381.issue169@servo.cc>
2009-06-11 00:10:12retrojlinkissue169 messages
2009-06-11 00:10:12retrojcreate