Skip to content

Commit

Permalink
Remove details panel.
Browse files Browse the repository at this point in the history
Details panel was being developed under a flag, but has been replaced
with Quick View and is no longer needed.

BUG=672767
TEST=Manually tested that FileManager successfully launches using
Linux. git cl try.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2565333002
Cr-Commit-Position: refs/heads/master@{#437836}
  • Loading branch information
oka authored and Commit bot committed Dec 12, 2016
1 parent 44e9890 commit 86cc630
Show file tree
Hide file tree
Showing 20 changed files with 1 addition and 1,064 deletions.
3 changes: 0 additions & 3 deletions chrome/app/chromeos_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,9 +1157,6 @@ Press any key to continue exploring.
<message name="IDS_FILE_BROWSER_SORT_BUTTON_TOOLTIP" desc="Tooltip for the button which provides sort options in Files.app.">
Sort options
</message>
<message name="IDS_FILE_BROWSER_DETAIL_BUTTON_TOOLTIP" desc="Tooltip for the detals button to show the details panel which provides information of selected files in Files.app.">
View details
</message>
<message name="IDS_FILE_BROWSER_GEAR_BUTTON_TOOLTIP" desc="Tooltip for the gear button in Files.app.">
Settings
</message>
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1932,9 +1932,6 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-native-cups", IDS_FLAGS_ENABLE_NATIVE_CUPS_NAME,
IDS_FLAGS_ENABLE_NATIVE_CUPS_DESCRIPTION, kOsCrOS,
SINGLE_VALUE_TYPE(switches::kEnableNativeCups)},
{"enable-files-details-panel", IDS_FLAGS_ENABLE_FILES_DETAILS_PANEL_NAME,
IDS_FLAGS_ENABLE_FILES_DETAILS_PANEL_DESCRIPTION, kOsCrOS,
SINGLE_VALUE_TYPE(chromeos::switches::kEnableFilesDetailsPanel)},
#endif // OS_CHROMEOS
#if !defined(OS_ANDROID) && !defined(OS_IOS) && defined(GOOGLE_CHROME_BUILD)
{"enable-google-branded-context-menu",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ ExtensionFunction::ResponseAction FileManagerPrivateGetStringsFunction::Run() {
SET_STRING("FORMAT_DEVICE_BUTTON_LABEL",
IDS_FILE_BROWSER_FORMAT_DEVICE_BUTTON_LABEL);
SET_STRING("SORT_BUTTON_TOOLTIP", IDS_FILE_BROWSER_SORT_BUTTON_TOOLTIP);
SET_STRING("DETAIL_BUTTON_TOOLTIP", IDS_FILE_BROWSER_DETAIL_BUTTON_TOOLTIP);
SET_STRING("GEAR_BUTTON_TOOLTIP", IDS_FILE_BROWSER_GEAR_BUTTON_TOOLTIP);
SET_STRING("GET_INFO_BUTTON_LABEL", IDS_FILE_BROWSER_GET_INFO_BUTTON_LABEL);
SET_STRING("HOSTED_OFFLINE_MESSAGE", IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE);
Expand Down
21 changes: 0 additions & 21 deletions chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,6 @@ IN_PROC_BROWSER_TEST_P(FileManagerBrowserTestWithLegacyEventDispatch, Test) {
StartTest();
}

// Test fixture class for details panel.
// TODO(ryoh): remove after we release details panel feature.
class FileManagerDetailsPanelBrowserTest : public FileManagerBrowserTest {
void SetUpCommandLine(base::CommandLine* command_line) override {
FileManagerBrowserTest::SetUpCommandLine(command_line);
command_line->AppendSwitch("--enable-files-details-panel");
}
};

IN_PROC_BROWSER_TEST_P(FileManagerDetailsPanelBrowserTest, Test) {
StartTest();
}

// Unlike TEST/TEST_F, which are macros that expand to further macros,
// INSTANTIATE_TEST_CASE_P is a macro that expands directly to code that
// stringizes the arguments. As a result, macros passed as parameters (such as
Expand Down Expand Up @@ -203,14 +190,6 @@ WRAPPED_INSTANTIATE_TEST_CASE_P(
FileManagerBrowserTest,
::testing::Values(TestParameter(NOT_IN_GUEST_MODE, "openQuickView")));

WRAPPED_INSTANTIATE_TEST_CASE_P(
DetailsPanel,
FileManagerDetailsPanelBrowserTest,
::testing::Values(
TestParameter(NOT_IN_GUEST_MODE, "openDetailsPanel"),
TestParameter(NOT_IN_GUEST_MODE, "openDetailsPanelForSingleFile"),
TestParameter(NOT_IN_GUEST_MODE, "openSingleFileAndSeeDetailsPanel")));

#if defined(DISABLE_SLOW_FILESAPP_TESTS)
#define MAYBE_DirectoryTreeContextMenu DISABLED_DirectoryTreeContextMenu
#else
Expand Down
3 changes: 0 additions & 3 deletions chromeos/chromeos_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ const char kEnableExperimentalAccessibilityFeatures[] =
// Enables sharing assets for installed default apps.
const char kEnableExtensionAssetsSharing[] = "enable-extension-assets-sharing";

// Enables details panel in Files app.
const char kEnableFilesDetailsPanel[] = "enable-files-details-panel";

// Enables quick view in Files app.
const char kEnableFilesQuickView[] = "enable-files-quick-view";

Expand Down
1 change: 0 additions & 1 deletion chromeos/chromeos_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ CHROMEOS_EXPORT extern const char kEnableConsumerKiosk[];
CHROMEOS_EXPORT extern const char kEnableDataSaverPrompt[];
CHROMEOS_EXPORT extern const char kEnableExperimentalAccessibilityFeatures[];
CHROMEOS_EXPORT extern const char kEnableExtensionAssetsSharing[];
CHROMEOS_EXPORT extern const char kEnableFilesDetailsPanel[];
CHROMEOS_EXPORT extern const char kEnableFilesQuickView[];
CHROMEOS_EXPORT extern const char kEnableFirstRunUITransitions[];
CHROMEOS_EXPORT extern const char kEnableKioskMode[];
Expand Down
141 changes: 0 additions & 141 deletions ui/file_manager/file_manager/foreground/css/file_manager.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,129 +80,6 @@ a:focus {
flex-direction: column;
}

/* Details pane */
.details-container {
background-color: rgb(250, 250, 250);
display: flex;
flex: none;
max-width: 30%;
min-width: 100px;
overflow: hidden;
position: relative;
width: 240px;
}

#list-details-splitter:not([activated]) {
display: none;
}

.details-container:not([activated]) {
display: none;
}

.details-container > div:not([activated]) {
display: none !important;
}

/* Filetype icons in details panel */

.details-container .thumbnail-container {
box-sizing: border-box;
padding: 6px;
position: relative;
width: 100%;
}

.details-container .thumbnail-container:before {
content: "";
display: block;
padding-top: 100%;
}

.details-container .thumbnail-container > .thumbnail {
background-color: rgb(230, 230, 230);
background-position: center;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}

/* File thumbnails/quick previews in details panel */

.details-container .thumbnail > img {
height: 100%;
object-fit: contain;
width: 100%;
}

.details-container .thumbnail > video {
height: 100%;
object-fit: contain;
width: 100%;
}

.details-container .thumbnail > audio {
bottom: 0px;
left: 0px;
height: auto;
position: absolute;
width: 100%;
}

/* Details panel for single file */

.details-container > #single-file-details {
display: flex;
flex: auto;
flex-direction: column;
width: 100%;
}

