51 Matching Annotations
  1. Mar 2021
    1. The reason Final Form does this is so that pristine will be true if you start with an uninitialized form field (i.e. value === undefined), type into it (pristine is now false), and then empty the form field. In this case, pristine should return to true, but the value that the HTML DOM gives for that input is ''. If Final Form did not treat '' and undefined as the same, any field that was ever typed in would forever be dirty, no matter what the user did.
  2. Feb 2021
    1. array :translations do hash do string :locale string :name end end array inputs can only have one input nested underneath them. This is because every element of the array must be the same type. And the inputs nested inside arrays cannot have names because they would never be used.
    1. @conference_form.submit(conference_params)

      Surprised they called it submit, since that could imply that you're triggering an action called submit.

      They use other verbs to describe this:

      • sync
      • populate
      • write

      Analogous to Reform's sync / sync_models method.

      Actually, the name makes a lot of sense when you see it in context:

          @conference_form = ConferenceForm.new(conference)
          @conference_form.submit(conference_params)
      
          if @conference_form.save
      
    1. Of course our object doesn't have any contacts yet, so our controller will need to make sure that the form has at least one fields_for block to render by giving it one on initialization
    1. cultural capital

      Introduced by Pierre Bourdieu in the 1970s, the concept has been utilized across a wide spectrum of contemporary sociological research. Cultural capital refers to ‘knowledge’ or ‘skills’ in the broadest sense. Thus, on the production side, cultural capital consists of knowledge about comportment (e.g., what are considered to be the right kinds of professional dress and attitude) and knowledge associated with educational achievement (e.g., rhetorical ability). On the consumption side, cultural capital consists of capacities for discernment or ‘taste’, e.g., the ability to appreciate fine art or fine wine—here, in other words, cultural capital refers to ‘social status acquired through the ability to make cultural distinctions,’ to the ability to recognize and discriminate between the often-subtle categories and signifiers of a highly articulated cultural code. I'm quoting here from (and also heavily paraphrasing) Scott Lash, ‘Pierre Bourdieu: Cultural Economy and Social Change’, in this reader.

  3. Oct 2020
    1. Note that the fields are kept in a flat structure, so a "deep" field like "shipping.address.street" will be at the key "shipping.address.street", with the dots included.
    1. Mine requires that dirty and pristine be "calculated properties".
    2. This is a philosophical issue, I think. People (and presumably form libraries) have different definitions of what "dirty" means. Yours: "The field has ever been edited" Mine: "The value of the field is different from the initial value"
    3. Personally, I rather like the idea of typing into a field, backspacing to undo what you just typed, and having the field (and form) go back to being pristine. Aside from that aesthetic difference, my definition has the practical implication that it lets you know if you need to save the record or not.
    4. We could potentially have another flag that was your definition of dirty, but then we run into the hard problem in computer science: naming things.
    1. Warnings, in this example, are defined as: suggestions to the user, like validation errors, but that do not prevent submission.
    1. In general it is recommended you handle forms in this "controlled" manner. In some cases it might make sense to manage the form state outside of Solid via refs. These "uncontrolled" forms can also work. Just be conscious of the difference as mixing approaches can lead to unexpected results.
  4. Sep 2020
    1. Proving to myself that isValid does correctly change to true even when a key in $errors is an array.

  5. Jul 2020
  6. Jun 2020
  7. May 2020
    1. The main use of schemas is to define forms that can be edited through the admin interface.
  8. Apr 2020
    1. There are few ways to build forms with objects that don't inherit from Active Record, as follows:
  9. Jan 2020
  10. Oct 2019
  11. Aug 2019
  12. May 2019
    1. But like its usual in the case of Observable-based APIs, FRP techniques can help easily implement many use cases that would otherwise be rather hard to implement such as: pre-save the form in the background at each valid state, or even invalid (for example storing the invalid value in a cookie for later use) typical desktop features like undo/redo

      key point on why FRP is good: misc usages on each 'state' change in the form - record and save state for 'undo' feature, save to local storage to be recovered later, etc

    2. This is why this is called template-driven forms, because both validation and binding are all setup in a declarative way at the level of the template.

      key point on naming of 'template-driven forms'

    3. You are probably wondering what we gained here. On the surface there is already a big gain: We can now unit test the form validation logic

      key point - advantage of reactive forms is the testability of its validation

  13. Jan 2019
    1. intervening in so many disparate "content" areas, this historyalso offers a wealth of divergent structural possibilities for rhetoric.

      Here, is the author suggesting that the different forms or structures of rhetoric compete or can be at odds with each another?

  14. Oct 2018
  15. Sep 2018
  16. Sep 2017
    1. protocol available at doi: 10.7910/DVN/V1TKIO20

      kudos for citing (rather than just mentioning) the dataset and especially for including the consent forms (they are in Study_protocol.docx)

    1. Elizabeth’s discontent stems from the way that she grafts individual choice onto social forms. Marriage, for Elizabeth, should not be defined by its being an omnipresent social form; it should be made meaningful by the intentions behind it.

      Moe aptly presents her argument again, as she argues that Elizabeth's frustration with Charlotte, for example, has to do with her own issues managing her frustration with "social forms." Moe allows the reader to "fill in the blank" here, as the reader can use this piece of information to better understand Elizabeth's reaction to Charlotte--her frustration is in Charlotte's refusal to resist the social forms that inherently oppress women and impact the emotional aspect of marriage. By giving her reader room to make this judgement herself, Moe's argument consequently becomes more concrete.

  17. Feb 2017
    1. This awakens the idea that, in addition to the leaves, there exists in nature the "leaf': the original model according to which all the leaves were perhaps woven, sketched, measured, col· ored, curled, and painted-but by incompetent hands, so that no specimen has turned out to be a correct, trustworthy, and faithful likeness of the original model.

      Does this almost harken back to Plato's Theory of Forms, or the idea that a perfect and original realization of a thing exists in a higher form beyond our grasp? Can we only see and know shadows of a thing (in this case, a leaf) and mere copies of our perception of that thing?

  18. Jun 2016
    1. Three different kinds of capital guided the authors through the the analysis, including-human, social and cultural capital.
  19. Feb 2016
  20. Sep 2015
    1. The spatial order, including the built environment, is not only the product of classificatory collective representations based on social forms but also a model for reproducing the social forms themselve

      Are we allowing the technology we use to build around us reform the way society interacts with itself and its surroundings?

  21. Nov 2013
    1. Their senses nowhere lead to truth; on the contrary, they are content to receive stimuli and, as it were, to engage in a groping game on the backs of things.

      Easily entertained and distracted in a battle of egos on the surface of "forms"

    2. They are deeply immersed in illusions and in dream images; their eyes merely glide over the surface of things and see "forms."

      Plato's shadow cave.

    3. They are deeply immersed in illusions and in dream images; their eyes merely glide over the surface of things and see "forms."

      This reminds me of Plato, and illusion of what is real but not the real knowledge.