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

Refactor ComponentViewItem to use native class #1060

Closed
wants to merge 4 commits into from

Conversation

chancancode
Copy link
Member

No description provided.

@wycats wycats force-pushed the refactor-component-view-item branch from 882c4b4 to 6051dac Compare November 7, 2019 22:38
Copy link
Member

@RobbieTheWagner RobbieTheWagner left a comment

Choose a reason for hiding this comment

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

@chancancode this seems mostly okay, but we have some test failures. Mind taking a look?

@@ -137,7 +136,7 @@ export default Controller.extend({
viewArray.forEach(viewItem => {
let cachedExpansion = expandedStateCache[getIdFromObj(viewItem)];
if (cachedExpansion !== undefined) {
viewItem.set('expanded', cachedExpansion);
Copy link
Member

Choose a reason for hiding this comment

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

We not longer need set here?

Copy link
Collaborator

@nummi nummi Nov 9, 2019

Choose a reason for hiding this comment

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

The class is using @tracked.

@@ -210,7 +209,7 @@ export default Controller.extend({
this.filteredArray.forEach((item) => {
const id = getIdFromObj(item);
if (objects.includes(id)) {
item.set('expanded', state);
Copy link
Member

Choose a reason for hiding this comment

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

Or here?

@wycats wycats force-pushed the refactor-component-view-item branch from 6051dac to b7e0cc3 Compare November 8, 2019 00:38
@RobbieTheWagner
Copy link
Member

@chancancode this seems fine to me, we just need to fix the tests.

@chancancode
Copy link
Member Author

Yeah! I looked into it and I know why it's not working. It needs a bigger refactor, I'll get back to this next week.

@chancancode
Copy link
Member Author

I’ll resubmit this as part of a bigger refactor to use the new debug render tree api. I was hoping that this can be separated out relatively cleanly, but it needed more work that start to eat into the other refactor so probably doesn’t make sense to do it in isolation anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants