Fork me on GitHub
#hoplon
<
2015-11-13
>
thedavidmeister01:11:43

@onetom: just because of simplicity, also I don't really want to duplicate logic on a dozen different a elements if i can help it. It's fine for one link, but not if i have to get the logic working across what could become headers/footers/pagination/etc.

thedavidmeister01:11:19

@onetom: i'd consider sticking cells inside the do! but probably never straight on the element

onetom01:11:17

(defelem a+ [{:keys [href] :as attrs} kids]
  ((a attrs kids) :class (cell= {:active (= href route)}))

thedavidmeister01:11:40

((a :href x :class "some non-dynamic classes") :class (cell= {:active (= x route)})) looks really interesting

thedavidmeister01:11:49

i want to give that a whirl when i have the chance

onetom01:11:07

then u can also extend what gets included into .hl namespaces automatically, so u wouldnt need to manually include this a+ into every other namespace

thedavidmeister01:11:17

@onetom: yeah, we had a chat about a special element

onetom01:11:31

i just tried this recently but cant remember where can i find the example code

thedavidmeister01:11:18

i actually got really deep on this active class stuff when working on the Drupal 8 upgrade a while back

thedavidmeister01:11:41

there's a bunch of reasons I prefer an attribute over a new element type

onetom01:11:09

sure, but it's an already existing built-in feature of hoplon to do the addClass stuff, so i really see no benefit of doing it yourself

thedavidmeister01:11:35

the syntax you showed me is something i didn't know about before

onetom01:11:48

dont think about it as a new "element type" it's just a function which takes away boilerplate...

thedavidmeister01:11:15

but i think there is a benefit to a new attribute that can add itself if needed to the DOM

onetom01:11:18

u can also call it just a too if u don't mind getting a warning about the re-definition of it

thedavidmeister01:11:19

it could be a data attribute

thedavidmeister01:11:23

doesn't have to be a class

onetom01:11:29

so existing code doesnt have to be changed

thedavidmeister01:11:41

yeah but it does

thedavidmeister01:11:45

if i come up with a new reason

thedavidmeister01:11:54

and does that wrap a+?

thedavidmeister01:11:04

or... do i need a+&++ someday?

thedavidmeister01:11:50

what if i'm making pagination and I want "active" "next" "previous" "recommended"

onetom01:11:26

i made elements for that myself since the resulting code reads better using such domain specific terminology...

onetom01:11:08

i wouldnt expect to see pure anchors in my code with lots of boilerplate options, but i would prefer a (next :href "x") instead

thedavidmeister01:11:13

oh well, i think i'm going to make a hybrid of what you and alandipert suggested

thedavidmeister01:11:51

@onetom: i think the preference would be dictated more by the nature of the app/codebase than something you could generically say is "best"

onetom01:11:24

also since you can provide a hash-map as a parameter to a dom element, i can imagine that u can compose you correlated attributes with a function, like: (a (active-on "/path") :data "x" :target "_blank" (img ...))

thedavidmeister01:11:10

that's originally what i had

onetom01:11:14

(defn active-on [path] (hash-map :href path :class (cell= {:active (= path route)})))

thedavidmeister01:11:32

that's preeety close to what i was doing

thedavidmeister01:11:38

and what i'm looking to simplify a bit

onetom01:11:56

just to make it look more pure htmly?

thedavidmeister01:11:04

but really, going from (active-on "/path") to :active-attribute

thedavidmeister01:11:11

is all i'm thinking

thedavidmeister01:11:26

and shifting the active-on to part of do!

thedavidmeister01:11:07

it seems much of a muchness to me

thedavidmeister01:11:33

except the attributes would be a bit more of a formalisation of what i'm trying to do IMO

thedavidmeister01:11:51

I could put some docs together for a list of custom attributes pretty easily

thedavidmeister01:11:03

i think it would be harder to explain to someone else all the functions that need to be used

thedavidmeister01:11:14

i still want to play around with a few different options

onetom01:11:10

but it would be easier to explain to use a custom element but with standard attributes, which encapsulates such interplay between attributes (or even potentially other kids) imho

thedavidmeister01:11:15

hah, have you ever used Drupal's render API?

onetom01:11:52

using do! feels too generic to me. the meaning of an :active attribute might vary from dom element to dom element, yet you would need to define all these different behaviors in the same multimethod definition...

thedavidmeister01:11:07

well basically, Drupal has the ability to setup custom elements

onetom01:11:07

no, i was avoiding such "turn key" systems for many years now. generally pretty much anything php or even python based and i fell out of love with ruby too

thedavidmeister01:11:18

attach JS and the rest

thedavidmeister01:11:33

very similar to a custom element here

onetom01:11:39

just inferior

thedavidmeister01:11:46

pretty similar tbh

thedavidmeister01:11:52

based on what i've seen

thedavidmeister01:11:56

but with different ways of doing things

thedavidmeister01:11:00

actually, some things are better

thedavidmeister01:11:16

like, i can "hook into" the rendering of other elements defined elsewhere

thedavidmeister01:11:33

and some things are worse, like it's more fiddly/verbose

onetom01:11:49

that's the "old stlye" jquery approach where u separate the element construction from its behaviour definition and as a result u have to assign "addresses" to the elements which u can use like C pointers later to bind behaviour to them

onetom01:11:28

in html they are "CSS pointers" simple_smile

thedavidmeister01:11:33

you can attach JS and CSS to elements

thedavidmeister01:11:41

you can totally put behaviour in the element definition

thedavidmeister01:11:26

that bit is beside the point

thedavidmeister01:11:41

what i'm pointing out is that there's been a community effort to provide different element types

thedavidmeister01:11:44

which is awesome

thedavidmeister01:11:00

they all have attributes which are "standard" to the element itself

thedavidmeister01:11:08

but when you try to look for patterns across different elements

thedavidmeister01:11:16

like does #title always mean the same thing?

thedavidmeister01:11:28

the answer is "it depends whether the author of the element implemented it correctly"

thedavidmeister01:11:56

so, my opinion is that you find yourself with a bunch of attributes you do want to be able to formalise across all elements

thedavidmeister01:11:21

and also the ability to have elements that define their own behaviour and compose other elements

thedavidmeister01:11:29

that's a big part of the reason why i like hoplon

thedavidmeister01:11:01

Drupal has some ability to standardise attribute behaviour, but it's much weaker than the element definition framework

thedavidmeister01:11:09

so you generally end up with slight inconsistencies

thedavidmeister01:11:19

that tend to snowball over time

onetom01:11:00

do u have multiple (page "...") definitions in your project?

onetom01:11:33

so u r planning to use hoplon with prerendering to provide "templates" for drupal?

thedavidmeister01:11:45

i'm not using drupal at all

onetom01:11:05

do u know our homepage project? https://github.com/exicon/homepage

thedavidmeister01:11:20

i'm saying the drupal render API is a close enough of an analogy to the specific thing we're talking about

thedavidmeister01:11:27

to help me articulate a point 😛

onetom01:11:35

u might see a lot of actual use-cases in that

thedavidmeister01:11:47

yeah, that looks pretty useful as an example

thedavidmeister12:11:29

; Workaround until/unless  gets done.
(defn- get-href
  [elem]
  (.attr (.$ js/window elem) "href"))

(defn- set-attr!
  [elem k v]
  (.attr (js/jQuery elem) k v))

(defmethod c/do! :data-current-path
  [elem _ _]
  (if (url/current-path? (get-href elem))
    (set-attr! elem "data-current-path" "")))

; All our nav links.
(def links [
  (c/a "WIP" :href "/")
  (c/a "Style Guide" :href "/style-guide.html")
])

(c/defelem support []
  (c/nav (map #(% :data-current-path) links)))

thedavidmeister12:11:54

my css can point straight at a[data-current-path]

thedavidmeister12:11:54

@onetom: @alandipert @bsima thanks all, i learned a cool trick today between the three of you simple_smile

alandipert12:11:16

@thedavidmeister: cool! btw you can put thi sin your own code to use get on Elements:

(extend-type js/Element
  cljs.core/ILookup
  (-lookup
    ([this k] (-lookup this k nil))
    ([this k not-found]
     (if-let (.attr (js/jQuery this) (name k))
       v
       not-found))))

thedavidmeister12:11:43

i got it down to

thedavidmeister12:11:47

(defmethod c/do! :data-current-path
  [elem _ _]
  (if (url/current-path? ($/attr elem "href"))
    (elem :attr {"data-current-path" ""})))

; All the links for our nav menu.
(def links [
  (c/a "WIP" :href "/")
  (c/a "Style Guide" :href "/style-guide.html")
])

(c/defelem primary []
  (c/nav (map #(% :data-current-path) links)))

thedavidmeister12:11:26

@alandipert: is what you posted a way to make this work?

thedavidmeister12:11:28

; If the href of an element is the current path add data-current-path
(defmethod c/do! :data-current-path
  [elem _ _]
  (if (url/current-path? (:href elem))
    (elem :attr {"data-current-path" ""})))

alandipert12:11:33

@thedavidmeister: i don't think so, it's a substitute for get-href

thedavidmeister12:11:39

yeah that’s all i changed i think

thedavidmeister12:11:53

oh sorry, slightly different syntax in the two things i posted

thedavidmeister12:11:24

(.attr (.$ js/window elem) "href”)

thedavidmeister12:11:37

with your latest code?

alandipert13:11:15

hm, not quite: (get elem :href)

alandipert13:11:42

altho (:href elem) may work, not sure

onetom13:11:02

i would guess that works because under the hood the keyword data type implments IFn as get

alandipert13:11:20

also my guess

onetom13:11:04

what i dont quite get is "...it's literally impossible to store zero information in the DOM..." i might have been your experience, but in the past few years i didn't have to store anything in the DOM since i started using angularjs, then hoplon

thedavidmeister13:11:09

(extend-type js/Element
  cljs.core/ILookup
  (-lookup
    ([this k] (-lookup this k nil))
    ([this k not-found]
     (if-let [v (.attr (js/jQuery this) (name k))]
       v
       not-found))))

thedavidmeister13:11:23

@onetom: the href is “information” in my books

thedavidmeister13:11:41

@onetom: so is whether something is a div or a span or anything else, it’s all information

thedavidmeister13:11:48

@onetom: so is every attribute

onetom13:11:50

okay, so the misunderstanding is what "store" means

onetom13:11:39

to me store means the authorative/primary location of information within some address space

thedavidmeister13:11:55

@alandipert: you had a couple of minor syntax issues, but i figured it out simple_smile

onetom13:11:22

the dom element attributes hold copies of such data, but thats we don't really refer to it as "store"

onetom13:11:33

because we dont go there to get that data

onetom13:11:46

we just put copies of other data there

thedavidmeister13:11:11

@onetom: i’m creating links, then later in my execution, i’m checking some value on the links to make a decision about something

onetom13:11:24

then u will misunderstand many other people too probably

thedavidmeister13:11:26

@onetom: the a is the store of the href

micha13:11:43

you can avoid the redefinition warnings by using (:refer-hoplon :exclude [a])

micha13:11:05

then you need to refer to the original a as hoplon.core/a of course

onetom13:11:47

i see what u r doing, sure. it's a very imperative style thinking. with that approach u will find yourself trying to read element attributes.

thedavidmeister13:11:47

you’re assuming what I’m thinking. i just don’t really understand why (my-link :foo) is OK but (:foo my-link) is not

onetom13:11:35

the original http://hoplon.io site had a diagram of a uni-directional data flow

onetom13:11:05

have you seen that?

thedavidmeister13:11:23

i haven’t seen the original http://hoplon.io site

onetom13:11:50

the idea is that having data flowing in a restricted direction can greatly simplify the amount of code u need to write

thedavidmeister13:11:54

and how is this not uni-directional?

thedavidmeister13:11:01

going from attribute A to attribute B

onetom13:11:22

that's why u only want to set dom element attributes, but not get them

thedavidmeister13:11:36

but i’m getting A to make a decision about B

onetom13:11:42

roughly speaking

thedavidmeister13:11:48

not getting B to make a decision about B

onetom13:11:11

and did the value u are getting from A got there?

thedavidmeister13:11:40

I wrote it, in a different part of my program

thedavidmeister13:11:53

i made a link element “somewhere else"

thedavidmeister13:11:56

with attribute A

thedavidmeister13:11:04

now i’d like to generate attribute B

onetom13:11:07

so B should also get it from that other part of your program

thedavidmeister13:11:23

that’s nothing to do with “unidirectional flow"

thedavidmeister13:11:32

in this case, it makes my program less DRY to do so

thedavidmeister13:11:50

and opens an avenue for future inconsistencies and potential bugs

onetom13:11:08

quite the opposite

micha13:11:18

most of the time you want the attribute to be reactive, no?

micha13:11:43

which would make the ILookup implementation inadequate

onetom13:11:50

the reason for getting the value of A "from its original place" is that you have the chance to keep the value there on its own, without being attached to more complex data, like a DOM element, which can be mutated in many ways even by user interaction

thedavidmeister13:11:21

@onetom: but “the original place” is the a that i created

thedavidmeister13:11:46

@onetom: i could make a list for the data that I make an a from

thedavidmeister13:11:53

but that really seemed like overkill for what i’m doing

onetom13:11:26

maybe you should implement that approach too to make a proper assessment

thedavidmeister13:11:34

i started with that approach

onetom13:11:07

u will should find that it's a lot simpler and actually quite straight forward approach

thedavidmeister13:11:15

comparing [(a …) (a …)] then adding a single attribute (the same attribute, based on a condition, to every a

onetom13:11:33

have u used any cells?

thedavidmeister13:11:34

to building a hash map up, then processing that to build a

thedavidmeister13:11:04

@onetom: i’ve been asked that a bunch of times, and every example i’ve seen makes things more complicated because it adds an extra layer of abstraction that isn’t needed here

thedavidmeister13:11:11

cells look great

thedavidmeister13:11:31

but i also think they’re overkill here

onetom13:11:40

and implementing various protocols is not an extra layer of abstraction?

micha13:11:42

how about metadata on the element

micha13:11:59

(with-meta (a ....) {:some-data 100})

micha13:11:22

since the information you're storing on the element is clearly "meta"

thedavidmeister13:11:52

@onetom: i have quite a bit of experience with this particular problem in other frameworks that suggests it’s useful to be able to handle href in a standard way for links, not tied to the definition of how you process the link for rendering/behaviour

thedavidmeister13:11:49

let’s try a different tack

thedavidmeister13:11:55

i have a pretty good idea of what problems

thedavidmeister13:11:01

; If the href of an element is the current path add data-current-path
(defmethod c/do! :data-current-path
  [elem _ _]
  (if (url/current-path? (:href elem))
    (elem :attr {"data-current-path" ""})))

; All the links for our nav menu.
(def links [
  (c/a "WIP" :href "/")
  (c/a "Style Guide" :href "/style-guide.html")
])

(c/defelem primary []
  (c/nav (map #(% :data-current-path) links)))

thedavidmeister13:11:08

solves, compared to trying to make a custom element

thedavidmeister13:11:33

and then needing to deal with all the different things that are just like this and might want to be used to together

thedavidmeister13:11:41

what concrete problems am I causing for myself?

thedavidmeister13:11:57

there’s only unidirectional data flow, because it goes from attribute A to B

thedavidmeister13:11:23

and “because cells” isn’t convincing, because plenty of things work just fine without cells

thedavidmeister13:11:30

despite cells being a useful tool to solve problems

micha13:11:52

wait what happens when the current path changes?

thedavidmeister13:11:05

a different link will have the attribute

micha13:11:21

that will update itself?

thedavidmeister13:11:27

if you’re on “/“ then the first link has it, if you’re on “/style-guide.html” the second link has it

thedavidmeister13:11:35

well it’s a new page

thedavidmeister13:11:39

i’m not using routes

onetom13:11:45

micha: he is not talking about SPA

thedavidmeister13:11:01

i’m going old skool

thedavidmeister13:11:13

HTMLing like it’s 1990

micha13:11:38

it's 1990 somewhere

thedavidmeister13:11:41

so if i was using routes then i’d use that routing cell, looks cool

micha13:11:45

or that's what jimmy buffet would say

thedavidmeister13:11:49

but i’m not, so KISS won out

micha13:11:15

so what do you want the html to end up like for these links?

micha13:11:35

<a href="/foo/bar/" ...>...</a>

onetom13:11:51

also HTML or DOM?

thedavidmeister13:11:51

<a href="/" data-current-path="">WIP</a>

micha13:11:58

with a data-current-path attr when the link is to the same page that you're already on?

onetom13:11:02

as i suspect you would actually like to see different static HTML for every page

thedavidmeister13:11:17

<a href="/style-guide.html">Style Guide</a> or that, if not the current path

micha13:11:38

what does the "current path" denote?

thedavidmeister13:11:02

i just um… a[data-current-path] in my CSS

thedavidmeister13:11:09

too cool for classes

micha13:11:42

so you want at the end of the day to mark links to get handles to them in css land

micha13:11:10

based on a rule on the href value?

thedavidmeister13:11:11

i mean really, a class is fine too

thedavidmeister13:11:58

if i make a footer menu

thedavidmeister13:11:02

or “something"

thedavidmeister13:11:17

use the same thing to get those links behaving in the same way

thedavidmeister13:11:44

i might want to do something else to any of these links based on the href

thedavidmeister13:11:14

like add a click-me mark, for CSS styling

thedavidmeister13:11:38

and it would only be OK if i could have click-me logic running on the same elements as active logic

micha13:11:03

well if you're thinking in terms of organizing for extension it pays to not yolo the foundation

thedavidmeister13:11:04

and i don’t know ahead of time which things will need click-me, which will need active and which will need both or neither

thedavidmeister13:11:29

@micha: i’m just yolo-ing the difference between CSS styling based on a class or attribute

thedavidmeister13:11:50

@micha: i wouldn’t be here having this convo if i was yolo-ing the whole thing 😛

micha13:11:51

like if you want the easiest thing with no overkill you will be at odds with making a thing that will be extended cleanly for years as it grows huge

micha13:11:17

so this href situation looks a lot like a use case for protocols

thedavidmeister13:11:18

based on what I just said though

thedavidmeister13:11:39

i feel like “custom attribute” seems like a better idea than “custom element"

micha13:11:42

your element could implement IHref protocol or something

thedavidmeister13:11:47

as long as i respect the one-way data thing

micha13:11:01

and have a method that uses .attr to get/set the value

micha13:11:32

you can use specify! to dynamically add protocol implementation to instances at runtime

micha13:11:50

so the IHref could be implemented differently for different elements

micha13:11:57

which is what you're going to need at the end of the day

thedavidmeister13:11:22

ok, i haven’t used specify! yet

thedavidmeister13:11:24

i’ll have to look that up

micha13:11:46

i think that implementing the ILookup protocol to fetch the attr would be something we'd want to work for everyone

thedavidmeister13:11:52

but it sounds like I’m still getting and setting attributes

micha13:11:55

which would mean it would need to return a cell

thedavidmeister13:11:26

so I’m right back to the start

thedavidmeister13:11:49

I don’t see the harm in (:foo elem) when we have (elem :foo)

micha13:11:03

we don't have (elem :foo) simple_smile

thedavidmeister13:11:13

although, yes, i see the harm if it’s the same :foo and the same elem

micha13:11:13

we have (elem :foo value)

thedavidmeister13:11:35

@micha: you are right, because i tried that earlier and it totally did not work, lol

thedavidmeister13:11:52

(elem :foo value) is what we have

micha13:11:28

i tihnk one problem with assuming symmetry between (:foo el) and (el :foo) is that there may be no sensible inverse sometimes

micha13:11:42

i think a lot of times, even

thedavidmeister13:11:57

oh, what’s an example of that?

micha13:11:34

well :foo might mean different things to different elements

micha13:11:43

for some elements it might be for side effects only

micha13:11:48

things like that

micha13:11:57

this is where the protocols come in

micha13:11:08

because you find the name that corresponds to the intent

micha13:11:13

not just a name

micha13:11:28

you can achieve the same with custom attrs thoguh, by namespacing them

micha13:11:42

like (el :foo.bar/baz ...)

thedavidmeister13:11:24

let’s see if i have this straight

thedavidmeister13:11:38

if i go ahead and extend do! then i get a custom attribute

thedavidmeister13:11:58

BUT despite that attribute being intended for a you could stick it on whatever

thedavidmeister13:11:14

and end up with something that is harmless in this case, but more generally, not so harmless

thedavidmeister13:11:28

BUT if i try to make a custom element

micha13:11:36

also the current hoplon implementation is incomplete

micha13:11:52

i mean defelem now is really just defn with some syntactic sugar

thedavidmeister13:11:57

i run into issues trying to juggle all these different attribute handling things that could get pretty complex later

micha13:11:06

which means that when you do (a :href ...)

micha13:11:18

the :href is passed as an argument

micha13:11:24

to the constructor fn

micha13:11:30

so consider the case:

thedavidmeister13:11:45

AND because custom elements exist, we can’t do (:foo elem) because :foo is not always an attribute, it could just be a parameter the element does literally whatever with

micha13:11:15

(defelem foo [{:keys [yolo]} kids] (a :href yolo kids))

thedavidmeister13:11:35

BUT because we know that a provided by core always uses :href as an attribute, we can extend the way a works using this specify! thing, to respond to the :href

micha13:11:36

((foo) :yolo "heythere")

micha13:11:08

so we're going to fix this in the next release

micha13:11:29

yes, pretty much what you said

micha13:11:56

you can make a namespace like app.attr perhaps

micha13:11:05

and have a IHref protocol in there

micha13:11:27

with method (href [this] ...) and (href [this new-value] ...)

micha13:11:48

now you can use specify! to implement it on instances

micha13:11:00

or extend-type to implement it on prototypes

micha13:11:21

and you can do (app.attr/href (a :href "" ...))

thedavidmeister13:11:38

this is the issue with coming from another framework

thedavidmeister13:11:44

i feel like this is the very first thing i asked

thedavidmeister13:11:50

but i obviously had the wrong terminology

micha13:11:55

i'm not saying that's the only way, just a way

thedavidmeister13:11:07

no, it’s what i wanted to do from the start, haha

thedavidmeister13:11:46

i know how to do all these things in Drupal, but they all have different names, that just makes me say the wrong thing to you guys >.<

micha13:11:48

we need to do more experimentation with different ways to organize things

thedavidmeister13:11:52

this is what i meant by “hook into"

micha13:11:07

because hoplon is very different from the other things i've used

micha13:11:17

you can end up with very different implementations

micha13:11:29

we don't know the best way yet

thedavidmeister13:11:37

yeah, i don’t know about the wider hoplon stuff, but what we just talked about now is pretty familiar to me

thedavidmeister13:11:59

but different names and syntax and everything 😞

micha13:11:07

yeah it's standard OOP approach, minus implementation inheritance

micha13:11:09

the ILookup approach might still work though

micha13:11:26

if we can work out a sensible way to get the inverse function

thedavidmeister13:11:39

is there any plan to make elements work more like collections

micha13:11:43

it is definitely simpler than the OOP approach

micha13:11:05

yeah we had all of that in the very beginning

thedavidmeister13:11:19

and make the bits you send through for side effects knowable somehow?

micha13:11:50

well the problem is when you build a reactive application

micha13:11:57

which is what i do

micha14:11:13

it just doesn't really help then

micha14:11:23

like clojure already has excellent collections

micha14:11:43

it's always been better to separate the data from the presentation

thedavidmeister14:11:56

that’s not really why i was thinking it would be useful

thedavidmeister14:11:22

i was thinking it would be useful to use clojure functions that work on collections to help with the presentation

micha14:11:01

interesting

micha14:11:13

how would that look?

thedavidmeister14:11:29

well… that’s pretty much what i’m trying to do, lol

thedavidmeister14:11:34

if you forget that i’m using a data attribute

thedavidmeister14:11:39

that one line of CSS targets

thedavidmeister14:11:52

and replace everything i said earlier with “and add CSS based on the href"

thedavidmeister14:11:00

or something else

micha14:11:31

well you can definitely do that, you mean like inline css?

thedavidmeister14:11:32

then say you want to map over some links, or reduce the attributes of an element to a CSS rule

thedavidmeister14:11:41

but I basically am

micha14:11:47

right yes

thedavidmeister14:11:04

the difference between a dedicated CSS rule in a file using an attribute, and an inline CSS rule

thedavidmeister14:11:08

totes splitting hairs

micha14:11:12

ok i must ride

micha14:11:16

i'll be back in a bit

thedavidmeister14:11:26

it’s getting late here

alandipert14:11:56

@thedavidmeister: thanks for really digging into this and taking notes along the way

alandipert14:11:14

:thumbsup: 🌈

thedavidmeister14:11:24

hah, np, i’m getting heaps of value from this chat

thedavidmeister14:11:27

least i can do is take notes

onetom15:11:28

@thedavidmeister: very interesting conversation indeed

onetom15:11:43

u summarized very well what i was trying to tell u. regarding syntax sugar encouraging bad practices, i would point to the example of "web steps" bundled by default with "cucumber". people got the idea from that that they should write acceptance test using those web steps, like:

Given I visit the login page
And I fill out the user field with x
And I fill out the password field with s3crEt
When I click login
Then I should be on the dashboard page
And I should see "my name" on the menu bar

onetom15:11:59

a few years later the authors said it was a big mistake to provide such helper step definitions because it polluted the whole spec by example movement and a huge masses of people misunderstood it and they indeed just wasted a lot of their time trying to maintain such brittle tests until they abandoned them and just badmouthed the whole idea.

onetom15:11:23

in hoplon 5 for example you had to say :on-click and :do-class. it took several hours over the course of ~2months for us to change our code base when we were transitioning to holpon 6 and it took further weeks before everyone forgot the hoplon5 "notation". there was quite a few confusing weeks where some of our stuff was on boot1+hoplpon5 and others were already converted to boot2+hoplon6

micha18:11:40

normally we'd leave those things in for compatibility, but one of the goals of hoplon 6 was to improve performance

micha18:11:02

and one way to achieve that was to remove some of those code paths