forked from emberjs/ember-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add args to tree Rebasing seemed hard, so opening a new PR * Adjust component tree colors Co-Authored-By: Jerry Nummi <[email protected]> * Update app/helpers/component-argument.js Co-Authored-By: Godfrey Chan <[email protected]> * Remove at-token Co-Authored-By: Jerry Nummi <[email protected]> * Use suggested class ifs * Apply changes based on feedback * Fix lint * Fix component list overflow (emberjs#1129) * Fix component list overflow background color * Gradient on component-tree-item actions * Update app/controllers/component-tree.js Co-Authored-By: Godfrey Chan <[email protected]> * Update app/templates/components/component-tree-item.hbs Co-Authored-By: Godfrey Chan <[email protected]> * Bring back hover highlight in component tree (emberjs#1135) * Bring back hover highlight in component tree * Update comment in app/styles/component_tree.scss Co-Authored-By: Godfrey Chan <[email protected]> Co-authored-by: Godfrey Chan <[email protected]> * Truncate, add quotes * Update truncate.js Co-authored-by: Jerry Nummi <[email protected]> Co-authored-by: Godfrey Chan <[email protected]>
- Loading branch information
Showing
13 changed files
with
365 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
singleQuote: true, | ||
overrides: [ | ||
{ | ||
files: '**/*.hbs', | ||
options: { | ||
parser: 'glimmer', | ||
singleQuote: false | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { helper } from '@ember/component/helper'; | ||
import truncate from 'ember-inspector/utils/truncate'; | ||
|
||
/** | ||
* Determine the type of the component argument for display | ||
* | ||
* @method componentArgumentDisplay | ||
* @param {*} argument | ||
* @return {*} The argument with the correct type for display | ||
*/ | ||
export function componentArgumentDisplay([argument]) { | ||
if (typeof argument === 'string') { | ||
// Escape any interior quotes – we will add the surrounding quotes in the template | ||
return truncate(argument.replace(/"/g, '\\"')); | ||
} else if (typeof argument === 'object' && argument !== null) { | ||
return '...'; | ||
} | ||
|
||
return String(argument); | ||
} | ||
|
||
export default helper(componentArgumentDisplay); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { helper } from '@ember/component/helper'; | ||
|
||
export function isString([str]) { | ||
return typeof str === 'string'; | ||
} | ||
|
||
export default helper(isString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.