Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use word-wrap and add line break controls #2460

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ember_debug/libs/view-inspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function makeStylesheet(id) {
color: #000;
background: transparent;
max-width: 400px;
word-break: break-word;
word-wrap: break-word;
}

#${prefix}-tooltip-${id} .${prefix}-tooltip-arrow {
Expand Down Expand Up @@ -521,7 +521,7 @@ export default class ViewInspection {
if (Array.isArray(value)) {
this._renderTokens(td, value);
} else {
td.innerText = value;
td.innerText = value.replace(/\//g, '\u200B/\u200B');
}

tr.appendChild(th);
Expand Down
28 changes: 24 additions & 4 deletions tests/ember_debug/view-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestFoo>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-foo.hbs');
.hasText(
'my-app/templates/components/test-foo.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText('App.TestFooComponent');
Expand Down Expand Up @@ -833,7 +838,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestBar>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-bar.hbs');
.hasText(
'my-app/templates/components/test-bar.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText(
Expand Down Expand Up @@ -874,7 +884,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestFoo>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-foo.hbs');
.hasText(
'my-app/templates/components/test-foo.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText('App.TestFooComponent');
Expand All @@ -898,7 +913,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestFoo>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-foo.hbs');
.hasText(
'my-app/templates/components/test-foo.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText('App.TestFooComponent');
Expand Down
Loading