In test suite, drop source from non-fallback formatted parts#1061
In test suite, drop source from non-fallback formatted parts#1061
Conversation
|
Needed to fix up the JSON schema a bit to make this work. The relative |
…ormat-wg#1061) The source adds no value, and is directly constructable from the `name` and `kind`.
| } | ||
| }, | ||
| { | ||
| "description": "Fallback part.", |
There was a problem hiding this comment.
Can we be more verbose with the descriptions? They're here as documentation, after all...
There was a problem hiding this comment.
This is literally a fallback part, i.e. the result of formatting a value that experienes fallback. I don't really know what else to say about it?
| "id": "foo", | ||
| "value": "world" | ||
| }, | ||
| { "type": "string", "dir": "ltr", "id": "foo", "value": "world" }, |
There was a problem hiding this comment.
any reason to lose the formatting?
There was a problem hiding this comment.
Do you mean that this is on a single line, rather than the multiple lines it had previously? It's because with the change, it's now short enough to easily fit on a single line.
|
I'm not sure of the reasoning behind still including the |
It's needed to hold the representation that's also used in the string output, i.e. |
…ormat-wg#1061) The source adds no value, and is directly constructable from the `name` and `kind`.
While reviewing the messageformat.dev documentation, I started to re-think the
sourcevalue that's currently included in formatted parts.I think we should drop it, as it makes a part of what ought to be considered implementation details into a public API (such as the name of a message variable or function). If a user does have a need to identify a specific part in the output, that ought to be explicit, and it's what we have
u:idfor.For markup in particular it adds no value, as the
sourcevalue is constructable from thenameand thekind.CC @ryzokuken