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 new Save page box #2121

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Add new Save page box #2121

merged 1 commit into from
Jun 1, 2021

Conversation

danacotoran
Copy link
Contributor

Add save-this-page component to government-frontend.

The work for this was originally done on the components gem.
However, in the meanwhile it was decided that in the early stages of our experiment, we would only be trialling the component on select pages on the government-frontend app. Adding this as an app-level component at first will ensure that we can iterate on it rapidly in the initial stages (if needed). This code is mostly copied over from the original PR with some fairly significant differences in the tests, as a result of the testing libraries being different.

Nothing renders without a page_path parameter. The component also takes two other optional arguments: page_is_saved and signed_in.

Default (or when the user is signed out)

Screenshot 2021-05-27 at 14 23 27

User is signed in and has not saved this page

Screenshot 2021-05-27 at 14 23 07

User is signed in and has already saved this page

Screenshot 2021-05-27 at 14 23 20


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


https://trello.com/c/ZTr0V9gB/770-implement-a-re-usable-save-unsave-component-corresponding-backend-code-in-government-frontend

@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 May 27, 2021 13:40 Inactive
@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 May 27, 2021 13:45 Inactive
@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 May 27, 2021 14:05 Inactive
@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 May 27, 2021 14:11 Inactive
@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 June 1, 2021 10:55 Inactive
@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 June 1, 2021 11:06 Inactive
@danacotoran danacotoran marked this pull request as ready for review June 1, 2021 11:07
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

Given this a quick frontend sweep and left some non-blocking comments. Great work 👍

app/assets/stylesheets/components/_save-this-page.scss Outdated Show resolved Hide resolved
test/components/save_this_page_test.rb Show resolved Hide resolved
@bevanloon bevanloon temporarily deployed to government-f-save-page--6earw7 June 1, 2021 13:50 Inactive
@barrucadu barrucadu merged commit ce25e41 into main Jun 1, 2021
@barrucadu barrucadu deleted the save_page_box branch June 1, 2021 14:43
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.

5 participants