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

Give users the ability to upload and use their own background images for the new tab page #19640

Closed
Tracked by #15252
simonhong opened this issue Nov 22, 2021 · 6 comments · Fixed by brave/brave-core#11622

Comments

@simonhong
Copy link
Member

simonhong commented Nov 22, 2021

This is sub task of #15252

Overall design is described in #15252.

  • Specification
    • Custom image is per-profile configuration
    • Uploaded image is stored only in local device
    • After uploaded, NTP shows uploaded images by default
      • NTP SI will be displayed together if user doesn't disable it
    • When user choose Brave backgrounds again after uploading custom image, stored image will be deleted
@simonhong simonhong added feature/new-tab priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes release-notes/include OS/Desktop labels Nov 22, 2021
@simonhong simonhong self-assigned this Nov 22, 2021
@rebron rebron added this to In progress in New Tab page Nov 23, 2021
@simonhong
Copy link
Member Author

simonhong commented Dec 7, 2021

Hmm, chromium's custom background image from brave://new-tab-page doesn't work - #19962
image

@simonhong
Copy link
Member Author

simonhong commented Dec 15, 2021

Above issue was fixed. And our custom background option and chromium's should use same image.

@simonhong
Copy link
Member Author

simonhong commented Dec 15, 2021

When user upload custom image, already opened NTP will be updated also.

@simonhong
Copy link
Member Author

simonhong commented Dec 15, 2021

NTP SI(Sponsored Images) and NTP BI(Background Images) are browser-wide data.
but custom image should be per-profile configuration.

NTPCustomBackgroundImagesService will manage per-profile custom background prefs.
It will run independently with NTPBackgroundImagesService.
ViewCounterService will check whether this profile uses custom image or not by using NTPCustomBackgroundImagesService .
If used, view counter gets properties from NTPCustomBackgroundImagesService and will pass to its client.

@stephendonner
Copy link
Collaborator

stephendonner commented Feb 23, 2022

Verified PASSED using

Brave 1.37.65 Chromium: 99.0.4844.35 (Official Build) nightly (64-bit)
Revision f60a827ddb87f1c403e07713751a5551d5856ac0-refs/branch-heads/4844@{#579}
OS Windows 10 Version 21H2 (Build 19044.1566)

Steps:

  1. installed 1.37.65
  2. launched Brave
  3. opened a new-tab page
  4. clicked on Customize on the lower right
  5. chose Upload from device
  6. confirmed the various images
  7. restarted and confirmed they persisted after restart
  8. chose Brave backgrounds
  9. confirmed I could cycle through the various backgrounds
  10. confirmed Sponsored Image ad backgrounds were still in the same position and frequency as before
clock.gif clock.png transparent-fire-gif.gif lexus-is-350.jpg Brave backgrounds (default) Sponsored Image tabs
19640-2 19640-3 19640-4 19640-5 19640-6 19640

Verified PASSED using

Brave 1.37.91 Chromium: 99.0.4844.51 (Official Build) beta (x86_64)
Revision d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}
OS macOS Version 12.3 (Build 21E230)

Steps:

  1. installed 1.37.91
  2. launched Brave
  3. opened a new-tab page
  4. clicked on Customize on the lower right
  5. chose Upload from device
  6. confirmed the various images
  7. restarted and confirmed they persisted after restart
  8. chose Brave backgrounds
  9. confirmed I could cycle through the various backgrounds
  10. confirmed Sponsored Image ad backgrounds were still in the same position and frequency as before
cute-transparent-gif-10.gif Blue-Butterfly-PNG-Transparent-Image.png lexus-is-350.jpg Brave backgrounds (default) Sponsored Image tabs
Screen Shot 2022-03-14 at 10 07 55 PM Screen Shot 2022-03-14 at 10 12 53 PM Screen Shot 2022-03-14 at 10 14 49 PM Screen Shot 2022-03-14 at 10 08 15 PM Screen Shot 2022-03-14 at 10 08 32 PM

@btlechowski
Copy link
Collaborator

Verification passed on

Brave 1.37.83 Chromium: 99.0.4844.51 (Official Build) beta (64-bit)
Revision d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}
OS Ubuntu 18.04 LTS

Verified test plan from brave/brave-core#11622

Default image is brave background

image

Custom image

Verified able to chose custom background

image
image

Verified NTP SI was shown
image

Verified able to go back to brave background:
image

Dark theme

image

Logged: #21518

@rebron rebron changed the title Use custom images for NTP Background Give users the ability to upload and use their own background images for the new tab page Mar 30, 2022
@rebron rebron removed this from Completed in New Tab page Apr 26, 2022
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.

4 participants