-
Notifications
You must be signed in to change notification settings - Fork 18
Allow finer-grained skinning of home/overview page #1262
Conversation
65df341
to
2019dec
Compare
@jcscottiii ready for review. |
@jonathaningram i think a new .md doc for how to do skins should be created. that way someone in the future won't have to find this PR to do the same thing. |
@jcscottiii how about instead of writing a document, we include a "default" skin in this project? Here's my thinking: I don't like writing documentation because I feel it becomes out of date with the code changes that are constantly coming in. Take the If we add a I do agree that guides like "How to create your custom cg-dashboard skin" are really useful, but I'm not sure if it's a good use of time at this stage. |
@jonathaningram i |
2019dec
to
53195ad
Compare
This keeps the PR changes small and eslint-loader can be removed later.
@jcscottiii Awesome! I have just rebased this if you'd like to merge. Probably best to do the default skin in another PR so we can progress with this as it will be quite a large change. |
@jonathaningram thanks for this!! (i know we wanted #1252 in first but had questions there) |
This allows skins to provide an array of panels for the home page. Panels are stacked vertically (as they already were) - however this PR just allows skins to provide whatever panels they like. Inside a panel, the skin can do what it wants. The
cg
skin retains the same behaviour and just renders some content tiles in a grid pattern. Note: I've moved these content tiles to thecg
skin folder since they are specifically for cloud.gov.I also added an import alias named
dashboard
so that skins can import components from the main dashboard source without having to rely on relative imports like../../../../components/foo
. An example use is:You can see cloud.gov.au's PR that matches this change: https://github.com/govau/ci-console/pull/1/files
I didn't want to make any more PRs until the prettier one is merged so I can avoid merge conflicts, but I wanted to get a start on this one.