New issue
Advanced search Search tips

Issue 754215 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Task



Sign in to add a comment

Communicate from List view to MainWindowComponents by passing a message

Project Member Reported by yamaguchi@chromium.org, Aug 10 2017

Issue description

Chrome Version: ToT

FileTableList (or FileGrid) and MainWindowComponent classes are both registering event listener for the file list.
When doing a double-click (or a tap) to open a file, the mouse/touch events goes to the file list view element and those 2 handlers are invoked in order.
The first handler registered by FileTableList rewrites the selection status of the Selection Model, and then the other handler set by MainWindowComponent will read that Selection to launch the file. 

This mechanism is dependent on the order of execution, which is determined by the order which the two handlers are added at initialization procedure. So it is error-prone.

It'd be better for maintainability to have a single event handler that handles mouse/touch events pass a message (in the form of a custom event, for example) to MainWindowComponent, so that it'll make the flow of the data more explicit.
 

Comment 2 by sashab@chromium.org, Feb 23 2018

Labels: CrOS-FilesApp-CodeHealth

Comment 3 by sashab@chromium.org, Feb 28 2018

Labels: -CrOS-FilesApp-CodeHealth CrOSFilesCategory-CodeHealth

Sign in to add a comment