-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[M116][PriceInsights] Add history section in side panel
Add history section in the side panel, including the section title, subtitle, description and a graph. Demo with fake backend response: https://drive.google.com/file/d/1TWm8MQFDr-epcJFc0XZh0rkRO7v66_xI/view?usp=drive_link (cherry picked from commit abe51b4) Bug: 1458560, b:283465961 Change-Id: Ibe6107d2463e8df7a1f915774490af7ef4f685fc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4658139 Commit-Queue: Zhiyuan Cai <zhiyuancai@chromium.org> Reviewed-by: Matthew Jones <mdjones@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Emily Stark <estark@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1164996} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4667767 Commit-Queue: Krishna Govind <govind@chromium.org> Auto-Submit: Zhiyuan Cai <zhiyuancai@chromium.org> Reviewed-by: Krishna Govind <govind@chromium.org> Owners-Override: Krishna Govind <govind@chromium.org> Cr-Commit-Position: refs/branch-heads/5845@{#328} Cr-Branched-From: 5a5dff6-refs/heads/main@{#1160321}
- Loading branch information
Zhiyuan Cai
authored and
Chromium LUCI CQ
committed
Jul 5, 2023
1 parent
31faf6e
commit a7a8128
Showing
13 changed files
with
704 additions
and
57 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
82 changes: 82 additions & 0 deletions
82
chrome/browser/resources/side_panel/commerce/history_graph.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,82 @@ | ||
<style> | ||
.tick { | ||
fill: var(--cr-secondary-text-color); | ||
font-size: 11px; | ||
line-height: 20px; | ||
} | ||
|
||
.axis | ||
.circle | ||
.path { | ||
stroke-width: 2px; | ||
} | ||
|
||
.divider | ||
.dash-line { | ||
stroke-width: 1px; | ||
} | ||
|
||
.axis, | ||
.divider { | ||
stroke: rgba(0, 0, 0, .14); | ||
stroke-linecap: round; | ||
} | ||
|
||
.path { | ||
fill: none; | ||
stroke-linejoin: round; | ||
stroke-linecap: round; | ||
} | ||
|
||
.dash-line { | ||
stroke-dasharray: 3,3; | ||
stroke-linecap: square; | ||
} | ||
|
||
.circle { | ||
fill: white; | ||
} | ||
|
||
.bubble { | ||
border-radius: 3px; | ||
fill: var(--google-grey-100); | ||
stroke: none; | ||
} | ||
|
||
.tooltip-text { | ||
fill: var(--cr-primary-text-color); | ||
font-size: 11px; | ||
line-height: 20px; | ||
text-anchor: middle; | ||
} | ||
|
||
.path, | ||
.dash-line, | ||
.circle { | ||
stroke: var(--google-blue-700); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
.axis, | ||
.divider { | ||
stroke: rgba(255, 255, 255, .14); | ||
} | ||
|
||
.path, | ||
.dash-line, | ||
.circle { | ||
stroke: var(--google-blue-300); | ||
} | ||
|
||
.circle { | ||
fill: var(--google-grey-900); | ||
} | ||
|
||
.bubble { | ||
/* TODO(b:289240209): Avoid using the custom color. */ | ||
fill: #5C5E62; | ||
} | ||
} | ||
</style> | ||
|
||
<div id="historyGraph"></div> |
Oops, something went wrong.