Repository navigation
feat(dylib): add Boosts, per-site styles like Arc's - #252
OmegazonCMoi wants to merge 6 commits into
Conversation
|
Part of what made Arc Boosts so great was the simple UI where you could change colors and layout with simple buttons. This seems to be missing that, and I would imagine that if Arc's Boost engine is in there, changing colors are in there too. |
|
What's the benefit of this over using an extension like Tampermonkey? |
Very good point, thank you. The Boost popover now follows Arc’s design in terms of layout: colors, light/dark and brightness, a grid of fonts, Size, Case, Zap, and Code for your custom CSS and JavaScript. You can see the video in the description. Just one clarification: the part of the Arc engine that Dia ships is only ArcBrowserContextEffects, which adds a Boost to pages. So the color part is new code.
Mostly that there's nothing to install or write. With Tampermonkey you write a userscript for each site. Here you click what you want to hide, pick a color or a font, and it applies as you go, per site, from the address field. CSS and JavaScript are there if you want them, but you don't need them. It also uses the engine Dia already ships, so it reaches pages as they start loading, and a Boost can be exported as a file and shared. |
|
@OmegazonCMoi , Nice work. You nailed it! |
a3a0d0f to
0a58ff9
Compare
What
Adds Boosts, under Page and off by default. A paintbrush in the address field opens an Arc-style popover for the site you're on: colors, light/dark, brightness, fonts, text size and case, Zap to hide parts of the page, and Code for your own CSS and JavaScript. The paintbrush turns pink while the site has a Boost on. Settings lists every site with a Boost, with a switch and a delete button each, and a
.diaboostfile exports or imports one site's Boost.Why
People coming from Arc miss Boosts. Dia still ships the engine they ran on,
ArcBrowserContextEffects, but never calls it. The tweak registers each site's stylesheet and script there, so they reach pages as they load, with no extension. Open tabs restyle as you type.The popover is built from the Settings rows and groups. Boosts are saved in
com.diapatchesunderboostSites, like Profile Emoji's emoji. Importing a Boost that runs JavaScript asks first.Proof
boosts-pr.mp4
Tested on
make test: Boosts has 0 problems in 86 scenarios with tabs in the sidebar (Dia 1.55.1) and 82 with tabs at the top (Dia 1.56.0). Switch Profiles with ⌘1–9 fails its check in every scenario on this Mac, all off included; this PR doesn't touch it.tests/boosts.mpasses.Checklist