-
Notifications
You must be signed in to change notification settings - Fork 8
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
[FEATURE] Add Unsplash Backgrounds #1285
Comments
While I'm not against the idea of user customisable background images, it's not necessarily in line with the project's design goals (fast, high security, and unobtrusive). In the past when I first developed the extension, I started off with something more like other new tab style extensions — a background image, daily reminder/s, quotes, tasks, timers, etc. — but found it all far too distracting. For my own productivity, those experiments taught me keeping things simple and unobtrusive yields the best results. Somewhat recently the theme system had a big refactor which allows arbitrary CSS to be injected into the page on load. The current themes take advantage of this a little however more powerful theme customisation is possible. For example, users could write their own styles instead of using a built-in theme. That would allow fully custom backgrounds (albeit not random but perhaps with some CSS trickery a pseudo-random background could be chosen from a predefined set). The theme/s would need to be refactored to still look OK with a background image. Since the background could be any colour the theme would have to adapt. If we knew ahead of time what the background is it's possible to adjust the theme to have decent contrast for readability. If we don't know the background colours it's challenging and might need extra JavaScript to sample the image and calculate the average colours. That's potentially a lot of extra compute required and could slow down initial page load (on top of the extra compute required to load a large image, which can be significant on lower-spec machines!). From a security perspective, right now there is zero remote data and a very tight CSP. If we had remote background images, not only would it drastically slow down the first initial load but the CSP would need to be adjusted too (especially if we allow users to use custom CSS). Another option is to have background images included in the extension's distributable assets but that would drastically increase the download size. Another way could be to allow users to select a file/s from their file system, but that's tricky to do in a secure way and the APIs are in a state of flux at the moment. Perhaps another way would be to do something fancy like download images in the background script (that would get around the pitfalls of other techniques but has potential for bugs e.g., what happens if the user is offline or the remote file is unavailable?). The Chrome Web Store changed its policies to disallow all remote code... but do images apply to that policy? These are some of my ideas around such a feature. All that said, it would be nice to put the user in a position where they can choose to customise the experience how they wish... but to do so in a performant way that still provides a clear UI is a challenge. I'll keep the issue open as this ties in to my intention to overhaul the theme customisation and deserves more thought. If it's something you absolutely need to have, feel free to fork the repo. I'm happy to provide help with forks :) |
you can make it optional tho. I would also like it to be minimal |
Hi,
I like the extension very much. It's more helpful than most other new tab pages. One thing i would like to have is a randomly changing unsplash background.
Is it possible to add it?
The text was updated successfully, but these errors were encountered: