Note that this model is only used for front-end Polymer UI, and is entirely separate to the backend BookmarkModel in C++. The following is a brief overview of how the data-flow model works. UI components are able to directly read whatever state they need, removing the need for a chain of tedious, highly-coupled Polymer bindings to manage state.We have a well-defined interface for making changes to the state of the page.We have a single source of truth for the state of the page.Designing our data flow in this way has a few primary benefits: This model is inspired by Redux, with a simple layer which binds it to Polymer UI components. The BMM uses a one-way data flow model that is somewhat different to other Polymer WebUI pages. IncognitoModeAvailability: Disables/force-enables opening bookmarks in Incognito.ManagedBookmarks: Defines a folder of immutable bookmarks.EditBookmarksEnabled: Prevents all editing operations.Policy support: Several policies are respected: This works within the BMM, as well as between native UI and the BMM, and between two different BMM instances from different Chrome profiles. Most commands have corresponding keyboard shortcuts.ĭrag and drop: It is possible to drag bookmarks to move them between folders. Item selection: It is possible to select items using either the mouse or keyboard, using ctrl/shift in much the same way as with a powerful file browser like Windows Explorer.Ĭontextual commands: All viewing/editing commands adapt to the current selection. Real-time updates: The display updates in real-time in response to any change to the bookmark model, whether from the page itself or from any other part of the browser UI. The following are some of the main features of the BMM which impact the design of the code: This document serves as an overview of the page, both in terms of the page features, as well as the code design built up to support it. The bookmark manager (BMM) is a WebUI surface with a large amount of functionality for managing bookmarks across a relatively simple UI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |