Skip to content

Commit

Permalink
Merge pull request #1241 from uktrade/release
Browse files Browse the repository at this point in the history
Beta release
  • Loading branch information
depsiatwal authored May 10, 2021
2 parents 26c7cc0 + 2fd356f commit 5b2aa66
Show file tree
Hide file tree
Showing 225 changed files with 32,379 additions and 3,915 deletions.
79 changes: 77 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,74 @@

### Enhancements

- GP2-2511 - Sign in / up design updates
- GP2-2438 - Select control UX enhancements
- GP2-2507 - Remove beta banner
- GP2-2415 - Add preload attr and iOS poster/preview trick to video embed
- GP2-1868 - Feature flag urls
- GP2-2218 - WTE tab rearrangement
- GP2-2370 - 3CE attribution on product search and removal of assumptions
- NOTICKET - Bump python runtime version to suit changed buildpack
- GP2-2303 - Quick cleanup of niggles related to directory-components template vars
- GP2-1276 - Scrolling issue on lessons with a case study (mobile)

- GP2-2135 - Comparison country api storage
- GP2-2329 - Magna mobile header with search
- GP2-793 - List of countries that need to have "the" before the country name
- GP2-2333 - Make feedback URLs on migrated pages relative not absolute, to avoid referencing prod only
- GP2-2372 - Disclaimer for the Beta release
- GP2-2358 - Change footer to use /contact/ as contact URL
- GP2-2353 - VFM final page back button
- GP2-2176 - VFM Multiselect
- GP2-2095 - Error page styling and slug tidyup
- GP2-2326 - header style fix
- GP2-2265 - pdf design changes
- GP2-2279 - The progress bar is not displayed on the export plan landing page
- GP2-2137 - VFM Companies house lookup
- GP2-2298 - Added header missing menu items (search, services)
- GP2-2308 - Add new CMS page type that can be used for Services landing page
- GP2-2155 - Add/Port /healthcheck/ views
- GP2-2156 - Add robots.txt
- GP2-2069 - Replicate the Cookie management behaviour from V1.
- No ticket - wagtail upgrade to 2.11.7 and other packages including reportlab lib
- GP2-2283 - Remove "Some features are not available" from the export plan landing page
- GP2-2154 - Redirects BAU to magna
- GP2-1253 - Export plan - Learning linking components
- GP2-2275 - Rename 'js' directory to 'javascript' directory across project
- GP2-2214 - Signed in magna header (BAU pages)
- GP2-1887 - VFM questionnaire
- GP2-2086 - Date picker selectable ranges
- GP2-2088 - Form validation - Numerical fields
- GP2-2087 - Form validation - Numerical fields (cost/price)
- GP2-2302 - ep dropdown validation
- GP2-2401 - pdf save

### Fixed bugs

- GP2-2513 - Fixes h2 with b tag issue
- GP2-2396 - [mobile]-Logo upload issue
- GP2-2130 - Layout tweaks to UKEF pages
- GP2-2442 - WTE - Fix 'Add place' button flicker
- GP2-2411 - Fix signin/up padding inconsistency
- GP2-2422 - Export plan - Confirmation modal is too tall
- GP2-2421 - update content
- GP2-2393 - [mobile]- Text alignment on CTA
- GP2-2382 - PDF updates
- GP2-2368 - Typo on the Funding and credit page
- GP2-2292 - Save product on name change only
- GP2-2262 - Case study background
- GP2-2234 - Sign up / in page tablet design
- NOTICKET - Fixes header menu flickering
- GP2-2138 - Fix domestic tab alignment
- GP2-2234 - Sign up / in tablet
- GP2-2139 - Menu button moves on mobile after selection

## [1.8.0](https://github.com/uktrade/great-cms/releases/tag/1.8.0)