#single-file-details > .filename-container {
align-items: center;
display: flex;
flex-direction: row;
height: 40px;
padding: 0 6px;
width: 100%;
}

#single-file-details > .filename-container > .filename {
-webkit-padding-end: 6px;
flex: auto;
font-weight: 500;
overflow: hidden;
}

#single-file-details > .thumbnail-container > .thumbnail.loaded {
background-image: none;
}

#single-file-details > .details-list {
flex: auto;
width: 100%;
}

#single-file-details > .details-list > li:not(.available) {
display: none;
}

/* Filetype icon of details panel for multiple files */

.details-container > #multi-file-details {
display: flex;
flex: auto;
flex-direction: column;
width: 100%;
}

#multi-file-details > .details-list {
flex: auto;
width: 100%;
}

/* Directory tree at the left. */
.dialog-navigation-list {
-webkit-border-end: 1px solid rgba(0, 0, 0, 0.15);
Expand Down Expand Up @@ -537,24 +414,6 @@ body.check-select #sort-button {
display: none;
}

#details-button {
/**
* TODO(ryoh): This should be removed after we finally implement details
* panel.
*/
display: none;
}

#details-button > .icon {
background-image: -webkit-image-set(
url(../images/files/ui/info_white.png) 1x,
url(../images/files/ui/2x/info_white.png) 2x);
}

body.check-select #details-button {
display: none;
}

#gear-button > .icon {
background-image: -webkit-image-set(
url(../images/files/ui/menu_white.png) 1x,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ AppStateController.prototype.initialize = function(ui, directoryModel) {
// Restore preferences.
this.ui_.setCurrentListType(
this.viewOptions_.listType || ListContainer.ListType.DETAIL);
this.ui_.setDetailsVisibility(!!this.viewOptions_.detailsVisibility);
this.directoryModel_.getFileList().sort(
this.viewOptions_.sortField || 'modificationTime',
this.viewOptions_.sortDirection || 'desc');
Expand All @@ -99,11 +98,6 @@ AppStateController.prototype.saveViewOptions = function() {
sortDirection: sortStatus.direction,
columnConfig: {},
listType: this.ui_.listContainer.currentListType,
/**
* TODO(ryoh): Simplify this line after we finally implement details panel.
*/
detailsVisibility: this.ui_.detailsContainer &&
this.ui_.detailsContainer.visible || false
};
var cm = this.ui_.listContainer.table.columnModel;
prefs.columnConfig = cm.exportColumnConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
'./ui/actions_submenu.js',
'./ui/banners.js',
'./ui/default_task_dialog.js',
'./ui/details_container.js',
'./ui/dialog_footer.js',
'./ui/directory_tree.js',
'./ui/drag_selector.js',
Expand All @@ -150,13 +149,11 @@
'./ui/gear_menu.js',
'./ui/list_container.js',
'./ui/location_line.js',
'./ui/multi_file_details.js',
'./ui/multi_profile_share_dialog.js',
'./ui/progress_center_panel.js',
'./ui/providers_menu.js',
'./ui/search_box.js',
'./ui/share_dialog.js',
'./ui/single_file_details.js',
'./ui/suggest_apps_dialog.js',
'./main_window_component.js',
'./volume_manager_wrapper.js',
Expand Down
13 changes: 0 additions & 13 deletions ui/file_manager/file_manager/foreground/js/file_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -890,23 +890,11 @@ FileManager.prototype = /** @struct */ {
this.volumeManager_,
this.historyLoader_);

var singlePanel = queryRequiredElement('#single-file-details', dom);
SingleFileDetailsPanel.decorate(
assertInstanceof(singlePanel, HTMLDivElement),
this.metadataModel_);

var multiPanel = queryRequiredElement('#multi-file-details', dom);
MultiFileDetailsPanel.decorate(
assertInstanceof(multiPanel, HTMLDivElement),
this.metadataModel_);

this.addHistoryObserver_();

this.ui_.initAdditionalUI(
assertInstanceof(table, FileTable),
assertInstanceof(grid, FileGrid),
assertInstanceof(singlePanel, SingleFileDetailsPanel),
assertInstanceof(multiPanel, MultiFileDetailsPanel),
new LocationLine(
queryRequiredElement('#location-breadcrumbs', dom),
this.volumeManager_));
Expand Down Expand Up @@ -1043,7 +1031,6 @@ FileManager.prototype = /** @struct */ {
// Create metadata update controller.
this.metadataUpdateController_ = new MetadataUpdateController(
this.ui_.listContainer,
assert(this.ui_.detailsContainer),
this.directoryModel_,
this.metadataModel_,
this.fileMetadataFormatter_);
Expand Down
3 changes: 0 additions & 3 deletions ui/file_manager/file_manager/foreground/js/main_scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
//<include src="ui/actions_submenu.js">
//<include src="ui/banners.js" >
//<include src="ui/default_task_dialog.js">
//<include src="ui/details_container.js">
//<include src="ui/dialog_footer.js">
//<include src="ui/directory_tree.js">
//<include src="ui/drag_selector.js">
Expand All @@ -164,13 +163,11 @@
//<include src="ui/gear_menu.js">
//<include src="ui/list_container.js">
//<include src="ui/location_line.js">
//<include src="ui/multi_file_details.js">
//<include src="ui/multi_profile_share_dialog.js">
//<include src="ui/progress_center_panel.js">
//<include src="ui/providers_menu.js">
//<include src="ui/search_box.js">
//<include src="ui/share_dialog.js">
//<include src="ui/single_file_details.js">
//<include src="ui/suggest_apps_dialog.js">
//<include src="main_window_component.js">
//<include src="volume_manager_wrapper.js">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ function MainWindowComponent(
'pathclick', this.onBreadcrumbClick_.bind(this));
ui.toggleViewButton.addEventListener(
'click', this.onToggleViewButtonClick_.bind(this));
ui.detailsButton.addEventListener(
'click', this.onDetailsButtonClick_.bind(this));
directoryModel.addEventListener(
'directory-changed', this.onDirectoryChanged_.bind(this));
volumeManager.addEventListener(
Expand All @@ -134,8 +132,6 @@ function MainWindowComponent(
this.onDriveConnectionChanged_();
document.addEventListener('keydown', this.onKeyDown_.bind(this));
document.addEventListener('keyup', this.onKeyUp_.bind(this));
selectionHandler.addEventListener('change',
this.onFileSelectionChanged_.bind(this));
}

/**
Expand All @@ -162,17 +158,6 @@ MainWindowComponent.prototype.onFileListFocus_ = function() {
}
};

/**
* Handles file selection event.
*
* @private
*/
MainWindowComponent.prototype.onFileSelectionChanged_ = function(event) {
if (this.ui_.detailsContainer) {
this.ui_.detailsContainer.onFileSelectionChanged(event);
}
};

/**
* Handles mouse click or tap.
*
Expand Down Expand Up @@ -250,18 +235,6 @@ MainWindowComponent.prototype.onToggleViewButtonClick_ = function(event) {
this.ui_.listContainer.focus();
};

/**
* Handles click event on the toggle-view button.
* @param {Event} event Click event.
* @private
*/
MainWindowComponent.prototype.onDetailsButtonClick_ = function(event) {
var visible = this.ui_.detailsContainer.visible;
this.ui_.setDetailsVisibility(!visible);
this.appStateController_.saveViewOptions();
this.ui_.listContainer.focus();
};

/**
* KeyDown event handler for the document.
* @param {Event} event Key event.
Expand Down
Loading

0 comments on commit 86cc630

Please sign in to comment.