Add favorites tab to library Modal [SYNTH-269] - #1454
Conversation
[SYNTH-269][SYNTH-269]
rutmanz
left a comment
There was a problem hiding this comment.
Are the year tabs supposed to be gone?
Also I think it might be better to have the favorites tab always present (either as "Favorites" or with the star icon) and just show "No favorited assets yet!" if empty.
Also it looks like the defaults don't work quite right, when I opened it, nothing from the assetpack was favorited.
Also maybe auto-favorite local uploads because they'll probably be likely to use the models they add themselves
|
|
||
| const DEFAULT_FAVORITE_NAMES = new Set<string>(["Dozer v11", "KitBot (2026)", "FRC Field 2026 v2"]) | ||
|
|
||
| const isDefaultFavorite = (filename: string): boolean => DEFAULT_FAVORITE_NAMES.has(filename.replace(/\.mira$/, "")) |
There was a problem hiding this comment.
Why not make this part of the assetpack manifest? Then it would be easier to update / clearer when looking at the rest of the assets. You could still hardcode the names but I think it would make more sense for it to be in the update_manifest file so then it's determined by the asset source and not the frontend (imagine we would want the new kitbot and field to be favorites, but not push a frontend deploy to update that)
| FavoritedAssemblies: string[] | ||
| UnfavoritedAssemblies: string[] |
There was a problem hiding this comment.
I think it might make more sense (and make your data structures more efficient) to do AssemblyFavoriteStatus: Record<string, "favorited"|"unfavorited"|undefined> so it's all one structure and you can't have an invalid state (like an assembly that is both favorited and unfavorited)
Task
SYNTH-269
Symptom
Users would have to click through years in the library assembly multiple times, which can be annoying.
Solution
Add new tab with frontent favorite display logic, as well as backend default loading of selected assets. Also briefely updated tutorial.
Verification
Before merging, ensure the following criteria are met: