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

✨ 51 adding form components #101

Merged
merged 48 commits into from
Jul 29, 2024
Merged

✨ 51 adding form components #101

merged 48 commits into from
Jul 29, 2024

Conversation

langehm
Copy link
Contributor

@langehm langehm commented May 29, 2024

Issues #51

@langehm langehm self-assigned this May 29, 2024
@langehm langehm linked an issue May 29, 2024 that may be closed by this pull request
@langehm
Copy link
Contributor Author

langehm commented May 29, 2024

The search form does need some logic for calculating the current available options. Should we use some debounce logic to reduce computation?

const debounce = (func: (...args: any[]) => any, timeout: number = 500) => {
  let timer: number;
  return (...args: any[]) => {
    clearTimeout(timer);
    timer = setTimeout(() => {
      func.apply(this, args);
    }, timeout);
  };
};

I don't like such logic inside the component, as it is a very specific use case. But if this form is used with a big list of available options - this is a problem which should be addressed.

@langehm
Copy link
Contributor Author

langehm commented May 29, 2024

Suffix does not seem to work in the patternlab either ...
grafik

Prefix does work.

@langehm langehm marked this pull request as ready for review May 30, 2024 15:15
@langehm langehm requested a review from FabianWilms May 30, 2024 15:15
@langehm langehm changed the title 51 adding forms component 51 adding input component May 30, 2024
@langehm
Copy link
Contributor Author

langehm commented May 30, 2024

some forms are missing ...

@langehm
Copy link
Contributor Author

langehm commented Jun 5, 2024

Suffix does not seem to work in the patternlab either ... grafik

Prefix does work.

Works only with icons

src/components/Form/MucCheckbox.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucCheckbox.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucCheckbox.vue Outdated Show resolved Hide resolved
src/components/Form/MucCheckboxGroup.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucCheckboxGroup.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucInput.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucInput.vue Show resolved Hide resolved
src/components/Form/MucTextArea.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucTextArea.vue Outdated Show resolved Hide resolved
src/components/Form/index.ts Outdated Show resolved Hide resolved
@langehm langehm requested a review from FabianWilms July 25, 2024 07:30
@langehm
Copy link
Contributor Author

langehm commented Jul 25, 2024

We should introduce a composable to define unique id's automagically to every html element. Ussage like the following:

const idForThisComponent = useUniqueID("muc-radio-button"); // return sth like muc-radio-button-123

vuetify uses similiar approach with some vue methods to generate the unique id's.

@FabianWilms
Copy link
Member

FabianWilms commented Jul 25, 2024

We should introduce a composable to define unique id's automagically to every html element. Ussage like the following:

const idForThisComponent = useUniqueID("muc-radio-button"); // return sth like muc-radio-button-123

vuetify uses similiar approach with some vue methods to generate the unique id's.

#148

@langehm
Copy link
Contributor Author

langehm commented Jul 29, 2024

Above comment suggestions were done in this commit

Copy link
Member

@FabianWilms FabianWilms left a comment

Choose a reason for hiding this comment

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

And one small edition when testing out the components: I can select a radio button by clicking on the text, but for the checkbox-component I can only select it by clicking into the box itself. I think clicking the text should also select it.

src/components/Form/MucErrorList.stories.ts Outdated Show resolved Hide resolved
src/components/Form/MucRadioButton.stories.ts Show resolved Hide resolved
FabianWilms
FabianWilms previously approved these changes Jul 29, 2024
@langehm langehm changed the title 51 adding form components :sparkling: 51 adding form components Jul 29, 2024
@langehm langehm changed the title :sparkling: 51 adding form components ✨ 51 adding form components Jul 29, 2024
@langehm langehm merged commit 5c4345c into beta Jul 29, 2024
6 checks passed
@langehm langehm deleted the 51-adding-forms-component branch July 29, 2024 12:21
Copy link

🎉 This PR is included in version 1.11.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 1.12.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

✨ adding forms component
2 participants