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

Development #143

Merged
merged 131 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
c0d428f
Added test project
May 9, 2024
9a4af93
Added ADR docs
May 13, 2024
75c19a1
Added basic unit tests
May 13, 2024
adc78b6
Merge pull request #76
ThomasWhittington May 13, 2024
a36deae
added ADR
May 13, 2024
3b65640
merge
May 13, 2024
f7178c5
Merge pull request #78 from DFE-Digital/feature/adr
simonjfirth May 13, 2024
d8efabd
updated folder structure
May 13, 2024
75d03ee
restructure
May 13, 2024
1477325
Added architecture diagram
May 13, 2024
3d68674
More unit tests
May 15, 2024
d1eb7aa
Added DI test
May 15, 2024
15e4490
Merge pull request #79 from DFE-Digital/feature/_rework/testing
ThomasWhittington May 15, 2024
3907b0e
Added contentful model for richtext
May 20, 2024
c7439e2
Merge pull request #81 from DFE-Digital/feature/_rework/model
ThomasWhittington May 20, 2024
e7c0a4c
Updated content service (#82)
ThomasWhittington May 23, 2024
b882a40
Created contentful stub
May 24, 2024
6e8a5fc
Updated to query builder
May 24, 2024
2bd2621
Add renderer for rich text content (#75)
jack-coggin May 24, 2024
6b5894d
updated e2e and app settings
May 24, 2024
4b53768
Merge remote-tracking branch 'origin/feature/rework' into feature/con…
May 24, 2024
748461f
Merge pull request #84 from DFE-Digital/feature/contentful-stub
simonjfirth May 24, 2024
6b75869
Updated tests
ThomasWhittington May 28, 2024
650977f
Feature/ rework/linking (#86)
ThomasWhittington May 30, 2024
7363e0a
wip: render linked entry and asset from within rich text
jack-coggin Jun 6, 2024
8cc086a
wip: render download component
jack-coggin Jun 6, 2024
02e3b0c
display corresponding icon for download filetype
jack-coggin Jun 7, 2024
cf133a6
update e2e tests
jack-coggin Jun 10, 2024
99967c2
Feature/ rework/embedded entries (#87)
ThomasWhittington Jun 11, 2024
75bd6a4
Merge branch 'feature/rework' into feature/download-component
jack-coggin Jun 11, 2024
6c737cd
update entry partial
jack-coggin Jun 11, 2024
b6a448d
revert ContentService changes
jack-coggin Jun 11, 2024
7c18842
use target variable in entry partial
jack-coggin Jun 12, 2024
8b47734
tweak entry partial
jack-coggin Jun 12, 2024
546824d
update file icons
jack-coggin Jun 12, 2024
c9f083d
Merge pull request #88 from DFE-Digital/feature/download-component
jack-coggin Jun 12, 2024
cebefc2
Added terraform scripts
Jun 13, 2024
9fd7056
add accordion component
jack-coggin Jun 13, 2024
6fbd22e
Added workflows and actions
Jun 13, 2024
f15d4cc
adding missing WAF and updated contentful environment
Jun 13, 2024
0e1b63b
update integration tests
jack-coggin Jun 14, 2024
637bb25
wip: add accessibility tweaks, accessibilty tests and page layout upd…
jack-coggin Jun 14, 2024
1f0ad01
Added support for cards and grid containers. Updated dfeFrontend to 2…
ThomasWhittington Jun 14, 2024
113c576
Merge branch 'feature/rework' into feature/accordion-component
jack-coggin Jun 17, 2024
14fa189
Merge branch 'feature/rework' into a11y
jack-coggin Jun 17, 2024
b62182c
use dfe container width and update header styling
jack-coggin Jun 17, 2024
0b54167
updated workflow
simonjfirth Jun 17, 2024
6845b17
TF changes to get inital build going
Iain-Stanger Jun 18, 2024
c142aee
merge
Iain-Stanger Jun 18, 2024
ffeccc6
fixed tflint
simonjfirth Jun 18, 2024
a9ecc9b
removed unused vars from pr-check
simonjfirth Jun 18, 2024
8420f2f
added dev environment
simonjfirth Jun 18, 2024
51c7c07
lock updated
simonjfirth Jun 18, 2024
d976dd5
reformatted locals.tf
simonjfirth Jun 18, 2024
584e98f
terraform-docs: automated action
github-actions[bot] Jun 18, 2024
32ac0d3
Merge pull request #90 from DFE-Digital/feature/terraform-workflows
simonjfirth Jun 18, 2024
35b00b0
include hero in header
jack-coggin Jun 18, 2024
b1bfef0
fix e2e tests
jack-coggin Jun 18, 2024
66ebdad
Merge pull request #89 from DFE-Digital/feature/accordion-component
jack-coggin Jun 18, 2024
6bbc904
Updated JS + CSS files
github-actions[bot] Jun 19, 2024
a89b26a
add support for multiple accordion sections
jack-coggin Jun 19, 2024
1e1dccf
resolve assets for e2e testing
jack-coggin Jun 19, 2024
0da9ec0
Merge pull request #95 from DFE-Digital/feature/accordion-sections
jack-coggin Jun 20, 2024
013589e
Merge branch 'Development' into frontend-tweaks
jack-coggin Jun 20, 2024
083959f
Merge pull request #92 from DFE-Digital/frontend-tweaks
jack-coggin Jun 20, 2024
05a5e3e
Capitalise development branch name (#93)
simonjfirth Jun 24, 2024
846b2c8
Feature/app insights (#97)
simonjfirth Jun 25, 2024
96df3b2
Feature/vault (#98)
simonjfirth Jun 25, 2024
4f564ed
modifed matrix deloy (#100)
simonjfirth Jun 26, 2024
2a3b497
Updated workflow so it can be manually fired (#102)
simonjfirth Jun 26, 2024
75e2ebd
Adding landing page (#104)
simonjfirth Jun 27, 2024
dc9458e
Added mapping layer to produce cleaner models (#96)
ThomasWhittington Jul 1, 2024
da53160
Added basic caching layer (#106)
ThomasWhittington Jul 3, 2024
b9ea2ef
Added cache clear endpoint and ignoring cache when in preview (#107)
ThomasWhittington Jul 8, 2024
e83a9a7
add gtm and clarity tracking to application
jack-coggin Jul 9, 2024
4a3aa3a
remove unnecessary ms clarity tag
jack-coggin Jul 10, 2024
57569ac
Merge pull request #108 from DFE-Digital/feature/tracking
jack-coggin Jul 10, 2024
9f9eae2
add cookie consent banner
jack-coggin Jul 12, 2024
9e4a700
remove comments
jack-coggin Jul 12, 2024
8c003a9
change consent cookie values to true or false
jack-coggin Jul 16, 2024
5397ded
Merge pull request #109 from DFE-Digital/feature/cookie-consent-banner
jack-coggin Jul 16, 2024
4fccc5e
add download last updated date and update styling
jack-coggin Jul 19, 2024
e14a85b
Feature/model mapping refactor (#110)
ThomasWhittington Jul 22, 2024
17d77a2
Feature/plantech prep (#112)
ThomasWhittington Jul 22, 2024
5966c15
Made app settings not publish
Jul 22, 2024
af75d14
Removed some code smells
Jul 23, 2024
61f1f96
Explicit types in tests
Jul 24, 2024
4949241
Feature/update contentful (#113)
simonjfirth Jul 24, 2024
0e300b8
Cleaned up some more smells (#114)
ThomasWhittington Jul 24, 2024
6882284
Hidden cookie banner (#115)
ThomasWhittington Jul 25, 2024
a17b612
Added default page to handle base route (#116)
simonjfirth Jul 31, 2024
68bf0cc
feat: removed header text (#117)
ThomasWhittington Aug 1, 2024
9a648c0
feat: allowed accordions to display richtext (#118)
ThomasWhittington Aug 1, 2024
39b881d
feat: added support for excel sheets (#119)
ThomasWhittington Aug 1, 2024
d4f714a
feat: added back to top button (#120)
ThomasWhittington Aug 1, 2024
c3edfe8
Merge branch 'development' into feature/download-updated-date
jack-coggin Aug 2, 2024
0ff517c
Update download component mapping and styling
jack-coggin Aug 2, 2024
216f94a
Merge branch 'Development' into feature/download-updated-date
jack-coggin Aug 2, 2024
4717926
Merge pull request #111 from DFE-Digital/feature/download-updated-date
jack-coggin Aug 2, 2024
6c7ee39
Added citation block (#121)
ThomasWhittington Aug 5, 2024
54fde58
feat: use current tab (#122)
ThomasWhittington Aug 5, 2024
8b49d3e
Updated styling to elements and added missing classes (#123)
simonjfirth Aug 7, 2024
d346c5a
resolved merge issues
simonjfirth Aug 7, 2024
80c7119
Merge branch 'Development' of https://github.com/DFE-Digital/sts-cont…
simonjfirth Aug 7, 2024
b7d30ef
feature: add feedback banner to all pages
jack-coggin Aug 9, 2024
4dcf1bd
Removed route sitemap base route which was causing a multiple route m…
simonjfirth Aug 9, 2024
bf039f8
Merge branch 'Development' into feature/feedback-banner
jack-coggin Aug 9, 2024
387ea9a
Resolved conflict
simonjfirth Aug 12, 2024
ad88f86
Merge branch 'Development' into feature/feedback-banner
jack-coggin Aug 12, 2024
2e21292
add thankyou message to feedback banner
jack-coggin Aug 13, 2024
c562af1
feat: render or hide feedback banner based on contentful boolean
jack-coggin Aug 13, 2024
8aa8ada
wip: reenable content cookies to test conditional rendering for feedb…
jack-coggin Aug 13, 2024
5a31ff6
Feature/side nav (#128)
simonjfirth Aug 14, 2024
c682631
Changes from development
Aug 14, 2024
286c2dd
remove comment
jack-coggin Aug 15, 2024
c4aa7af
Merge remote-tracking branch 'origin/feature/feedback-banner' into fe…
jack-coggin Aug 15, 2024
3d5b0d5
Added basic print button (#130)
ThomasWhittington Aug 15, 2024
8747b24
Merge branch 'Development' into feature/feedback-banner
jack-coggin Aug 15, 2024
a3a5fc7
Merge pull request #126 from DFE-Digital/feature/feedback-banner
jack-coggin Aug 15, 2024
ec53e48
add plan tech name to header (#131)
jack-coggin Aug 16, 2024
b4327ce
Tidy up (#132)
simonjfirth Aug 16, 2024
6ac4075
Merged main into development
Aug 16, 2024
3d7f934
Added basic sonar check (#135)
ThomasWhittington Aug 16, 2024
33e0d0e
feat: update beta banner feedback link
jack-coggin Aug 19, 2024
3cfeb18
Merge pull request #136 from DFE-Digital/feature/update-feedback-form…
jack-coggin Aug 19, 2024
0b2138f
feat: added basic retry on contentful api calls (#137)
ThomasWhittington Aug 19, 2024
ba85fd5
Added support for plantech cookies (#139)
ThomasWhittington Aug 20, 2024
0c566e4
Added new blocks and some refactors (#138) (#141)
ThomasWhittington Aug 20, 2024
e9391bd
Merge branch 'main' of https://github.com/DFE-Digital/sts-content-sup…
Aug 20, 2024
32dfc37
Added new blocks and some refactors (#138) (#142)
ThomasWhittington Aug 20, 2024
1fab005
Merge branch 'Development' of https://github.com/DFE-Digital/sts-cont…
Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/Dfe.ContentSupport.Web/Views/Shared/_CookieConsent.cshtml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
@using Microsoft.AspNetCore.Http.Features

@{
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
var cookieString = consentFeature?.CreateConsentCookie();
var showBanner = Context.Request.Cookies[".AspNet.Consent"] is null;
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
var cookieString = consentFeature?.CreateConsentCookie();

var csCookieNotSet = Context.Request.Cookies[".AspNet.Consent"] is null;
var ptCookieNotSet = Context.Request.Cookies["user_cookies_preferences"] is null;

var showBanner = csCookieNotSet && ptCookieNotSet;
}

@if (showBanner)
Expand Down Expand Up @@ -37,7 +41,7 @@
</div>
</div>
</region>
<script>
<script nonce="@Context.Items["nonce"]">
(function () {
const buttons = document.querySelectorAll("#cookieConsent button[data-cookie-string]");
buttons.forEach(function (button) {
Expand All @@ -50,4 +54,4 @@
});
})();
</script>
}
}
69 changes: 46 additions & 23 deletions src/Dfe.ContentSupport.Web/Views/Shared/_Feedback.cshtml
Original file line number Diff line number Diff line change
@@ -1,36 +1,59 @@
@using Newtonsoft.Json.Linq
@{
var consentCookie = Context.Request.Cookies[".AspNet.Consent"];
var track = consentCookie == "true";
var csTrack = Context.Request.Cookies[".AspNet.Consent"] is "yes" or "true";
bool ptTrack = false;
var ptCookiePreferences = Context.Request.Cookies["user_cookies_preferences"];
if (ptCookiePreferences is not null)
{
var ptTracking = JObject.Parse(ptCookiePreferences)["UserAcceptsCookies"];
if (ptTracking != null)
{
bool.TryParse(ptTracking.ToString(), out ptTrack);
}
}

var track = csTrack || ptTrack;
}

@if (track)
{
<div class="dfe-feedback-banner govuk-!-margin-top-9">
<div class="dfe-feedback-banner--content">
<form id="feedbackForm">
<div class="dfe-feedback-banner--content-questions">
<div class="dfe-feedback-banner--content-question" id="questionForm">
<h2 class="govuk-heading-s dfe-feedback-banner--content-question-text">Is this page
useful?</h2>
<div class="govuk-button-group">
<button type="button" class="govuk-button govuk-button--secondary" value="Yes"
data-module="govuk-button" onclick="handleFeedback('Yes')">Yes</button>
<button type="button" class="govuk-button govuk-button--secondary" value="No"
data-module="govuk-button" onclick="handleFeedback('No')">No</button>
<div class="dfe-feedback-banner govuk-!-margin-top-9">
<div class="dfe-feedback-banner--content">
<form id="feedbackForm">
<div class="dfe-feedback-banner--content-questions">
<div class="dfe-feedback-banner--content-question" id="questionForm">
<h2 class="govuk-heading-s dfe-feedback-banner--content-question-text">
Is this page
useful?
</h2>
<div class="govuk-button-group">
<button id="feedbackYes" type="button" class="govuk-button govuk-button--secondary" value="Yes"
data-module="govuk-button">
Yes
</button>
<button id="feedbackNo" type="button" class="govuk-button govuk-button--secondary" value="No"
data-module="govuk-button">
No
</button>
</div>
</div>
</div>
</div>
<div id="feedbackMessage" class="govuk-body govuk-!-margin-bottom-0" style="display: none;">
Thank you for your feedback.
</div>
</form>
<div id="feedbackMessage" class="govuk-body govuk-!-margin-bottom-0">
Thank you for your feedback.
</div>
</form>
</div>
</div>
</div>

<script>
function handleFeedback(value) {
<script nonce="@Context.Items["nonce"]">
function onAction (){
document.getElementById('questionForm').style.display = 'none';
document.getElementById('feedbackMessage').style.display = 'block';
}

const YesBtn = document.getElementById('feedbackYes')
const NoBtn = document.getElementById('feedbackNo')
YesBtn.addEventListener('click', ()=>onAction());
NoBtn.addEventListener('click', ()=>onAction());
</script>
}
}
Loading
Loading