Skip to content
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

Desktop - Download background images via CRX #10278

Closed
bsclifton opened this issue Jun 15, 2020 · 7 comments · Fixed by brave/brave-core#10690
Closed

Desktop - Download background images via CRX #10278

bsclifton opened this issue Jun 15, 2020 · 7 comments · Fixed by brave/brave-core#10690

Comments

@bsclifton
Copy link
Member

Description

Idea would be to use CRX packaging (ex: component registered with Component Updater; downloaded at run time) to download background images used in the New Tab Page.

Including all of these images increases the size of the APK (Android) and also makes updating of images harder (need to make code change + push). If separated, the initial download would be smaller and then the images themselves could be updated without a product change

cc: @rebron @anthonypkeane @SergeyZhukovsky

@bsclifton bsclifton added feature/new-tab perf feature-request OS/Android Fixes related to Android browser functionality OS/Desktop labels Jun 15, 2020
@bsclifton bsclifton changed the title [Android] Download background images via CRX Download background images via CRX Jun 15, 2020
@karenkliu
Copy link

Is there any update on this issue? The rest of the new wallpapers from 2020 are getting held up.

@rebron rebron added the priority/P3 The next thing for us to work on. It'll ride the trains. label Mar 19, 2021
@bsclifton
Copy link
Member Author

bsclifton commented Mar 24, 2021

Update - the packaging portion of this was separated into the following issue: #14797

Implementation for that packaging can be found here: brave/brave-core-crx-packager#212

The remaining work for this issue would be to integrate with this component for Desktop/Android 😄 It would reduce the APK size quite a bit (Android) and also reduce the size of the Desktop installer

@bsclifton
Copy link
Member Author

When we do the integration, here are the params we'll need to pass to component updater:

  • publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4L9XGAiVhCL8oi5aQhFrVllsw6VebXigTj5ow3e0fYeEztjM9FOgqMD6pl0AB8u05xKUPcdpIZqCguEzXyXh5vn+BWoEGtVezEEfjd33T4drJAYwEBvgWcFVVLNWku1/53f6TZp8IiiaOhKIANUtn/Zvw/0nUYa10nwxK4P3he4Ahj0CO6HVeu9zNRCdZFSkYdMnPnNYTU+qN88OT1DBsV1xQgd3qK+MkzPDF1okHi9a+IXiHa3FVY++QmtSrMgetJnS/qBt6VsZcejcQCd1KIpgHNyoVl5rodtBRj25o48SxYePrssMRTv9vAQmRUZZukOIL/HdeqjCHIOSQTrFEQIDAQAB
  • componentID: aoojcmojmmcbpfgoecoadbdpnagfchel

@bsclifton
Copy link
Member Author

We'll want to keep one image in here as a default - so that while CRX downloads we can show something

@karenkliu @jamesmudgett any recommendations on which to include?

@karenkliu
Copy link

@bsclifton Let's use spencer-moore_lake
Screen Shot 2021-03-24 at 6 55 25 PM

It has the 3rd-lowest file size out of our current wallpaper batch. (First one features Japan which might be confusing as a first run and 2nd-lowest is too moody for first run).

@bsclifton bsclifton removed the OS/Android Fixes related to Android browser functionality label Aug 30, 2021
@bsclifton bsclifton changed the title Download background images via CRX Desktop - Download background images via CRX Aug 30, 2021
@bsclifton
Copy link
Member Author

Android completed with brave/brave-core#9635 (fixing #17328)

@stephendonner
Copy link

stephendonner commented Nov 2, 2021

Verified PASSED using

Brave 1.33.51 Chromium: 95.0.4638.69 (Official Build) nightly (x86_64)
Revision 6a1600ed572fedecd573b6c2b90a22fe6392a410-refs/branch-heads/4638@{#984}
OS macOS Version 11.6.1 (Build 20G224)

Steps:

  1. new profile
  2. launched Brave
  3. loaded brave://components/
  4. confirmed **NTP Background Images** - Version: 1.0.4 was listed as Up-to-date
  5. opened a new-tab page
  6. confirmed round of new background images
  7. clicked on Customize at the bottom of the new-tab page
  8. toggled Show Background Images to Off
  9. confirmed I got a color-gradient background, instead
  10. toggled Show Sponsored Images to Off
  11. confirmed opening new-tab pages didn't show me any sponsored-image ads
  12. toggled Show Sponsored Images and Show Background Images back to On
  13. confirmed I saw both sponsored images and background images

NOTE: #16309 covers the Show Sponsored Images toggle not behaving correctly.

example example example example example example example
Screen Shot 2021-11-02 at 7 37 08 AM Screen Shot 2021-11-02 at 7 43 55 AM Screen Shot 2021-11-02 at 7 43 05 AM Screen Shot 2021-11-02 at 7 43 25 AM Screen Shot 2021-11-02 at 8 04 57 AM Screen Shot 2021-11-02 at 8 05 04 AM Screen Shot 2021-11-02 at 7 41 44 AM

Verified PASSED using

Brave 1.33.82 Chromium: 96.0.4664.45 (Official Build) beta (64-bit)
Revision 76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947}
OS Windows 10 Version 20H2 (Build 19042.1348)

Steps:

  1. new profile
  2. launched Brave
  3. loaded brave://components/
  4. confirmed **NTP Background Images** - Version: 1.0.4 was listed as Up-to-date
  5. opened a new-tab page
  6. confirmed round of new background images
  7. clicked on Customize at the bottom of the new-tab page
  8. toggled Show Background Images to Off
  9. confirmed I got a color-gradient background, instead
  10. toggled Show Sponsored Images to Off
  11. confirmed opening new-tab pages didn't show me any sponsored-image ads
  12. toggled Show Sponsored Images and Show Background Images back to On
  13. confirmed I saw both sponsored images and background images

NOTE: #16309 covers the Show Sponsored Images toggle not behaving correctly.

example example example example example example
10278-1 10278-2 10278-3 10278-4 10278-5 10278-6

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-Win64 and removed QA/Test-All-Platforms QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants