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

Issue 10823052: Refactoring the NTP. (Closed)

Created:
8 years, 4 months ago by pedrosimonetti2
Modified:
7 years, 8 months ago
Reviewers:
jeremycho_google
CC:
chromium-reviews, arv (Not doing code reviews)
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Refactoring the NTP. BUG=

Patch Set 1 #

Total comments: 30
Unified diffs Side-by-side diffs Delta from patch set Stats (+4357 lines, --5 lines) Patch
A chrome/browser/resources/ntp_search/mock/images/thumb/http---amazon.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---cnn.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---ebay.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---news.ycombinator.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---nytimes.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---wefunkradio.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---www.deviantart.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/browser/resources/ntp_search/mock/images/thumb/http---www.google.com-chrome-intl-en-welcome.html.png View Binary file 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---www.wikipedia.org-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/mock/images/thumb/http---youtube.com-.png View 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/browser/resources/ntp_search/mock/images/thumb/https---chrome.google.com-webstore-hl-en.png View Binary file 0 comments Download
A chrome/browser/resources/ntp_search/mock/mock.js View 1 chunk +181 lines, -0 lines 4 comments Download
A chrome/browser/resources/ntp_search/mock/mockData.js View 1 chunk +190 lines, -0 lines 2 comments Download
A chrome/browser/resources/ntp_search/mock/mockOld.js View 1 chunk +74 lines, -0 lines 2 comments Download
A + chrome/browser/resources/ntp_search/most_visited_page.css View 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/browser/resources/ntp_search/most_visited_page.js View 1 chunk +154 lines, -0 lines 6 comments Download
A chrome/browser/resources/ntp_search/new_tab.css View 1 chunk +392 lines, -0 lines 0 comments Download
M chrome/browser/resources/ntp_search/new_tab.html View 5 chunks +40 lines, -5 lines 0 comments Download
A chrome/browser/resources/ntp_search/new_tab.js View 1 chunk +606 lines, -0 lines 2 comments Download
A chrome/browser/resources/ntp_search/page_list_view.js View 1 chunk +768 lines, -0 lines 2 comments Download
A chrome/browser/resources/ntp_search/thumbnail_page.css View 1 chunk +92 lines, -0 lines 0 comments Download
A chrome/browser/resources/ntp_search/thumbnail_page.js View 1 chunk +394 lines, -0 lines 10 comments Download
A chrome/browser/resources/ntp_search/tile_page.js View 1 chunk +1476 lines, -0 lines 2 comments Download

Messages

Total messages: 2 (0 generated)
jeremycho_google
Some initial comments - I'll take another look once the files are branched. The high-level ...
8 years, 4 months ago (2012-07-31 03:09:15 UTC) #1
pedrosimonetti2
8 years, 4 months ago (2012-08-03 18:14:01 UTC) #2
Jeremy, I have implemented the changes you suggested. Please take another look.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/mock/mock.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/mock/mock.js:89: mockUrl =
thumbnailUrlList.splice(index, 0);
Fixed.

On 2012/07/31 03:09:16, jeremycho wrote:
> What is this for?  Shouldn't splice(index, 0) always return []?

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/mock/mock.js:162: souldCallChromeSend =
souldCallChromeSend || shouldRegisterData;
On 2012/07/31 03:09:16, jeremycho wrote:
> should

Done.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/mock/mockData.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/mock/mockData.js:49: "url":
"http://www.youtube.com/"
See comment on the other CL.

On 2012/07/31 03:09:16, jeremycho wrote:
> Drop the 'www' for all of these to match mockedThumbnailUrls.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/mock/mockOld.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/mock/mockOld.js:1: ntpMock = {};
No. This was the old version of the
Super-Awesome-Mock-Tool-No-More-Compiling-Madness (TM). It's sad, but I deleted
this file :)

On 2012/07/31 03:09:16, jeremycho wrote:
> Is this file still needed?

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/most_visited_page.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/most_visited_page.js:16: function
MostVisited() {
On 2012/07/31 03:09:16, jeremycho wrote:
> Pass in gridValues?

Done. See comments on the new CL.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/most_visited_page.js:16: function
MostVisited() {
On 2012/07/31 03:09:16, jeremycho wrote:
> This doesn't seem to get called.

Done.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/most_visited_page.js:46: set data(data) {
I replaced the code from ThumbnailPage.prototype.set data() with an error
message because that's a virtual setter.

On 2012/07/31 03:09:16, jeremycho wrote:
> Is it possible to avoid duplicating this from Thumbnail Page?

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/new_tab.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/new_tab.js:596: getThumbnailUrl:
getThumbnailUrl,
On 2012/07/31 03:09:16, jeremycho wrote:
> Alphabetize.

Done.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/page_list_view.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/page_list_view.js:2: // Use of this source
code is governed by a BSD-style license that can be
I think they were identical.

On 2012/07/31 03:09:16, jeremycho wrote:
> I don't see a diff for this file.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/thumbnail_page.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/thumbnail_page.js:17: * Creates a new Most
Visited object for tiling.
On 2012/07/31 03:09:16, jeremycho wrote:
> Rename references to Most Visited in the comments (here and elsewhere)

Done.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/thumbnail_page.js:164: * Allow blacklisting
most visited site using the keyboard.
On 2012/07/31 03:09:16, jeremycho wrote:
> Is MostVisited the only type of tile that will be removable?  If so, move this
> to MostVisited (as well as the other blacklist-specific logic), and delete the
> isRemovable parameter?

Done.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/thumbnail_page.js:245: var THUMBNAIL_COUNT =
8; // TODO(xci)
Yes, I'll address it in another CL. I took another look at it and it won't be
that simple.

On 2012/07/31 03:09:16, jeremycho wrote:
> I still see the bug where 10 thumbnails are being shown, even if only 8 exist.

> Are you planning to address this in a later CL?

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/thumbnail_page.js:273: reinforceStyles:
true,
On 2012/07/31 03:09:16, jeremycho wrote:
> Please document.

Done.

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/thumbnail_page.js:284:
this.classList.add('most-visited-page');
Yes. I renamed it to 'thumbnail-page' and overrided the
MostVisited.prototype.initialize to include the 'most-visited' class too.

On 2012/07/31 03:09:16, jeremycho wrote:
> Should this be renamed, given that other classes might extend Thumbnail
besides
> MostVisited?

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
File chrome/browser/resources/ntp_search/tile_page.js (right):

http://codereview.chromium.org/10823052/diff/1/chrome/browser/resources/ntp_s...
chrome/browser/resources/ntp_search/tile_page.js:607: handleCardSelection_:
function(e) {
Done. In the newly revised code this method is being called as expected.

On 2012/07/31 03:09:16, jeremycho wrote:
> This doesn't seem to get called when switching to Most visited, only when
> switching to Apps.

Powered by Google App Engine
This is Rietveld 408576698