[Full Changelog](https://github.com/uktrade/great-cms/compare/1.7.1...1.8.0)

### Enhancements

- GP2-2170 - PDF Download, with blank support
- GP2-1904 - New sign in page mobile
- GP2-1850 - Port Search from V1 to great-cms
Expand All @@ -12,19 +80,26 @@
- GP2-1902 - New sign in page design implemented
- GP2-1903 - New sign up page design implemented
- GP2-1709 - trade barrier integration
- GP2-2302 - ep dropdown validation
- GP2-2336 - collapse api object

### Fixed bugs

- GP2-2337 - adapting product typos
- GP2-2292 - Save product on name change only
- GP2-2262 - Case study background
- GP2-2234 - Sign up / in page tablet design
- NOTICKET - Fixes header menu flickering
- GP2-2138 - Fix domestic tab alignment
- GP2-2250 - Hide top banner when signed in on mobile
- GP2-2240 - Search tuning
- GP2-2215 - Fix privacy policy sign up link
- GP2-2120 - Change to adapting your product. Fix tooltips. Add learning. Update data.
- GP2-2050 - Update incorrect learning banner copy
- NOTICKET - Visual tweaks for sign in/up



## [1.7.1](https://github.com/uktrade/great-cms/releases/tag/1.7.1)

[Full Changelog](https://github.com/uktrade/great-cms/compare/1.6.0...1.7.1)
Change log disappeared we lost some how perhaps during staging release. Please refer to above url for file changes.

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ You can test this works by attempting to visit http://greatcms.trade.great:8020/

Signed cookies are used as the session backend to avoid using a database. We therefore must avoid storing non-trivial data in the session, because the browser will be exposed to the data.

## Javascript file paths

Currently, the React component are built into Magna.js, while some javascript ported from Great V1 are collected from directories named javascript/.

IMPORTANT: If you build great-components or something else and end up with code in /js/ it will NOT be accessible on a deployed environment while we are running a hybrid V1 (great-domestic-ui) + V2 (great-cms) system.

## React components

To add new react components:
Expand Down Expand Up @@ -211,6 +217,9 @@ AttributeError: 'User' object has no attribute 'session_id'"/'company' et al, yo

* On ubuntu you may need to run `sudo apt-get install libpq-dev` if after trying to install dependencies you get an error message relating to `psycopg`.

* On latest release of MacOs `make install_requirements` might fail, please run `env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" make install_requirements`


## Helpful links
* [Developers Onboarding Checklist](https://uktrade.atlassian.net/wiki/spaces/ED/pages/32243946/Developers+onboarding+checklist)
* [Gitflow branching](https://uktrade.atlassian.net/wiki/spaces/ED/pages/737182153/Gitflow+and+releases)
Expand Down
2 changes: 1 addition & 1 deletion cms_extras/modeladmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CaseStudySpreadsheetExportMixin:
]

def stream_csv(self, queryset):
""" Generate a csv file line by line from queryset, to be used in a StreamingHTTPResponse """
"""Generate a csv file line by line from queryset, to be used in a StreamingHTTPResponse"""

writer = csv.DictWriter(
Echo(),
Expand Down
8 changes: 5 additions & 3 deletions config/env/dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ APP_ENVIRONMENT=local
SECRET_KEY=debug
DEBUG=true
SESSION_COOKIE_SECURE=false
UTM_COOKIE_DOMAIN=.great
SECURE_HSTS_SECONDS=0
PYTHONDEBUG=true
HEALTH_CHECK_TOKEN=debug
Expand All @@ -28,6 +27,8 @@ DIRECTORY_FORMS_API_BASE_URL=http://forms.trade.great:8011
DIRECTORY_FORMS_DEFAULT_TIMEOUT=30
DIRECTORY_API_CLIENT_BASE_URL=http://api.trade.great:8000
DIRECTORY_API_CLIENT_API_KEY=debug
DIRECTORY_CH_SEARCH_CLIENT_BASE_URL=http://chsearch.trade.great:8012
DIRECTORY_CH_SEARCH_CLIENT_API_KEY=debug
ENVIRONMENT_CSS_THEME_FILE=core/css/environment_dev_theme.css
MAXMIND_LICENCE_KEY=debug
API_CLIENT_BASE_URL=http://api.trade.great:8000
Expand All @@ -39,15 +40,16 @@ STAFF_SSO_AUTHBROKER_URL=https://www.examole.com
AUTHBROKER_CLIENT_ID=debug
AUTHBROKER_CLIENT_SECRET=debug
FEATURE_FLAG_HARD_CODE_USER_INDUSTRIES_EXPERTISE=True
FEATURE_COMPARE_MARKETS_TABS={"population":true, "economy":true, "society": true, "agegroups": true}
FEATURE_COMPARE_MARKETS_TABS={"product":true, "economy":true, "society": true, "agegroups": true, "business": true}
#treat it like SECRET_KEY in BETA env. must be a valid Fernet key.hex()
#BETA_TOKEN=z7445AQ6aGXoPdFxYXQaJPLa3XU6I0zZUuI-Kbar8Jk=
#BETA_TOKEN_EXPIRATION_DAYS=30
#BETA_WHITELISTED_ENDPOINTS='/api/create-token/,/favicon.ico,/api/check/,/admin/,/auth/login/'
#BETA_BLACKLISTED_USERS='gAAAAABfCYKVAk3nFrKeV73L5KAf1_IAlLoduFFDMu1XmMqC261RTFDvWzli5UtGRdI5j1033a512xKjx2RWyJGsixfZXCQkEaIWIX1z9WSyFC6COYy1iOw=,gAAAAABfCYKVAk3nFrKeV73L5KAf1_IAlLoduFFDMu1XmMqC261RTFDvWzli5UtGRdI5j1033a512xKjx2RWyJGsixfZXCQkEaIWIX1z9WSyFC6COYy1iOw='
GOOGLE_TAG_MANAGER_ID=GTM-1234567
GOOGLE_TAG_MANAGER_ENV=dev
UTM_COOKIE_DOMAIN=.great
UTM_COOKIE_DOMAIN=.trade.great
PRIVACY_COOKIE_DOMAIN=.trade.great

FEATURE_FLAG_ENABLE_V1_CONTACT_PAGES=True
CONTACT_ENQUIRIES_AGENT_EMAIL_ADDRESS=great-cms-local-dev@mail.ci.uktrade.digital
Expand Down
27 changes: 26 additions & 1 deletion config/settings.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os
import sys

import directory_healthcheck.backends
import environ
import sentry_sdk
from django.urls import reverse_lazy
from sentry_sdk.integrations.django import DjangoIntegration

import healthcheck.backends
from .utils import get_wagtail_transfer_configuration

ROOT_DIR = environ.Path(__file__) - 2
Expand Down Expand Up @@ -72,6 +74,8 @@
'core.templatetags.int_to_range',
'activitystream.apps.ActivityStreamConfig',
'search.apps.SearchConfig',
'directory_healthcheck',
'healthcheck.apps.HealthcheckAppConfig',
]

MIDDLEWARE = [
Expand Down Expand Up @@ -120,6 +124,7 @@
'core.context_processors.analytics_vars',
'core.context_processors.migration_support_vars',
'core.context_processors.cms_slug_urls',
'core.context_processors.cookie_management_vars',
'great_components.context_processors.analytics',
],
},
Expand Down Expand Up @@ -324,6 +329,7 @@
SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True


# django-storages
AWS_STORAGE_BUCKET_NAME = env.str('AWS_STORAGE_BUCKET_NAME', '')
AWS_DEFAULT_ACL = None
Expand Down Expand Up @@ -397,6 +403,8 @@
UTM_COOKIE_DOMAIN = env.str('UTM_COOKIE_DOMAIN')
GA360_BUSINESS_UNIT = 'GreatMagna'

PRIVACY_COOKIE_DOMAIN = env.str('PRIVACY_COOKIE_DOMAIN', UTM_COOKIE_DOMAIN)

REST_FRAMEWORK = {'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',)}

WAGTAILIMAGES_IMAGE_MODEL = 'core.AltTextImage'
Expand Down Expand Up @@ -475,6 +483,12 @@
DIRECTORY_API_CLIENT_SENDER_ID = 'directory'
DIRECTORY_API_CLIENT_DEFAULT_TIMEOUT = 15

# Companies House Search
DIRECTORY_CH_SEARCH_CLIENT_BASE_URL = env.str('DIRECTORY_CH_SEARCH_CLIENT_BASE_URL')
DIRECTORY_CH_SEARCH_CLIENT_API_KEY = env.str('DIRECTORY_CH_SEARCH_CLIENT_API_KEY')
DIRECTORY_CH_SEARCH_CLIENT_SENDER_ID = env.str('DIRECTORY_CH_SEARCH_CLIENT_SENDER_ID', 'directory')
DIRECTORY_CH_SEARCH_CLIENT_DEFAULT_TIMEOUT = env.str('DIRECTORY_CH_SEARCH_CLIENT_DEFAULT_TIMEOUT', 5)

MADB_URL = env.str('MADB_URL', 'https://www.check-duties-customs-exporting-goods.service.gov.uk')

# 3CE commodity classification
Expand Down Expand Up @@ -545,7 +559,6 @@

FEATURE_FLAG_HARD_CODE_USER_INDUSTRIES_EXPERTISE = env.str('FEATURE_FLAG_HARD_CODE_USER_INDUSTRIES_EXPERTISE', False)
FEATURE_EXPORT_PLAN_SECTIONS_DISABLED_LIST = env.list('FEATURE_EXPORT_PLAN_SECTIONS_DISABLED_LIST', default=[])
FEATURE_ENABLE_PRODUCT_SEARCH_WHEN_NO_USER = env.bool('FEATURE_ENABLE_PRODUCT_SEARCH_WHEN_NO_USER', False)
FEATURE_COMPARE_MARKETS_TABS = env.str('FEATURE_COMPARE_MARKETS_TABS', '{ }')
FEATURE_SHOW_REPORT_BARRIER_CONTENT = env.bool('FEATURE_SHOW_REPORT_BARRIER_CONTENT', False)
FEATURE_SHOW_MARKET_GUIDE_BAU_LINKS = env.bool('FEATURE_SHOW_MARKET_GUIDE_BAU_LINKS', False)
Expand Down Expand Up @@ -590,6 +603,18 @@
False, # This view is only enabled, via environment configuration, for Dev
)

# Healthcheck: https://github.com/uktrade/directory-healthcheck/
DIRECTORY_HEALTHCHECK_TOKEN = env.str('HEALTH_CHECK_TOKEN')
DIRECTORY_HEALTHCHECK_BACKENDS = [
directory_healthcheck.backends.APIBackend,
directory_healthcheck.backends.SingleSignOnBackend,
directory_healthcheck.backends.FormsAPIBackend,
]

if FEATURE_FLAG_TEST_SEARCH_API_PAGES_ON:
DIRECTORY_HEALTHCHECK_BACKENDS.append(healthcheck.backends.SearchSortBackend)


# ActivityStream config, for search
ACTIVITY_STREAM_ACCESS_KEY_ID = env.str('ACTIVITY_STREAM_ACCESS_KEY_ID')
ACTIVITY_STREAM_SECRET_KEY = env.str('ACTIVITY_STREAM_SECRET_KEY')
Expand Down
46 changes: 43 additions & 3 deletions config/url_redirects.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from functools import partial
from urllib.parse import urljoin

from django.conf import settings
from django.conf.urls import url
from django.views.generic.base import RedirectView
Expand All @@ -9,6 +12,9 @@
TranslationRedirectView,
)

build_great_international_url = partial(urljoin, '/international/')


redirects = [
url(
r'^about/$',
Expand Down Expand Up @@ -502,13 +508,13 @@
url(
r'^market-research/doing-business-with-integrity/$',
QuerystringRedirectView.as_view(
url='/advice/manage-legal-and-ethical-compliance/understand-business-risk-in-overseas-markets/'
url='advice/manage-risk-bribery-corruption-and-abuse-human-rights/bribery-and-corruption-understand-risks/'
),
),
url(
r'^market-research/know-the-relevant-legislation/$',
QuerystringRedirectView.as_view(
url='/advice/manage-legal-and-ethical-compliance/understand-business-risk-in-overseas-markets/'
url='advice/manage-risk-bribery-corruption-and-abuse-human-rights/bribery-and-corruption-understand-risks/'
),
),
url(r'^business-planning/$', QuerystringRedirectView.as_view(url='/advice/define-route-to-market/')),
Expand Down Expand Up @@ -585,7 +591,6 @@
r'^finance/raise-money-with-investment/$',
QuerystringRedirectView.as_view(url='/advice/get-export-finance-and-funding/raise-money-with-investment/'),
),
url(r'^getting-paid/$', QuerystringRedirectView.as_view(url='/advice/manage-payment-for-export-orders/')),
url(
r'^getting-paid/invoice-currency-and-contents/$',
QuerystringRedirectView.as_view(url='/advice/manage-payment-for-export-orders/payment-methods-for-exporters/'),
Expand All @@ -610,6 +615,7 @@
r'^getting-paid/insure-against-non-payment/$',
QuerystringRedirectView.as_view(url='/advice/manage-payment-for-export-orders/insure-against-non-payment/'),
),
url(r'^getting-paid/$', QuerystringRedirectView.as_view(url='/advice/manage-payment-for-export-orders/')),
url(
r'^customer-insight/$',
QuerystringRedirectView.as_view(url='/advice/prepare-to-do-business-in-a-foreign-country/'),
Expand Down Expand Up @@ -797,6 +803,40 @@
url='/advice/prepare-for-export-procedures-and-logistics/documentation-international-trade/'
),
),
url(
r'^trade/$',
QuerystringRedirectView.as_view(url='/international/trade/'),
name='international-trade-home',
),
url(
r'^trade/(?P<path>[\w\-/]*)/$',
QuerystringRedirectView.as_view(
url=build_great_international_url('trade/incoming/%(path)s/'),
# Note that this then has a FURTHER redirect within great-international-ui
),
name='international-trade',
),
url(
r'^investment-support-directory/$',
QuerystringRedirectView.as_view(url='/international/investment-support-directory/'),
name='international-investment-support-directory-home',
),
url(
r'^investment-support-directory/(?P<path>[\w\-/]*)/$',
QuerystringRedirectView.as_view(
url=build_great_international_url('investment-support-directory/%(path)s/'),
# Note that this then has a FURTHER redirect within great-international-ui
),
name='international-investment-support-directory',
),
url(
r'^story/york-bag-retailer-goes-global-via-e-commerce/$',
QuerystringRedirectView.as_view(url='/success-stories/york-bag-retailer-goes-global/'),
),
url(
r'^story/hello-babys-rapid-online-growth/$',
QuerystringRedirectView.as_view(url='/success-stories/hello-babys-rapid-online-growth/'),
),
]


Expand Down
2 changes: 1 addition & 1 deletion contact/templates/domestic/contact/step.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 class="heading-large">Tell us how we can help</h1>

{% block body_js %}
{{ block.super }}
<script type="text/javascript" src="{% static 'js/dit.components.toggleOther.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/dit.components.toggleOther.js' %}"></script>
<script type="text/javascript">
var companyTypeOther = document.getElementById('id_company_type_1');
var otherInputs = document.getElementById('id_company_type_other-container');
Expand Down
9 changes: 9 additions & 0 deletions core/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,12 @@ class AdvantageBlock(blocks.StructBlock):

class Meta:
icon = 'plus'


class TopicPageCardBlock(blocks.StructBlock):
"""Used in ManuallyConfigurableTopicPage"""

link_text = blocks.CharBlock()
link_url = blocks.CharBlock() # not a URL block to allow relative links
image = ImageChooserBlock(required=False) #  alt text lives on the custom Image class
description = blocks.TextBlock()
6 changes: 6 additions & 0 deletions core/cms_slugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@
PRIVACY_NOTICE_URL = '/privacy-notice/'
PRIVACY_POLICY_URL = '/privacy-and-cookies/'
TERMS_URL = '/terms-and-conditions/'

# The following are _not_ actually in the CMS but are TEMPORARILY referencing
# paths on the BAU/V1 infrastrcture, so are as brittle as CMS slugs can be.
# These ones will be removed when the V1->V2 migration is complete
CONTACT_URL = '/contact/'
FEEDBACK_CONTACT_URL = '/contact/feedback/'
Loading

0 comments on commit 5b2aa66

Please sign in to comment.