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

Improvements #1

Closed
bomsn opened this issue Jun 16, 2020 · 0 comments
Closed

Improvements #1

bomsn opened this issue Jun 16, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bomsn
Copy link
Owner

bomsn commented Jun 16, 2020

  1. This project is in desperate need of a Linter like ESLint. I tried reading the source code on GitHub I couldn't follow it. Spacing inconsistencies is making it hard to follow
  2. I would prefer using the hidden boolean attribute instead of accessing the element style and setting it none.
  3. Controlling the element visibility isn't enough, you have to disable the element using the disabled boolean attribute to avoid submitting its value. You can use that either on the form input or the fieldset.
  4. Your library shouldn't be logging anything to the console. You can use that in debugging if you want but you should either remove it manually or by a script when you ship it. If you want to show an error or a warning using console.warn or throw an error.
  5. Using IDs should be prohibited because if the user wants to use your library on more than one instance on the same page, he will have to create elements with the same ID. It's invalid.
  6. It's advised to check for the global window object before adding stuff to it. In the case of SSR, the window object isn't available and it would break the build.
    Finally, try to publish it on NPM, it will be a great experience.
@bomsn bomsn added the enhancement New feature or request label Jun 16, 2020
@bomsn bomsn self-assigned this Jun 16, 2020
@bomsn bomsn changed the title Feedback Improvements Jun 16, 2020
@bomsn bomsn closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant