{
444 | append(
445 | it.toString()
446 | .substringAfter(' ')
447 | .substringBeforeLast('}')
448 | )
449 | }))
450 | ```
451 |
452 | ### How are compositions rendered?
453 |
454 | _Disclaimer: Compose is changing frequently, so many of these details may change without warning,
455 | and none of this is required to use Radiography!_
456 |
457 | The API for configuring how composables are rendered is slightly different than for regular views,
458 | since composables simply _are not_ `View`s. What might define a UI "component" or "widget" logically
459 | isn't made up of any single, nicely-encapsulated object. It is likely a few layers of convenience
460 | `@Composable` functions, with some `Modifier`s applied at various levels, and state is stored in
461 | the slot table via `remember{}`, not in instance fields.
462 |
463 | Radiography uses the Compose Tooling library to parse a composition's slot table into a tree of
464 | objects which represent "groups" – each group can represent some data stored in the slot table,
465 | a function call, or an emitted layout node or Android view. Groups may include source locations in
466 | certain cases, and contain information about modifiers and function parameters. This is a really
467 | powerful API, but there's a _lot_ of data there, and much of it is not helpful for a description
468 | that should be easy to read to get a general sense of the state of your UI.
469 |
470 | Radiography filters this detailed tree of groups down to only contain the actual `LayoutNode`s and
471 | Android `View`s emitted by the composition. It identifies each such node by the name of the function
472 | call that is highest in the subtree below the parent emitted node. The node's modifiers are used to
473 | extract interesting data about the composable. Most of the interesting data is stored in a single
474 | modifier, the `SemanticsModifier`. This is the modifier used to store "semantics" information which
475 | includes accessibility descriptions, actions, and flags, and is also used for writing UI tests.
476 |
477 | ## License
478 |
479 |
480 | Copyright 2020 Square Inc.
481 |
482 | Licensed under the Apache License, Version 2.0 (the "License");
483 | you may not use this file except in compliance with the License.
484 | You may obtain a copy of the License at
485 |
486 | http://www.apache.org/licenses/LICENSE-2.0
487 |
488 | Unless required by applicable law or agreed to in writing, software
489 | distributed under the License is distributed on an "AS IS" BASIS,
490 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
491 | See the License for the specific language governing permissions and
492 | limitations under the License.
493 |
494 |
--------------------------------------------------------------------------------