Coder Social home page Coder Social logo

Spectrum Textfield about spectrum-web-components HOT 7 CLOSED

adobe avatar adobe commented on September 23, 2024
Spectrum Textfield

from spectrum-web-components.

Comments (7)

Westbrook avatar Westbrook commented on September 23, 2024

@adixon-adobe You brought this component up to begin with, do you have a specific use case that you're working with? There are a couple of different ways I think we could make it "ready to ship" that leave room for further iteration via the decorator pattern or the form participation API, but what's OK depends on where this element would likely be used.

from spectrum-web-components.

adixon-adobe avatar adixon-adobe commented on September 23, 2024

@Westbrook the thing I ran into with SpectrumCSS & Spectrum it that there's no error text support (which I needed for e-mail validation errors, like "you can't invite yourself").

The form errors tutorial here shows this: https://spectrum.corp.adobe.com/page/tutorials

@lazd I think you mentioned some related work happening for other badging (and I think I offered to help back when I had time).

Anyways, I don't think that needs to come in the first round of implementation, but it's something we'll need to solve to adopt it.

from spectrum-web-components.

adixon-adobe avatar adixon-adobe commented on September 23, 2024

Now that I re-read your comment, I think we're on the same page 🥇

from spectrum-web-components.

Westbrook avatar Westbrook commented on September 23, 2024

Sorry, @adixon-adobe, I think I was unclear. I'm looking for use cases as to how the sp-textfield will be applied in your application. In general, wrapping an <input/> in the shadow DOM of a custom element excludes it from participating directly in parent <form/> elements. If we're OK with manually collecting the data, via responding to change events or querying el.values across any textfields, then there is less work do be done on this component before we can move forward than if we want form participation handled. The emerging specifications in https://web.dev/more-capable-form-controls are interesting, but not x-browser yet, so in that case some quality of https://medium.com/@westbrook/decorator-pattern-plus-816eefc89824 would be required to do so. With your use case being the soonest one to cover, I was hoping that knowing it could clarify the scope for the initial publication of this component in our library.

from spectrum-web-components.

adixon-adobe avatar adixon-adobe commented on September 23, 2024

Oh -- we shouldn't need to worry about <form/> elements in our case. We've generally handled events manually (I think the only

element on our site is on a report abuse form that we can just leave as pretty unstyled/basic html).

from spectrum-web-components.

adixon-adobe avatar adixon-adobe commented on September 23, 2024

This is a SpectrumCSS issue that covers adding the error label support: adobe/spectrum-css#169

from spectrum-web-components.

Westbrook avatar Westbrook commented on September 23, 2024

Initial pass complete. We should consider additions like form participation, formData event management, or labels in a separate issue.

from spectrum-web-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.