Coder Social home page Coder Social logo

Comments (4)

bamnet avatar bamnet commented on April 28, 2024

I think it's useful to make distinct features, like autocomplete, into their own component files. Developers might want to pull in the autocomplete box without a map.

Personally, I also find it easier to read diffs if we have seperate files. I always get a bit confused if a change is happening up in <google-map-marker> or down in <google-map> since they're part of the same google-map.html file.

P.S. I'd open an issue about the autocomplete functionality you're interested in, there are a few different ways that implementation can pan out if we choose to expose the full autocomplete widget or just the JS service you could wire up to your own input boxes.

from google-map.

mbykovskyy avatar mbykovskyy commented on April 28, 2024

Ok I'll open a new issue for autocomplete component. Should this issue stay open until there's an agreed convention for naming and separating components? Like you said google-map.html contains two components while the rest of the components/services live in their own file.

from google-map.

bamnet avatar bamnet commented on April 28, 2024

Let's let @ebidel || @addyosmani weigh in here.

from google-map.

ebidel avatar ebidel commented on April 28, 2024

Generally, we prefer separate files for separate functionality. That's the majority case. However, for something like google-map and google-map-marker, the latter is not useful by itself so it makes sense to define it alongside google-map. Given that, a separate import would be wasteful and unnecessary.

from google-map.

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.