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

Addons: use verbose_name instead of slug for sorting versions #11182

Open
humitos opened this issue Mar 4, 2024 · 0 comments
Open

Addons: use verbose_name instead of slug for sorting versions #11182

humitos opened this issue Mar 4, 2024 · 0 comments
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@humitos
Copy link
Member

humitos commented Mar 4, 2024

In the response of /addons/ API endpoint we are using version.slug to generate addons.flyout.versions:

"versions": [
{
# TODO: name this field "display_name"
"slug": version_.slug,
"url": resolver.resolve(
project=project,
version_slug=version_.slug,
external=version_.type == EXTERNAL,
),
}
for version_ in versions_active_built_not_hidden
],

Note there aren't too many differences here, but a version named like release/v2.x (verbose_name) will be rendered in the flyout as release-v2.x instead (slug).

Also note that we could consider to render the versions completely (using the VersionSerializer) under adddons.flyout.versions instead of just { slug: ..., url: ... }

Reference #11069 (comment)

@humitos humitos added Improvement Minor improvement to code Accepted Accepted issue on our roadmap labels Mar 4, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
Status: Planned
Development

No branches or pull requests

1 participant