Skip to content

DEV: add valueTransformer customization points to flag.gjs #33113

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

marstall
Copy link
Contributor

@marstall marstall commented Jun 6, 2025

adds valueTransformers to the "Flag" button component:
flag-button-render-decision: whether to show the flag
flag-button-disabled-state: whether the flag button should be in a disabled state
post-action-menu__flag create-flag: ability to add class to flag button.

also adds "like-button-render-decision" valueTransformer to Like button, which determines whether to show or hide the like flag.

// Provide an empty string as the default class, and pass post and component instance as context
return applyValueTransformer("flag-button-dynamic-class", "", {
post: this.args.post,
componentContext: this,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you're using componentContext in the sister PR for this, are you?

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

Successfully merging this pull request may close these issues.

2 participants