Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "[memories] Removes chrome://memories"
This reverts commit 04d8997. Reason for revert: Closed the tree [1]. [1] https://ci.chromium.org/ui/p/chromium/builders/ci/Win%20x64%20Builder%20(dbg)/132854/overview Original change's description: > [memories] Removes chrome://memories > > With crrev.com/c/3046546, <history-clusters> previously hosted under > chrome://memories is now hosted under chrome://history/journeys. This > change moves the necessary resources from //c/b/r/memories to > //c/b/r/history/history_clusters and deletes the rest along with the > code related to chrome://memories > > Fixed: 1229397 > Change-Id: I1fa6632e974a4a5108da923f1209518d4423798a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3058392 > Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> > Reviewed-by: dpapad <dpapad@chromium.org> > Reviewed-by: Colin Blundell <blundell@chromium.org> > Reviewed-by: Alex Gough <ajgo@chromium.org> > Cr-Commit-Position: refs/heads/master@{#906553} Change-Id: I887c029c51321d0b0114e7372e4d1f11028ec9bf No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3060581 Auto-Submit: Daniel Hosseinian <dhoss@chromium.org> Owners-Override: Daniel Hosseinian <dhoss@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#906823}
- Loading branch information
Daniel Hosseinian
authored and
Chromium LUCI CQ
committed
Jul 29, 2021
1 parent
4f369ec
commit b832389
Showing
43 changed files
with
368 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
chrome/browser/resources/history/history_clusters/BUILD.gn
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'es6': true, | ||
}, | ||
'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, | ||
}; |
File renamed without changes.
1 change: 0 additions & 1 deletion
1
...resources/history/history_clusters/OWNERS → chrome/browser/resources/memories/OWNERS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
mahmadi@chromium.org | ||
file://components/history_clusters/OWNERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<style> | ||
:host { | ||
display: block; | ||
} | ||
|
||
cr-toolbar { | ||
--cr-toolbar-field-width: var(--cluster-width); | ||
} | ||
|
||
history-clusters { | ||
height: calc(100% - var(--cr-toolbar-height)); | ||
overflow-x: hidden; | ||
} | ||
</style> | ||
<clusters-router query="{{query_}}"></clusters-router> | ||
<cr-toolbar id="toolbar" page-name="History Clusters" | ||
clear-label="$i18n{clearLabel}" search-prompt="$i18n{searchPrompt}" | ||
on-search-changed="onSearchChanged_"> | ||
</cr-toolbar> | ||
<history-clusters query="{{query_}}"></history-clusters> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import './clusters.js'; | ||
import './router.js'; | ||
import './shared_vars.js'; | ||
import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; | ||
|
||
import {CrToolbarElement} from 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar.js'; | ||
import {CrToolbarSearchFieldElement} from 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js'; | ||
import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
/** | ||
* @fileoverview This file provides the root custom element for the Clusters | ||
* landing page. | ||
*/ | ||
|
||
const RESULTS_PER_PAGE: number = 5; | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'clusters-app': HistoryClustersAppElement, | ||
} | ||
|
||
interface Window { | ||
// https://github.com/microsoft/TypeScript/issues/40807 | ||
requestIdleCallback(callback: () => void): void; | ||
} | ||
} | ||
|
||
interface HistoryClustersAppElement { | ||
$: { | ||
toolbar: CrToolbarElement, | ||
}; | ||
} | ||
|
||
class HistoryClustersAppElement extends PolymerElement { | ||
static get is() { | ||
return 'clusters-app'; | ||
} | ||
|
||
static get template() { | ||
return html`{__html_template__}`; | ||
} | ||
|
||
static get properties() { | ||
return { | ||
/** | ||
* The current query for which related Clusters are requested and shown. | ||
*/ | ||
query_: { | ||
type: String, | ||
observer: 'onQueryChanged_', | ||
}, | ||
}; | ||
} | ||
|
||
//============================================================================ | ||
// Properties | ||
//============================================================================ | ||
|
||
private query_: string = ''; | ||
|
||
//============================================================================ | ||
// Event handlers | ||
//============================================================================ | ||
|
||
/** | ||
* Called when the value of the search field changes. | ||
*/ | ||
private onSearchChanged_(event: CustomEvent<string>) { | ||
// Update the query based on the value of the search field, if necessary. | ||
if (event.detail !== this.query_) { | ||
this.query_ = event.detail; | ||
} | ||
} | ||
|
||
//============================================================================ | ||
// Helper methods | ||
//============================================================================ | ||
|
||
private getSearchField_(): CrToolbarSearchFieldElement { | ||
return this.$.toolbar.getSearchField(); | ||
} | ||
|
||
private onQueryChanged_() { | ||
// Update the value of the search field based on the query, if necessary. | ||
const searchField = this.getSearchField_(); | ||
if (searchField.getValue() !== this.query_) { | ||
searchField.setValue(this.query_); | ||
} | ||
} | ||
} | ||
|
||
customElements.define(HistoryClustersAppElement.is, HistoryClustersAppElement); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!doctype html> | ||
<html dir="$i18n{textdirection}" lang="$i18n{language}"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="color-scheme" content="light dark"> | ||
<title>$i18n{title}</title> | ||
<link rel="stylesheet" href="chrome://resources/css/md_colors.css"> | ||
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> | ||
<style> | ||
html { | ||
background: var(--md-background-color); | ||
} | ||
|
||
body { | ||
font-size: 16px; /* TODO(crbug.com/1173990): Remove once fixed. */ | ||
margin: 0; | ||
} | ||
|
||
html, | ||
body, | ||
clusters-app { | ||
height: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<script type="module" src="strings.m.js"></script> | ||
<script type="module" src="history_clusters/history_clusters.js"></script> | ||
<clusters-app></clusters-app> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import './app.js'; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<iron-location query="{{queryParamsString_}}" dwell-time="200"></iron-location> | ||
<iron-query-params params-string="{{queryParamsString_}}" | ||
params-object="{{queryParamsObject_}}"></iron-query-params> |
Oops, something went wrong.