EventLogging::logEvent() was marked as deprecated at the beginning of
2021 in I0cfd07295d4b51ca4805c79a28a9a4bd64ff7cc9.
Bug: T318263
Change-Id: I2d89784cc249e97954c9be05169f3060fd69945f
Note the code style in this file is already a mixture of some early
declarations and others that happen in place. We mostly prefer the
later nowadays because it makes the code much more readable. Some of
the code touched in this patch was really a little confusing, I would
argue.
Change-Id: Ib2777c6f6c86876c016e50d7bd2fe3d82c611914
A change in OOUI made .addItems() silently ignore non-array input.
The most robust fix is to make all callers follow the documentation
instead of relying on undocumented behavior.
The change to onMapItemRemove is not strictly needed but done to make
this piece of code much more robust.
Change-Id: I95f9a058766720d3809c3e56309326c2a91f2bcd
Main change is that we don't map between strings and object
references any more but use the object references directly.
Change-Id: Iecc011f62089d902bb5cbd9ff3b4189d3258a2b4
The data structure at the top of Model.js uses types like "string",
"array" and so on. Fields that share a type behave identical. I find
it odd to repeat parts of this data structure in the code. That's
what the types are for.
Change-Id: Iae55c18ececb809a56e40d3179d2cde357309d0a
… by turning the nested `if` around and simplifying the remaining
parts a little. This patch is intentionally minimized. More
meaningful changes will be done in the next patch.
Change-Id: I56cfa5c8ac8ca29acd42bd71786f5433e884e1b2
Previously, our eslint configuration required all variables
to be declared together at the top of the scope, but that
was changed, and declaring the variables where they are needed
is clearer.
Change-Id: I87e74ceadd5374a6ba6b7a4f8f49dca03a5c4bca
The data structure in Model.js, starting at line #125, does have a
"type" property that's supposed to do this. What kind of input element
we need depends on the type. Repeating individual element names here
means we are duplicating parts of the data structure.
The mapping is unambiguous, i.e. the new code is guaranteed to do the
same as before.
This is a tiny cleanup patch in preparation for later changes.
Change-Id: I162dcd6f9a31f5ab2c6eb7027befd4736de40ca5
"children" is an array. See line #148 in Model.js. What's called "type"
here is just the numeric index in this array.
Change-Id: I73c190f754d113ac90f5df76fb8cc8b7a75fc927