ember-learn / ember-cli-addon-docs

Easy, beautiful docs for your OSS Ember addons
https://ember-learn.github.io/ember-cli-addon-docs
MIT License
176 stars 142 forks source link

Brand customization #282

Closed samselikoff closed 5 years ago

samselikoff commented 5 years ago

I want to add slight (slight) brand customization. To start I want users to be able to set their $theme color (which affects the header, hero, link colors etc.).

Right now there is one color that does this, but I could imagine us adding some more options.

Where should we add this? I was thinking we could add a theme key or property to AddonDocsConfig. It could be an object that we start off with a brandColor key for the main color.

What do y'all think, is this a good spot for it?

(Also – this is not meant to solve the case of folks wanting full customization over AddonDocs' UI. I have another solution for that. I think we should provide renderless components that yield out the navigation & API information.)

/cc @dfreeman @pzuraq

dfreeman commented 5 years ago

I'm on board with adding something to AddonDocsConfig, though we could also consider having users set a CSS variable instead. Granted that would mean things would fall back to the default branding in IE11 (which I think is the only Ember-supported browser without support), but that might be ok? It would certainly simplify the implementation.

Definitely like the idea of renderless components down the line for folks who want broader customization.

pzuraq commented 5 years ago

I think having the base UI allow for a reasonable amount of theming would be ideal, just the color schema and maybe the logos would probably be all that's needed.

I'm not sure about broader customization to be honest, whether or not it's needed, but if we support it it should definitely be through container components like that, just yielding a common data format.

samselikoff commented 5 years ago

I'm not sure about broader customization to be honest, whether or not it's needed

@pzuraq exactly. I think the trickiest & most legit use case is for addons that provide styling (either global- or component-level), in which case I think we just want to "bail" out of all of our out-of-the-box styles, provide users with an easy way to render the nav & pages & api docs, and let them go to town.

we could also consider having users set a CSS variable instead

@dfreeman great idea! I need to learn about these, I'm stuck in my old habits of Sass vars but if this is as easy as telling folks to set some CSS variable in their addon.css seems like an awesome approach. Gonna look into this next 👍

samselikoff commented 5 years ago

https://github.com/ember-learn/ember-cli-addon-docs/pull/304 closes