Skip to content

Add favorites tab to library Modal [SYNTH-269] - #1454

Open
RoushilS wants to merge 2 commits into
darora1/218/ui-tourfrom
roushils/269/add-favorites-tab
Open

Add favorites tab to library Modal [SYNTH-269]#1454
RoushilS wants to merge 2 commits into
darora1/218/ui-tourfrom
roushils/269/add-favorites-tab

Conversation

@RoushilS

Copy link
Copy Markdown
Contributor

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

  • Users can favorite and unfavorite assets
  • Best assets are favorited by default.
  • Existing functionality preserved

Before merging, ensure the following criteria are met:

  • All acceptance criteria outlined in the ticket are met.
  • Necessary test cases have been added and updated.
  • A feature toggle or safe disable path has been added (if applicable).
  • User-facing polish:
    • Ask: "Is this ready-looking?"
  • Cross-linking between Jira and GitHub:
    • PR links to the relevant Jira issue.
    • Jira ticket has a comment referencing this PR.

@RoushilS RoushilS changed the title Add favorites tab [SYNTH-269] Add favorites tab to library Modal [SYNTH-269] Jul 28, 2026
@RoushilS RoushilS self-assigned this Jul 28, 2026
@RoushilS
RoushilS marked this pull request as ready for review July 28, 2026 18:36
@RoushilS
RoushilS requested review from a team as code owners July 28, 2026 18:36
@RoushilS
RoushilS requested review from AlexD717, Dhruv-0-Arora, PepperLola and rutmanz and removed request for a team July 28, 2026 18:36

@rutmanz rutmanz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

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$/, ""))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment on lines +33 to +34
FavoritedAssemblies: string[]
UnfavoritedAssemblies: string[]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants