Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[✨] Improve input types #35

Closed
maiieul opened this issue May 28, 2024 · 2 comments
Closed

[✨] Improve input types #35

maiieul opened this issue May 28, 2024 · 2 comments
Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation

Comments

@maiieul
Copy link

maiieul commented May 28, 2024

Is your feature request related to a problem?

At the time of writing, current implementation is the following:

input: {
    autoComplete?:
      | HTMLInputAutocompleteAttribute
      | Omit<HTMLInputAutocompleteAttribute, string>
      | undefined;
    'bind:checked'?: Signal<boolean | undefined>;
    'bind:value'?: Signal<string | undefined>;
    enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
    height?: Size | undefined;
    max?: number | string | undefined;
    maxLength?: number | undefined;
    min?: number | string | undefined;
    minLength?: number | undefined;
    step?: number | string | undefined;
    type?: HTMLInputTypeAttribute | undefined;
    value?: string | ReadonlyArray<string> | number | undefined | null | FormDataEntryValue;
    width?: Size | undefined;
    children?: undefined;
  } & (
    | {
        type?:
          | Exclude<HTMLInputTypeAttribute, 'button' | 'reset' | 'submit' | 'checkbox' | 'radio'>
          | undefined;
        'bind:checked'?: undefined;
      }
    | {
        type?: 'button' | 'reset' | 'submit';
        'bind:value'?: undefined;
        'bind:checked'?: undefined;
        autoComplete?: undefined;
      }
    | {
        type?: 'checkbox' | 'radio';
        'bind:value'?: undefined;
        autoComplete?: undefined;
      }
  ) &
    (
      | {
          type?: Exclude<HTMLInputTypeAttribute, 'button'> | undefined;
          popovertarget?: undefined;
          popovertargetaction?: undefined;
        }
      | {
          type: 'button';
          popovertarget?: string | undefined;
          popovertargetaction?: PopoverTargetAction | undefined;
        }
    );

But as explained in QwikDev/qwik#6398, it breaks on Checkbox components that use input of type checkbox under the hood and the bind: syntax.

As we said in QwikDev/qwik#6398, we're going to simplify it with

    type?: HTMLInputTypeAttribute | undefined;

we can try to improve upon it later.

@maiieul
Copy link
Author

maiieul commented May 28, 2024

I had to remove a test in QwikDev/qwik#6398. We need to remember to add it back.

@gioboa
Copy link
Member

gioboa commented Oct 14, 2024

We moved this issue to qwik-evolution repo to create a RFC discussion for this.
Here is our Qwik RFC process thanks.

@gioboa gioboa transferred this issue from QwikDev/qwik Oct 14, 2024
@github-project-automation github-project-automation bot moved this to In Progress (STAGE 2) in Qwik Evolution Oct 14, 2024
@github-actions github-actions bot added [STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation labels Oct 14, 2024
@QwikDev QwikDev locked and limited conversation to collaborators Oct 14, 2024
@gioboa gioboa converted this issue into discussion #111 Oct 14, 2024
@github-project-automation github-project-automation bot moved this from In Progress (STAGE 2) to Released as Stable (STAGE 5) in Qwik Evolution Oct 14, 2024
@shairez shairez removed this from Qwik Evolution Oct 15, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Projects
None yet
Development

No branches or pull requests

2 participants