-
Notifications
You must be signed in to change notification settings - Fork 3
[TWE-661] Add sticky call to action and new link type for all call to actions #402
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy that the backend changes are good to go and it can be deployed to staging.
Because of the extensive frontend changes I would need to spend more time looking at those changes but that shouldn't hold up the staging testing, it seems to work as expected. If there are other frontend changes needed it's likely to be around how a frontend developer would implement this work.
Ideally a frontend developer should code review this too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @damwaingames - this looks solid overall. There are a few bugs to address, and one product question: do we really need to support multiple modals with iframes on a single page? If yes, we should give it a proper accessibility/keyboard test pass after fixing the issues.
tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/call_to_action.html
Outdated
Show resolved
Hide resolved
tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/call_to_action.html
Outdated
Show resolved
Hide resolved
tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/call_to_action.html
Outdated
Show resolved
Hide resolved
tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/call_to_action.html
Outdated
Show resolved
Hide resolved
tbx/project_styleguide/templates/patterns/atoms/icon_buttons/icon_button.html
Outdated
Show resolved
Hide resolved
tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/call_to_action.html
Outdated
Show resolved
Hide resolved
Albina has updated the code herself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved as all flagged issues from previous review are now addressed
https://torchbox.atlassian.net/browse/TWE-661
Description of Changes Made
A new type of block has been created that is available on any page. It is called a Sticky Call To Action. This creates a small div that floats at the bottom right of the viewport and provides a link based on the same link types as the other Call To Actions.
An additional link type has been created called a Modal iframe, it opens a new modal window with an iframe displaying the contents of the URL that the link is set to. This is intended for use with pipedrive forms but in theory anything that you wanted iframing could be used.
The modal is created using the micromodal package and is as simplistic as possible. It has been added to the two existing CTA templates as well as the new sticky CTA template.No longer requiredHow to Test
On a page you want to add a sticky call to action, you can add a new block, and grouped with the other call to actions you will find the sticky call to action. Add it to the page and enter the text, subtext and choose a link type for the button. The text will be displayed in a bolder weight, the sub text will be displayed in a lighter weight on the line underneath.
The modal iframe link type is now available on all call to action blocks. Once selected it looks like any other external link field, but the contents of the external link will be displayed in an iframe on a modal dialog when the link is clicked.
Screenshots
MR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library