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

Tidy up render-tree tab #1025

Merged
merged 2 commits into from
Sep 19, 2019
Merged

Conversation

nummi
Copy link
Collaborator

@nummi nummi commented Sep 13, 2019

  • fix table striping
  • remove observer
  • fix search highlighting
  • action, this, etc.

I simply removed the observer for now because the functionality it provided is not very helpful:
search

I believe this was meant to expand every list item. In the future we could expand the tree where necessary.

}

return this.model.filter((item) => {
const regExp = new RegExp(this.escapedSearch);
return !!recursiveMatch(item, regExp);
Copy link
Collaborator Author

@nummi nummi Sep 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the !! is here for since recursiveMatch seems to only return a boolean value. Am I crazy?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, its not needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nummi if it's not needed, should we go ahead and remove?

@nummi nummi force-pushed the render-performance-cleanup branch 3 times, most recently from 9b79c27 to 9a9f463 Compare September 13, 2019 22:38
@nummi nummi force-pushed the render-performance-cleanup branch from 9a9f463 to d3e094a Compare September 14, 2019 03:08
@@ -58,6 +58,12 @@
}
}

.list.list--css-striping {
Copy link
Collaborator Author

@nummi nummi Sep 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just seemed like the easiest way to get striping working again.
🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not an existing class for striping?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do. It’s based on passing a boolean to a row. I think I was struggling with this since the dataset is nested.

}

return this.model.filter((item) => {
const regExp = new RegExp(this.escapedSearch);
return !!recursiveMatch(item, regExp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, its not needed.

@nummi nummi force-pushed the render-performance-cleanup branch from d3e094a to c596af0 Compare September 18, 2019 18:58
@@ -114,24 +114,6 @@ module('Render Tree Tab', function(hooks) {
assert.dom(rows[0].querySelector('.js-render-profile-name')).hasText('First View Rendering');
assert.dom(rows[1].querySelector('.js-render-profile-name')).hasText('Second View Rendering');

await fillIn('.js-render-profiles-search input', 'first');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nummi do we not need these tests anymore?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Search filtering is still tested in the lines below these — the code removed here was testing the (broken, see GIF) functionality of opening of children rows.

@nummi nummi changed the title Tidy up render-tree tab WIP: Tidy up render-tree tab Sep 19, 2019
@nummi nummi force-pushed the render-performance-cleanup branch 2 times, most recently from 68a011f to a584904 Compare September 19, 2019 19:07
- fix table striping
- remove observer
- fix search highlighting
- action, this, {{on}}, etc.
- use Ui:Disclosure
@nummi nummi force-pushed the render-performance-cleanup branch from a584904 to a4fbd1d Compare September 19, 2019 19:30
@nummi nummi changed the title WIP: Tidy up render-tree tab Tidy up render-tree tab Sep 19, 2019
@nummi nummi merged commit d8c0bd1 into emberjs:master Sep 19, 2019
@nummi nummi deleted the render-performance-cleanup branch September 19, 2019 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants