Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component: VTag #2773

Closed
Tracked by #2775
obulat opened this issue Aug 3, 2023 · 11 comments · Fixed by #3137
Closed
Tracked by #2775

Component: VTag #2773

obulat opened this issue Aug 3, 2023 · 11 comments · Fixed by #3137
Assignees
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Aug 3, 2023

Description

The new VTag component will be used for clickable tags. The current, non-clickable, VMediaTag component will be replaced with it.

To create a new component, run just frontend/run create:component VTag. This will run the component generator and will create the new component file, a Storybook story, unit and Playwright tests. The unit and playwright tests can be deleted.

API

Props

Name Type Description
title string The tag text
href string The url the tag should link to

Code samples

<VButton
  as="VLink"
  size="small"
  variant="filled-gray"
  class="label-bold"
  :href="href"
>{{ title }}</VButton>
@obulat obulat added good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🌟 goal: addition Addition of new feature 🕹 aspect: interface Concerns end-users' experience with the software 🧱 stack: frontend Related to the Nuxt frontend labels Aug 3, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Aug 3, 2023
@Vanshika-Aggarwal
Copy link

Hey, I am new to open-source contributions, can I work on this issue?

@obulat
Copy link
Contributor Author

obulat commented Aug 15, 2023

Hi, @Vanshika-Aggarwal, sure! I'm assigning the issue to you 🚀 Please let me know if you need any help. Please be sure to create a separate branch, not the main branch, in your fork of the Openverse repository for the PR.

@obulat obulat moved this from 📋 Backlog to 📅 To do in Openverse Backlog Aug 18, 2023
@krysal
Copy link
Member

krysal commented Aug 31, 2023

Hey @Vanshika-Aggarwal! Hope you're doing well! Do you still plan to work on this? Do you need help with the project setup or anything? Remember to check the guidelines (1) (2). If you need further help (get in touch!) or don't plan to continue this effort, let us know in any case.

@Vanshika-Aggarwal
Copy link

Hey..sorry for going awol,I would totally like to work on this issue, I just thought this branch was dormant and didn't go through my emails. I am working on this issue now.

@krysal
Copy link
Member

krysal commented Aug 31, 2023

Thank you for confirming! That sounds great 😄

@ngken0995
Copy link
Collaborator

Hello @krysal and @obulat,

Can I work on this issue?

@ngken0995
Copy link
Collaborator

ngken0995 commented Oct 2, 2023

@obulat and @krysal I created a VTag component. What is the href suppose to do? For example, user click on the "cat" tag then the href is https://openverse.org/search/?q=cat. How can I implement that into the codebase? I tried :href="`search/${tag}`" and I get https://openverse.org/image/search/?q=cat which lead to an unusable homepage.

@obulat
Copy link
Contributor Author

obulat commented Oct 4, 2023

@ngken0995 , VTag should accept href as a prop, and should use that prop as the href:

<template>
<VButton
  as="VLink"
  size="small"
  variant="filled-gray"
  class="label-bold"
  :href="href"
>{{ title }}</VButton>
<script lang="ts"> ... props: { title: { .... }, href: { type: String, required: true, } } ... </script> ```

@ngken0995
Copy link
Collaborator

ngken0995 commented Oct 4, 2023

@obulat There is a VMediaTags component which takes the VMediaTag. What should the href be when I pass the prop in VTags once replace VMediaTag in VMediaTags?

@obulat
Copy link
Contributor Author

obulat commented Oct 4, 2023

@obulat There is a VMediaTags component which takes the VMediaTag. What should the href be when I pass the prop in VTags once replace VMediaTag in VMediaTags?

VTag should be a completely separate component, @ngken0995 . You don't need to do anything with VMediaTag.

@ngken0995
Copy link
Collaborator

@obulat I misunderstood the task. I thought I would have create a VTag and replace it with VMediaTag on the same PR.

@ngken0995 ngken0995 mentioned this issue Oct 4, 2023
5 tasks
@github-project-automation github-project-automation bot moved this from 📅 To do to ✅ Done in Openverse Backlog Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕹 aspect: interface Concerns end-users' experience with the software 🌟 goal: addition Addition of new feature good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants