Gaia/Settings/docs/Root

From MozillaWiki
< Gaia‎ | Settings‎ | docs
Jump to: navigation, search

The root panel is the first panel users are going to see when launching settings app and it displays status of hardware components and other device settings. Retrieving those settings can be time-consuming because it requires to load corresponding modules and wait for the hardware response. In most use cases when users launch settings app they are not staying at the root panel but navigate to other panels directly. That said, making users be able to reach the panel they want as quick as possible is the first priority. In the end we decided to delay load modules that are not critical to the root panel (panels/root/low_priority_items). We load those modules only when users stay at the root panel without doing any interaction for three seconds.

Each item in the root panel corresponds to a specific module. Usually an item module takes the root element of the item as the parameter and the module is totally in charge of updating the element. panels/root/panel is the place where we link the elements to the modules.