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

DEV: Add AsyncCategoryLink component #26451

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danielwaterworth
Copy link
Member

Renders a category link, but is also responsible for fetching the category.

Renders a category link, but is also responsible for fetching the
category.
Copy link
Contributor

@pmusaraj pmusaraj left a comment

Choose a reason for hiding this comment

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

This looks good to me, happy to approve once it's out of draft and linting/test issues are addressed.

Curious what @nbianca thinks as well.

import categoryLink from "discourse/helpers/category-link";
import Category from "discourse/models/category";

export default class AsyncCategoryLink extends Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

Overall this makes sense. But naming is tricky, I think in the long run we don't necessarily want to keep Async in the name. Can we use CategoryLink? There might be a naming conflict with the helper, not sure.

Would be great to also test in how many places we can replace the helper with this component.

One more thing: it would be good to have this represented in the styleguide. The category badge screen there needs some love anyway.

Copy link

github-actions bot commented Jun 5, 2024

This pull request has been automatically marked as stale because it has been open for 60 days with no activity. To keep it open, remove the stale tag, push code, or add a comment. Otherwise, it will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants