Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: chrome/browser/resources/md_extensions/item_list.js

Issue 1913353002: [MD Extensions] Add a details subpage, move to one list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: latest master Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_extensions/item_list.js
diff --git a/chrome/browser/resources/md_extensions/item_list.js b/chrome/browser/resources/md_extensions/item_list.js
index 2e6d9c3257d132c6d0ced6005adc3f1d862da7d7..2afbe1d5bc42cd9b516690123eb1add6dbab1608 100644
--- a/chrome/browser/resources/md_extensions/item_list.js
+++ b/chrome/browser/resources/md_extensions/item_list.js
@@ -6,7 +6,25 @@ cr.define('extensions', function() {
var ItemList = Polymer({
is: 'extensions-item-list',
+ behaviors: [
+ Polymer.NeonAnimatableBehavior,
+ Polymer.IronResizableBehavior
+ ],
+
properties: {
+ animationConfig: {
+ type: Object,
+ value: function() {
+ return {
+ exit: [{
+ name: 'hero-animation',
+ id: 'hero',
+ fromPage: this,
+ }],
+ };
+ },
+ },
+
/** @type {Array<!chrome.developerPrivate.ExtensionInfo>} */
items: Array,
@@ -25,6 +43,7 @@ cr.define('extensions', function() {
listeners: {
'list.extension-item-size-changed': 'itemSizeChanged_',
+ 'list.extension-item-show-details': 'showItemDetails_',
},
/**
@@ -38,6 +57,15 @@ cr.define('extensions', function() {
},
/**
+ * Called right before an item enters the detailed view.
+ * @param {CustomEvent} e
+ * @private
+ */
+ showItemDetails_: function(e) {
+ this.sharedElements = {hero: e.detail.element};
+ },
+
+ /**
* Computes the list of items to be shown.
* @param {Object} changeRecord The changeRecord for |items|.
* @param {string} filter The updated filter string.
« no previous file with comments | « chrome/browser/resources/md_extensions/item_list.html ('k') | chrome/browser/resources/md_extensions/manager.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698