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

[Question]: Placemnet of card_template() function. #225

Closed
3 tasks done
kartikeyakirar opened this issue Oct 11, 2023 · 1 comment
Closed
3 tasks done

[Question]: Placemnet of card_template() function. #225

kartikeyakirar opened this issue Oct 11, 2023 · 1 comment
Labels
question Further information is requested

Comments

@kartikeyakirar
Copy link
Contributor

What is your question?

To include card labels, the add_card_button_srv function allows you to specify the card_fun along with a label parameter for customizing the card's title and content. This feature enables you to utilize the label shiny input and incorporate it into your card_fun to set the title.

When it comes to teal modules, each module has its own structure for the card_fun, but there are common elements shared across all card_function that can be standardized within a card_template function. You can find an example of this in the following code:

Teal Reporter - card_template function

This card_template function can be further encapsulated to suit specific requirements, as demonstrated here:

Teal Goshawk - customized card_template

The challenge lies in deciding where to place the card_template function, as keeping it within teal.reporter adds teal as a dependent package. Here are a few suggestions:

Option 1:
Move the card_template() function to teal as an exported function. Instead of teal.reporter.

Option 2:
Create a separate card_template for each module (e.g., tmc, tmg, tmh) to ensure module-specific customization. As done previously.

Option 3:
Consider adding teal as a dependency to teal.reporter to retain the card_template function.

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@kartikeyakirar kartikeyakirar added the question Further information is requested label Oct 11, 2023
@kartikeyakirar
Copy link
Contributor Author

kartikeyakirar commented Oct 16, 2023

Card_template() function has been added to teal package. linking PR related to this insightsengineering/teal#933

Edit: this was duplicated task .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant