Skip to content
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

Distinguish between Publisher environments #203

Merged
merged 10 commits into from Jun 3, 2014
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jun 2, 2014

  • Distinguish between Preview and Production so that users don't accidentally make changes to Production content whilst under the assumption they're working on Preview.
  • Highlight environment using a favicon, a coloured navigation bar and a coloured label
  • Determine environment using Plek.current.website_root
  • User "preview" and "production" terminology for now, "live" and "test" may be better suited

screen shot 2014-06-02 at 13 03 05

screen shot 2014-06-02 at 13 03 32

screen shot 2014-06-02 at 13 06 47

fofr added 9 commits Jun 2, 2014
* Make the design more like Bootstrap 3, flat, starker contrast, simpler
* Give the navigation bar black borders, one of these will be used to
indicate environment
* Remove the divider
* Remove the background colour on active links
* Increase the body’s padding to account for the larger navbar
* Use LESS variables for the different environments
* Use an environment- class to switch environments
  * eg on `body` or `html`
* Background colour based on environment
* Defaults to a dark grey when there is no environment class set
* Use Plek.current.website_root to determine the current environment
(rather than Rails.env or ENV[‘GOVUK_APP_DOMAIN’])
* Create an environment_name helper for the message and class
* There are fixed footer navbars in publisher
@bradwright

This comment has been minimized.

Copy link
Contributor

@bradwright bradwright commented on b60aa1e Jun 2, 2014

This might be better determined by setting an initialiser in the deployment repository rather than using Plek.

@alext
Copy link
Contributor

@alext alext commented Jun 2, 2014

What @bradleywright said. Even better would be to have some state stored in govuk_admin_template that could be set from an initializer.

Going to close for now. Let's pick this up tomorrow...

@alext alext closed this Jun 2, 2014
Instead of trying to work it out from the website_root, configure it at
deploy time.

This uses a GovukAdminTemplate module to hold the config in anticipation
of this functionality moving into the gem.
@alext
Copy link
Contributor

@alext alext commented Jun 3, 2014

I've changed how environments are identified so that it's configured at deploy time.

@alext alext reopened this Jun 3, 2014
@alext
Copy link
Contributor

@alext alext commented Jun 3, 2014

See https://github.gds/gds/alphagov-deployment/pull/603 for related deploy scripts.

bradwright added a commit that referenced this pull request Jun 3, 2014
Distinguish between Publisher environments
@bradwright bradwright merged commit 2c4596c into master Jun 3, 2014
1 check passed
1 check passed
default "Build #93 succeeded on Jenkins"
Details
@bradwright bradwright deleted the distinguish-environment branch Jun 3, 2014
@bradwright
Copy link
Contributor

@bradwright bradwright commented Jun 4, 2014

This looks great on preview 👍

fofr added a commit to alphagov/govuk_admin_template that referenced this pull request Jun 4, 2014
* Include environment based favicons
* Set environment_style and environment_label at deploy time
* Include a development only default environment
* When no environment is set, show no indicator
* Styles pulled from publisher:
alphagov/publisher#203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.