Open NickColley opened 9 years ago
That would be great. I don't really know Fauxton's source, but an easier upgrade path makes for more regular upgrades, and that's something we really profit from. There have been a lot of changes since the previous Fauxton we had and the new one...
Discussion with the friendly #couchdb irc folks:
<garren> Maybe we can add a config for you
<robertkowalski> nickcolley: the wordings could be changed with https://github.com/apache/couchdb-fauxton/blob/master/i18n.json.default
<robertkowalski> not sure regarding the css / hyperlinks though
<robertkowalski> example usage of i18n.json: https://github.com/apache/couchdb-fauxton/commit/330e1e3777b0a219043f6cfdc2d455dedb4eb719
* jensnockert has quit (Remote host closed the connection)
<robertkowalski> here is how we handle the different i18n files: https://github.com/apache/couchdb-fauxton/blob/33620b0d8a00ecfe03b94cf99d51d2813a06838d/tasks/helper.js#L34
Looks like a simple patch that'd get us most of the way there, we'd also need to be able to import json into the less variables for the brand stuff.
@nickcolley and @marten-de-vries please let me know if I can help with this. Ideally it would be nice to have Pouchdb-fauxton as part of the main couchdb-fauxton and just have a specific build process or something to build Fauxton for Pouchdb.
The current diff: https://github.com/apache/couchdb-fauxton/compare/master...pouchdb:master .
That leaves these things to make configurable in the build process:
@brandPrimary
colorAt this stage its best to create a new module to overcome these issues. Create a new folder in app/addons
maybe call it pouchdb
and create a base.js
. Also add it to the .gitignore
file. Also create a settings.json.pouch
this is where all your overrides can go.
Then to fix doucmentation you can do something like this in your base.js file:
var newUrls = {
GENERAL: 'POUCHDB_URL',
};
_.each(newUrls, function (value, prop) {
FauxtonAPI.constants.DOC_URLS[prop] = value;
});
I'm not 100% certain right now but I think switching the Favicon and logo might require you creating your own index.underscore that you would then override in a settings.json.pouch file.
The changing of the @brandPrimary
means changing the css file in the settings.json file to point to your css file. This css file should be in app/addons/pouchdb/assets/less
.
Hope that makes sense. Let me know if I need to explain in more detail.
Also cc'ing in @benkeen @michellephung and @robertkowalski for extra help.
@nickcolley and @marten-de-vries please let me know if I can help with this. Ideally it would be nice to have Pouchdb-fauxton as part of the main couchdb-fauxton and just have a specific build process or something to build Fauxton for Pouchdb.
that would be quite cool :)
At the moment we have to edit some core files to update fauxton, I'd like to discuss the steps it'd take to have a smoother upgrade path without having to manually rebase everytime.
In terms of the styling (less), I've pushed upstream a while a go the ability to set the brand colour, so we'd need to just have our own copy of variables.less and use that when we build.
There's a bit of markup (react) changes to add the logo. We could contribute upstream the ability to change this in a config file potentially?
I'd love to be in a position were we can make patches to pouchdb-fauxton and test them out in the pouchdb community then push them upstream with no conflicts.
Interested what you think @marten-de-vries :+1: