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

Create form field number #8634

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Create form field number #8634

wants to merge 16 commits into from

Conversation

Devessier
Copy link
Contributor

@Devessier Devessier commented Nov 21, 2024

  • Refactor VariableTagInput to have a reusable low-level TipTap editor
  • Create two primitive form fields:
    • Text
    • Number
    • Boolean

Notes:

  • We could refactor the VariableTagInput to fully use components from FormFieldInput.

To do:

  • Put isTextField(), isNumberField(), etc. calls in a separate FormField component that we can reuse across actions

`;

const StyledInputContainer2 = styled.div<{
multiline?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

multiline not needed for number

flex-direction: column;
`;

const StyledInputContainer = styled.div<{
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be a common Overlay for primitive components

<StyledVariableContainer>
{extractVariableLabel(draftValue)}

<button
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we have a component already for this?

<StyledInputContainer>
<StyledInputContainer2>
{editingMode === 'input' ? (
<StyledInput
Copy link
Contributor

Choose a reason for hiding this comment

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

let's separate:

  • FormNumberFieldInput should be a simple number input with a FormOverlay to add design
  • Variable button / dropdown should come from the parent

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

Successfully merging this pull request may close these issues.

4 participants