Git Product home page Git Product logo

Comments (3)

zepheiryan avatar zepheiryan commented on August 21, 2024

I passed on this in the first draft as every facet would need to implement it a little differently depending on its nature. Some knowledge of usage of this event would help in forming what it would pass on, etc. Should it merely signal that something changed? Also put out what selection was chosen? Un-chosen? Added? Which text was written in the text search - so far, or after a reasonable pause in typing? Or just the actual facet instance so the rest can be determined programmatically by interrogating the object?

from exhibit3.

karger avatar karger commented on August 21, 2024

I'm not convinced that we have so many different kinds of facets. We have several enumerated types, where the obvious thing is to report the list of selected values, and we have some range types, where it is reasonable to report upper and lower limits of the selection.

Passing the facet instance does seem to be a reasonable backup; it at least allows anyone who cares to do something about it.

Related question: should such facet change events be used to notify views (and other facets) that they should update? Is that already how it's implemented?

from exhibit3.

zepheiryan avatar zepheiryan commented on August 21, 2024

Facets directly notify collections of changes through the collection API and duck typing, and the collection then informs all components in its purview of the changes. This might be better replaced by a mirror Event API, but I won't have time to look into that for this revision.

I was talking about code reuse. It doesn't really matter how similar some are in the abstract; that doesn't reduce the amount of code that needs to be written, though some of it is going to look similar.

Those questions are getting at what you want from an event: a delta or the current state. Unless your own listening code is recording a history of each state, you won't know exactly what changed if it's just the facet object that gets passed along. Though it should probably get passed along regardless. So how are you intending to use this event?

from exhibit3.

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.