Bug 1314573 - Uses Reps in long mode in the console; r=bgrins draft
authorNicolas Chevobbe <chevobbe.nicolas@gmail.com>
Thu, 17 Nov 2016 13:38:23 +0100
changeset 440560 1c6f4c85ddc0054b431981b3198a1fd68495d360
parent 440559 a7ff746662f006e1a132ce1e21cac3a0cbbea0e2
child 440561 160e0dd210a5ec227e24f7636444553ebd80c75c
push id36264
push userchevobbe.nicolas@gmail.com
push dateThu, 17 Nov 2016 20:23:00 +0000
reviewersbgrins
bugs1314573
milestone53.0a1
Bug 1314573 - Uses Reps in long mode in the console; r=bgrins MozReview-Commit-ID: 6KyZkN86bHJ
devtools/client/webconsole/new-console-output/components/console-table.js
devtools/client/webconsole/new-console-output/components/grip-message-body.js
--- a/devtools/client/webconsole/new-console-output/components/console-table.js
+++ b/devtools/client/webconsole/new-console-output/components/console-table.js
@@ -53,17 +53,18 @@ const ConsoleTable = createClass({
   getRows: function (columns, items) {
     return items.map(item => {
       let cells = [];
       columns.forEach((value, key) => {
         cells.push(
           dom.td(
             {},
             GripMessageBody({
-              grip: item[key]
+              grip: item[key],
+              mode: "short",
             })
           )
         );
       });
       return dom.tr({}, cells);
     });
   },
 
--- a/devtools/client/webconsole/new-console-output/components/grip-message-body.js
+++ b/devtools/client/webconsole/new-console-output/components/grip-message-body.js
@@ -32,16 +32,20 @@ GripMessageBody.propTypes = {
     PropTypes.object,
   ]).isRequired,
   serviceContainer: PropTypes.shape({
     createElement: PropTypes.func.isRequired,
   }),
   userProvidedStyle: PropTypes.string,
 };
 
+GripMessageBody.defaultProps = {
+  mode: "long",
+};
+
 function GripMessageBody(props) {
   const { grip, userProvidedStyle, serviceContainer } = props;
 
   let styleObject;
   if (userProvidedStyle && userProvidedStyle !== "") {
     styleObject = cleanupStyle(userProvidedStyle, serviceContainer.createElement);
   }