[GH-ISSUE #35] Extend variables api configuration #246

Closed
opened 2026-03-15 01:54:44 +03:00 by kerem · 1 comment
Owner

Originally created by @BigDog1400 on GitHub (Jan 15, 2024).
Original GitHub issue: https://github.com/arikchakma/maily.to/issues/35

Showing a warning for every variable added (that doesn't have a fallback), may cause some confusion for some users. I will like to propose change the api for the variables prop to this

type ExtensionsProps = {
  variables?: Array<{
    name: string;
    defaultValue?: string;
    required?: boolean // default to true
  }>
};

In this proposal, each variable in the array can have an associated 'name', an optional 'defaultValue', and a 'required' flag that defaults to true. This approach could make the handling of variables more flexible and intuitive for users.

Originally created by @BigDog1400 on GitHub (Jan 15, 2024). Original GitHub issue: https://github.com/arikchakma/maily.to/issues/35 Showing a warning for every variable added (that doesn't have a fallback), may cause some confusion for some users. I will like to propose change the api for the variables prop to this ```tsx type ExtensionsProps = { variables?: Array<{ name: string; defaultValue?: string; required?: boolean // default to true }> }; ``` In this proposal, each variable in the array can have an associated 'name', an optional 'defaultValue', and a 'required' flag that defaults to true. This approach could make the handling of variables more flexible and intuitive for users.
kerem closed this issue 2026-03-15 01:54:49 +03:00
Author
Owner

@arikchakma commented on GitHub (Jan 15, 2024):

I agree. Let's not add the defaultValue in the props. Only name and required is fine I think. Because we have to manually add the fallback value.

<!-- gh-comment-id:1892019896 --> @arikchakma commented on GitHub (Jan 15, 2024): I agree. Let's not add the `defaultValue` in the props. Only `name` and `required` is fine I think. Because we have to manually add the `fallback value`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#246
No description provided.