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

Calculating property in "All" view #1019

Open
nummi opened this issue Sep 5, 2019 · 6 comments
Open

Calculating property in "All" view #1019

nummi opened this issue Sep 5, 2019 · 6 comments
Assignees
Labels

Comments

@nummi
Copy link
Collaborator

nummi commented Sep 5, 2019

Passing this to the model doesn't work when calculating a property.
https://github.com/emberjs/ember-inspector/blob/master/app/templates/components/mixin-details.hbs#L55

Reproduce:

  1. Select "All" view

image

  1. Find a CP that needs computing:

image

  1. 💥

Assigning to myself since I wrote it :-|

@nummi nummi self-assigned this Sep 5, 2019
@RobbieTheWagner
Copy link
Member

@nummi do you have an example app you are trying this with? There have been lots of other changes, so not sure if model=this is the problem or something else.

@nummi
Copy link
Collaborator Author

nummi commented Sep 6, 2019

I discovered this poking around on the Apple Music beta site. Pretty sure this is incorrect because this is the mixin-detail component.

let mixinIndex = this.get('mixinDetails.model.mixins').indexOf(this.model);

this.model is not part of mixinDetails.model.mixins so mixinIndex is -1.

@RobbieTheWagner
Copy link
Member

@nummi gotcha, I just know a lot has changed in a bunch of areas, so wasn't sure if this was the culprit.

@nummi
Copy link
Collaborator Author

nummi commented Sep 6, 2019

Pretty sure the above line is the culprit. It’s a year old 🤢

@RobbieTheWagner
Copy link
Member

Do we have tests for this?

@nummi
Copy link
Collaborator Author

nummi commented Sep 7, 2019

I don’t think so. Not sure how to get a property in the “not computed” state.

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

No branches or pull requests

2 participants