Skip to content

Commit

Permalink
Bug 1330858 - Hide Object string for cookies object;r=Honza
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: G2G0xY2S2Ij

--HG--
extra : rebase_source : 100169a07499f2399dfc7ab2ff556cdf52aa4013
  • Loading branch information
Fred Lin committed Jan 17, 2017
1 parent f981af1 commit 8c5caa6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions devtools/client/netmonitor/shared/components/properties-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,21 @@ const PropertiesView = createClass({
},

renderValueWithRep(props) {
// Hide rep summary for sections
if (props.member.level === 0) {
const { member } = props;

// Hide strings with following conditions
// 1. this row is a togglable section
// 2. the `value` object has a `value` property, only happend in Cookies panel
// Put 2 here to not dup this method
if (member.level === 0 ||
(typeof member.value === "object" && member.value.value)) {
return null;
}

return Rep(Object.assign(props, {
// FIXME: A workaround for the issue in StringRep
// Force StringRep to crop the text everytime
member: Object.assign({}, props.member, { open: false }),
member: Object.assign({}, member, { open: false }),
mode: MODE.TINY,
cropLimit: 60,
}));
Expand Down Expand Up @@ -149,11 +155,11 @@ const PropertiesView = createClass({

render() {
const {
object,
decorator,
enableInput,
expandableStrings,
filterPlaceHolder,
object,
renderRow,
renderValue,
sectionNames,
Expand Down Expand Up @@ -191,8 +197,6 @@ const PropertiesView = createClass({
)
);
}

});

module.exports = PropertiesView;

4 changes: 2 additions & 2 deletions devtools/client/shared/components/tree/tree-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ define(function (require, exports, module) {
* getHeaderClass: function(colId);
* renderValue: function(object, colId);
* renderRow: function(object);
* renderCelL: function(object, colId);
* renderCell: function(object, colId);
* renderLabelCell: function(object);
* }
*/
Expand Down Expand Up @@ -78,7 +78,7 @@ define(function (require, exports, module) {
getHeaderClass: PropTypes.func,
renderValue: PropTypes.func,
renderRow: PropTypes.func,
renderCelL: PropTypes.func,
renderCell: PropTypes.func,
renderLabelCell: PropTypes.func,
}),
// Custom tree row (node) renderer
Expand Down

0 comments on commit 8c5caa6

Please sign in to comment.