docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

fix(topbar): support teams in topbar owner links

Open Tyrubias opened this issue 1 year ago • 1 comments

Currently the owner links in the top bar does not support teams. This pull request updates the database to store the kind of the crate owner (currently either user or team). The owner kind is added or updated to the database when a crate is built. It also updates the top bar to render the appropriate link based on kind. Finally, this pull request adds a subcommand to update all crate data from the crates.io API.

I chose not to use an enum for the kind of the crate owner because the only place in the code which we directly need to make a decision based on the crate owner kind is in the Tera template for the top bar. Otherwise, we would need to convert the enum to and from a string every time we retrieved the data from the database. Please let me know if this is a good approach.

Closes #2356

Tyrubias avatar Feb 29 '24 10:02 Tyrubias

If needed, I can fix the GUI in a later PR.

GuillaumeGomez avatar Feb 29 '24 15:02 GuillaumeGomez

@rustbot ready

Tyrubias avatar May 02 '24 06:05 Tyrubias

Error: The feature shortcut is not enabled in this repository. To enable it add its section in the triagebot.toml in the root of the repository.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

rustbot avatar May 02 '24 06:05 rustbot

@rustbot label -S-waiting-on-author +S-waiting-on-review

Tyrubias avatar May 02 '24 06:05 Tyrubias