Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Consolidate Location Tags as a subtype of Product Tags #753

Open
johnrozan opened this issue Dec 9, 2021 · 0 comments
Open

Consolidate Location Tags as a subtype of Product Tags #753

johnrozan opened this issue Dec 9, 2021 · 0 comments

Comments

@johnrozan
Copy link

As it stands now, product location effectively operates as a product tag, but it stands as a completely separate domain concept - we should at least discuss consolidating all tags pertaining to a product into a single domain concept, and discuss the implications for doing so (including how we'd change the DB, backend, and frontend).

We have a lot of somewhat complicated code that grabs all tag types and just mashes them together, using hard-coded indices and magic strings to demarcate the different types (for example, ProductFilter.tsx:67) - if we had a single interface for tags, we could simply return all desired tags including their subtype (i.e. location, role, user-defined, etc...) as part of a single request, instead of making 3 requests to 3 controllers and waiting for all 3 to return.

This would make adding new subtypes in the future easier, and also better prepare our codebase for if our users ever wanted the ability to define their own tag subtypes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant