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

Add save page box to templates #2126

Merged
merged 2 commits into from
Jun 15, 2021
Merged

Add save page box to templates #2126

merged 2 commits into from
Jun 15, 2021

Conversation

danacotoran
Copy link
Contributor

@danacotoran danacotoran commented Jun 2, 2021

This adds the save this page component to various templates in government-frontend.
We've introduced a feature flag to enable this feature, which will be enabled in staging and disabled in production.

Also adds a success_alert to the top of the application template which will provide a confirmation that the page has been saved (or unsaved, respectively) to the user's saved pages.


https://trello.com/c/mjlS9oaX/811-put-the-button-on-government-frontend-pages
https://trello.com/c/611hsn9y/812-add-the-green-save-a-page-confirmation-box-to-government-frontend


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 2, 2021 15:05 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from e8fec56 to b6e0eb7 Compare June 2, 2021 15:21
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 2, 2021 15:22 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from b6e0eb7 to 2688876 Compare June 2, 2021 15:48
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 2, 2021 15:48 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 3, 2021 15:22 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 3, 2021 15:33 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 4, 2021 11:23 Inactive
@huwd huwd force-pushed the add-save-page-box-to-templates branch from d08d71f to da416ae Compare June 4, 2021 12:20
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 4, 2021 12:20 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from da416ae to 3408b5c Compare June 4, 2021 14:40
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 4, 2021 14:40 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from 3408b5c to d83f32c Compare June 4, 2021 16:08
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 4, 2021 16:09 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from d83f32c to cbb7fb1 Compare June 7, 2021 09:17
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 7, 2021 09:18 Inactive
@huwd huwd force-pushed the add-save-page-box-to-templates branch from cbb7fb1 to e8eefe4 Compare June 8, 2021 14:38
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 8, 2021 14:39 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 9, 2021 09:16 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from 13c8ff3 to b6fd683 Compare June 9, 2021 09:26
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 9, 2021 09:27 Inactive
@huwd huwd force-pushed the add-save-page-box-to-templates branch from b6fd683 to 56a64dc Compare June 9, 2021 13:43
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 9, 2021 13:44 Inactive
@huwd huwd force-pushed the add-save-page-box-to-templates branch from 56a64dc to 5bcfe85 Compare June 9, 2021 13:51
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 9, 2021 13:51 Inactive
@huwd huwd marked this pull request as ready for review June 9, 2021 13:53
@huwd huwd force-pushed the add-save-page-box-to-templates branch from 5bcfe85 to 0e91126 Compare June 9, 2021 14:02
@huwd huwd force-pushed the add-save-page-box-to-templates branch from 25e5537 to a355b0a Compare June 11, 2021 15:28
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 11, 2021 15:28 Inactive
@huwd huwd force-pushed the add-save-page-box-to-templates branch from a355b0a to fc78ba4 Compare June 11, 2021 15:40
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 11, 2021 15:40 Inactive
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have given the FE bits a quick look. Mostly indentation points and a few questions, otherwise looks good.

} do %>
<div class="govuk-grid-column-two-thirds">
<div class="content-bottom-margin">
<div class="responsive-bottom-margin">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of margin being applied around these elements. Something to consider for future tidying perhaps is to have the margin on the components themselves. This might require more work, so non-blocking - the existing margin framework might need to be added to the components being used here, but it would make the markup cleaner and the code more readable.

app/views/content_items/case_study.html.erb Outdated Show resolved Hide resolved
app/views/content_items/case_study.html.erb Show resolved Hide resolved
app/views/content_items/news_article.html.erb Outdated Show resolved Hide resolved
app/views/layouts/application.html.erb Outdated Show resolved Hide resolved
app/views/shared/_save_page_confirmation.html.erb Outdated Show resolved Hide resolved
test/controllers/save_a_page_test.rb Show resolved Hide resolved
@huwd huwd force-pushed the add-save-page-box-to-templates branch from fc78ba4 to b8ee7d4 Compare June 14, 2021 10:51
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 14, 2021 10:51 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 14, 2021 13:07 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from 3a12c70 to 95f18d0 Compare June 14, 2021 13:38
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 14, 2021 13:38 Inactive
@danacotoran danacotoran force-pushed the add-save-page-box-to-templates branch from 95f18d0 to 521ae01 Compare June 15, 2021 09:29
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 15, 2021 09:29 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 15, 2021 13:26 Inactive
@huwd huwd force-pushed the add-save-page-box-to-templates branch from e9fbbf1 to 602f0d4 Compare June 15, 2021 13:44
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 15, 2021 13:44 Inactive
@huwd huwd requested review from andysellick and barrucadu June 15, 2021 13:45
Squashes:
- Adding The Save a Page box with a partial
- Using GOV.UK personalisation gem to pull in shared account helpers
- Conditional rendering of the box based on feature flag, logged in
status and existance of a saved page

Co-authored-by: Dana Cotoran <[email protected]>
Co-authored-by: Huw Diprose <[email protected]>
@huwd huwd force-pushed the add-save-page-box-to-templates branch from 602f0d4 to 80acb2e Compare June 15, 2021 13:48
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 15, 2021 13:49 Inactive
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 15, 2021 14:51 Inactive
Saved pages now renders a confirmation banner based on a personalisation
parameter sent back in the response from frontned

Co-authored-by: Dana Cotoran <[email protected]>
Co-authored-by: Huw Diprose <[email protected]>
@huwd huwd force-pushed the add-save-page-box-to-templates branch from 4b30ef9 to adabd17 Compare June 15, 2021 15:00
@bevanloon bevanloon temporarily deployed to government-f-add-save-p-el4f4a June 15, 2021 15:01 Inactive
@huwd huwd merged commit 9dce927 into main Jun 15, 2021
@huwd huwd deleted the add-save-page-box-to-templates branch June 15, 2021 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants