-
Notifications
You must be signed in to change notification settings - Fork 610
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
app: Make separate requests for crate and versions #10296
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ export default class VersionRoute extends Route { | |
|
||
let versions; | ||
try { | ||
versions = await crate.get('versions'); | ||
versions = await crate.loadVersionsTask.perform(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, not in this PR: but this should probably also only request the corresponding version instead of the full version list :D |
||
} catch (error) { | ||
let title = `${crate.name}: Failed to load version data`; | ||
return this.router.replaceWith('catch-all', { transition, error, title, tryAgain: true }); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ export default class VersionRoute extends Route { | |
|
||
let versions; | ||
try { | ||
versions = await crate.get('versions'); | ||
versions = await crate.loadVersionsTask.perform(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, this shouldn't need to load the full version list to display a single version |
||
} catch (error) { | ||
let title = `${crate.name}: Failed to load version data`; | ||
return this.router.replaceWith('catch-all', { transition, error, title, tryAgain: true }); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't have to be in this PR, but this should probably just
this.router.replaceWith('crate.version-dependencies', crate, default_version);
instead of loading the full version list 😅There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the part after #10288 needs to be changed. I'm also wondering if we could just load versions in the versions route. (This would have the downside of not having a versions count on the tab.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot that we show the number of versions in the tab. I do look at that quite often though, so it would be unfortunate to lose it 🤔