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

Remove "Authors" section from crate details page #3132

Merged
merged 1 commit into from
Mar 21, 2021
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
9 changes: 0 additions & 9 deletions app/components/crate-sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@
{{/each}}
</ul>
</div>

<div>
<h3>Authors</h3>
<ul>
{{#each @version.authorNames as |author|}}
<li>{{ format-email author }}</li>
{{/each}}
</ul>
</div>
</div>

<div local-class='bottom'>
Expand Down
10 changes: 0 additions & 10 deletions app/models/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default class Version extends Model {
@belongsTo('crate', { async: false }) crate;

@belongsTo('user', { async: false }) published_by;
@hasMany('users', { async: true }) authors;
@hasMany('dependency', { async: true }) dependencies;
@hasMany('version-download', { async: true }) version_downloads;

Expand Down Expand Up @@ -97,15 +96,6 @@ export default class Version extends Model {
.map(name => ({ name, isDefault: defaultFeatures.includes(name), dependencies: features[name] }));
}

@alias('loadAuthorsTask.last.value') authorNames;

@(task(function* () {
// trigger the async relationship to load the content
let authors = yield this.authors;
return authors.meta.names;
}).keepLatest())
loadAuthorsTask;

@alias('loadDepsTask.last.value.normal') normalDependencies;
@alias('loadDepsTask.last.value.build') buildDependencies;
@alias('loadDepsTask.last.value.dev') devDependencies;
Expand Down
4 changes: 0 additions & 4 deletions app/routes/crate/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export default class VersionRoute extends Route {
setupController(controller, model) {
super.setupController(...arguments);

if (!model.version.authorNames) {
model.version.loadAuthorsTask.perform();
}

controller.loadReadmeTask.perform().catch(() => {
// ignored
});
Expand Down