Replies: 2 comments
-
Definitely see the value :) I worry about the maintenance cost though if it's only going to be used for tests. |
Beta Was this translation helpful? Give feedback.
-
To go one further, I wonder if we should simply integrate an HTML/CSS parser and accept an HTML string. I was looking into this for the generated tests, because it's super annoying to have so many files in PR diffs and I figured we could define a stable intermediate format (perhaps JSON) that contains:
We could then have a single test runner function that takes one of these objects, parses the HTML and runs the test. My investigations suggested that it would be pretty easy to implement this using the following two crates:}
|
Beta Was this translation helpful? Give feedback.
-
What do you all think about having a more declarative way to build a taffy tree? So instead of building the children and then passing them to the parent, have something more like markup. This could be actual markup, using some kind of macro, or one way to achieve this in Rust could be like so:
Could also do something fancy with tuples if passing around a context is not preferred. The advantage to a more declarative approach like this is that it's easier to understand the structure of the tree from the code.
Beta Was this translation helpful? Give feedback.
All reactions