-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tidy up Promise tab - @, this, </>, action, etc. * Consistent action passing to PromiseItem * Angle bracket for promise table cells
- Loading branch information
1 parent
86c7124
commit d6a75ca
Showing
4 changed files
with
95 additions
and
94 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 |
---|---|---|
@@ -1,76 +1,76 @@ | ||
{{#list.cell | ||
class=(concat "list__cell_main " expandedClass) | ||
style=labelStyle | ||
on-click=(action toggleExpand model) | ||
}} | ||
<@list.cell | ||
class={{concat "list__cell_main " this.expandedClass}} | ||
style={{this.labelStyle}} | ||
@on-click={{action @toggleExpand @model}} | ||
> | ||
<div class="list__cell-partial list__cell-partial_size_medium"> | ||
<span | ||
title={{label}} | ||
title={{this.label}} | ||
class="js-promise-label" | ||
> | ||
<span class="list__cell-arrow"></span> {{label}} | ||
<span class="list__cell-arrow"></span> {{this.label}} | ||
</span> | ||
</div> | ||
<div class="list__cell-helper"> | ||
{{#if model.hasStack}} | ||
{{#if @model.hasStack}} | ||
<button | ||
class="send-to-console send-to-console--chevron-only js-trace-promise-btn" | ||
title="Trace promise in console" | ||
{{action tracePromise model}} | ||
{{action @tracePromise @model}} | ||
> | ||
{{svg-jar "send-with-chevron" width="6px" height="9px"}} | ||
Trace | ||
</button> | ||
{{/if}} | ||
</div> | ||
{{/list.cell}} | ||
</@list.cell> | ||
|
||
{{#list.cell}} | ||
<@list.cell> | ||
<div | ||
class="pill pill--bold pill--text js-promise-state" | ||
style={{style}} | ||
style={{this.style}} | ||
> | ||
{{state}} | ||
{{this.state}} | ||
</div> | ||
{{/list.cell}} | ||
</@list.cell> | ||
|
||
{{#list.cell class="js-promise-value"}} | ||
{{#if hasValue}} | ||
<@list.cell class="js-promise-value"> | ||
{{#if this.hasValue}} | ||
<div | ||
class="list__cell-partial list__cell-partial_size_medium" | ||
title={{settledValue.inspect}} | ||
title={{this.settledValue.inspect}} | ||
> | ||
{{#if isValueInspectable}} | ||
{{#if this.isValueInspectable}} | ||
<span | ||
class="list__link js-promise-object-value" | ||
{{action inspectObject settledValue.objectId}} | ||
{{on "click" (fn @inspectObject settledValue.objectId)}} | ||
> | ||
{{settledValue.inspect}} | ||
{{this.settledValue.inspect}} | ||
</span> | ||
{{else}} | ||
{{settledValue.inspect}} | ||
{{this.settledValue.inspect}} | ||
{{/if}} | ||
</div> | ||
|
||
<div class="list__cell-helper"> | ||
{{#if isError}} | ||
{{#if this.isError}} | ||
<button | ||
class="send-to-console send-to-console--chevron-only js-send-to-console-btn" | ||
title="Send stack trace to the console" | ||
{{action sendValueToConsole model}} | ||
{{action @sendValueToConsole @model}} | ||
> | ||
{{svg-jar "send-with-chevron" width="6px" height="9px"}} | ||
Stack Trace | ||
</button> | ||
{{else}} | ||
<Ui::SendToConsole @action={{sendValueToConsole}} @param={{model}} /> | ||
<Ui::SendToConsole @action={{@sendValueToConsole}} @param={{@model}} /> | ||
{{/if}} | ||
</div> | ||
{{else}} | ||
-- | ||
{{/if}} | ||
{{/list.cell}} | ||
</@list.cell> | ||
|
||
{{#list.cell class="list__cell list__cell_value_numeric js-promise-time"}} | ||
{{ms-to-time timeToSettle}} | ||
{{/list.cell}} | ||
<@list.cell class="list__cell list__cell_value_numeric js-promise-time"> | ||
{{ms-to-time this.timeToSettle}} | ||
</@list.cell> |
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