Skip to content

add temporary solution for linking to classes from different project #248

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

Merged

Conversation

MartinMalinda
Copy link
Contributor

A temporary and dirty solution for #243.

Ideally, the properties that are currently computed properties on the class model would be provided by ember-json-api-docs.

Another option would to transform uses and extends into relationships. But that could result in extra network requests... or JSON-API could take care of that via include?

@toddjordan
Copy link
Contributor

Thanks @MartinMalinda will pull it down and try it out. Can you fix up the eslint errors for CI?

@MartinMalinda MartinMalinda force-pushed the links-between-projects branch from 27bcd78 to e3b9862 Compare July 3, 2017 18:37
@MartinMalinda
Copy link
Contributor Author

@toddjordan Fixed!

@@ -8,7 +8,7 @@
{{#if model.extends}}
<div class="attribute">
<span class="attribute-label">Extends:</span>
<span class="attribute-value">{{#link-to 'project-version.classes.class' model.projectVersion.version model.extends}}{{model.extends}}{{/link-to}}</span>
<span class="attribute-value">{{#link-to 'project-version.classes.class' model.extendedClassProjectName model.extendedClassVersion model.extends}}{{model.extends}}{{/link-to}}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

the name is available from the route. we should be able to pass it to the template instead of guessing in the model object. you can get it from transition.params['project-version'].project in the model hook.

Copy link
Contributor Author

@MartinMalinda MartinMalinda Jul 4, 2017

Choose a reason for hiding this comment

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

The issue is, transitioning from Ember Data 2.14 to Ember 2.14 can break the app if Ember 2.14 is not released yet.

Copy link
Contributor

@toddjordan toddjordan Jul 4, 2017

Choose a reason for hiding this comment

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

wasn't talking about version, but referring to model.extendedClassProjectName

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, well then it would not solve anything, we'd be linking to from ember-data to ember-data same as before, having broken link. We need to be able to link from ember-data to ember back and forth.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I get what's happening now. this is the link to a class that the current one is exteded from cross project. disregard 👍

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.

2 participants