bsoc-bitbyte / GetIt

Streamlined college e-commerce: Simplifying merch buying and selling for students.
https://getit.iiitdmj.ac.in/
17 stars 51 forks source link

[Feature Request]: Add "tags" selection component #216

Open AkashPaloju opened 2 months ago

AkashPaloju commented 2 months ago

Is your feature request related to a problem? Please describe.

We need an"tags" selection component to apply the tags when adding a product / event

Describe the solution you'd like

Create the component according to this figma https://www.figma.com/design/5Hs4DlvyJJWjQB9K7Fh0CY/Getit?node-id=1335-751&t=zvceiaocLViVgFF6-0

The parent component will pass a list of tags for this component to choose from. This component should create and pass a new tag (to the parent) if no tag is found.

Note : The string matching should identify a substring match too. Only top 3 matches should be displayed in the suggestions.The parent component will receive all data from the backend and pass it to this child component. This child component does not interact directly with the backend.

Describe alternatives you've considered

No response

Developer Help

List the component's "props" you create and explain how data communication occurs between the component and its parent component. Describe how you implement an efficient search functiontionality.

yashpatil641 commented 2 months ago

@AkashPaloju I would like to work on this issue. I will create a new TagSelection.vue component that will accept two props: initialTags and availableTags. The component will display all tags in initialTags and update the list whenever tags are added or removed. It will emit an update:tags event for these changes, which the parent component will listen for updates. For search functionality, the suggestions computed property will filter availableTags based on the input, excluding already selected tags and limiting results to 3 suggestions.

AkashPaloju commented 2 months ago

@yashpatil641 Great! You can work on this, go ahead.

Thanks!