-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stats are not updated on private window when default tab stats update #704
Comments
worth mentioning that I was able to fix this with the patch below but others couldn't not reproduce the fix which is why this issue was created. diff --git a/components/brave_new_tab_ui/components/app.tsx b/components/brave_new_tab_ui/components/app.tsx
index 6d1e02f..cdfb394 100644
--- a/components/brave_new_tab_ui/components/app.tsx
+++ b/components/brave_new_tab_ui/components/app.tsx
@@ -118,7 +118,7 @@ class NewTabPage extends React.Component<Props, {}> {
if (this.props.newTabData.isIncognito) {
return (
<NewPrivateTab
- stats={newTabData.stats}
+ newTabData={newTabData}
useAlternativePrivateSearchEngine={this.useAlternativePrivateSearchEngine}
onChangePrivateSearchEngine={this.onChangePrivateSearchEngine}
/>
diff --git a/components/brave_new_tab_ui/components/newPrivateTab.tsx b/components/brave_new_tab_ui/components/newPrivateTab.tsx
index 6c6cfb7..23e78c3 100644
--- a/components/brave_new_tab_ui/components/newPrivateTab.tsx
+++ b/components/brave_new_tab_ui/components/newPrivateTab.tsx
@@ -26,7 +26,7 @@ const privateTabIcon = require('../../img/newtab/private_tab_pagearea_icon.svg')
require('emptykit.css')
interface Props {
- stats: NewTab.Stats,
+ newTabData: NewTab.State,
useAlternativePrivateSearchEngine: boolean,
onChangePrivateSearchEngine: (e: React.ChangeEvent<HTMLInputElement>) => void
}
@@ -34,13 +34,13 @@ interface Props {
export default class NewPrivateTab extends React.PureComponent<Props, {}> {
render () {
const {
- stats,
+ newTabData,
useAlternativePrivateSearchEngine,
onChangePrivateSearchEngine
} = this.props
// do not render if stats aren't loaded yet
- if (!stats) {
+ if (!newTabData) {
return null
}
@@ -48,7 +48,7 @@ export default class NewPrivateTab extends React.PureComponent<Props, {}> {
<Page theme={theme.newPrivateTab}>
<Grid columns={3}>
<Column size={2}>
- <Stats stats={stats} />
+ <Stats stats={newTabData.stats} />
</Column>
<Column size={1} theme={theme.clockContainer}>
<Clock theme={theme.clock} /> |
self assigning to keep track but won't make it this week so up for grabs in the meanwhile |
here's the proof of work of the above patch. By now it seems like something changed in the API as no new updates to the web ui were made when this was tested. SHA brave/brave-core@dc1e224 and current master SHA |
Moving to 1.x since it wouldn't be the end of the world if we don't make this by 0.55.x or 1.0 |
Pulling back to 0.55.x since there's a fix 😄 |
Verification Passed on
Verification passed on
Verified passed with
|
Test Plan
See brave/brave-core#540
Description
First reported by @simonhong and confirmed by @yrliou.
The text was updated successfully, but these errors were encountered: