-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 patron action icons in book page sidebar #6575
Add patron action icons in book page sidebar #6575
Conversation
- Decouple review modal link from star ratings component - Pass link content to modal templates - Rename `SocialShare.html` to `ShareModal.html` - Remove old share links section from sidebar - Place new, unstyled, modal link component beneath star ratings in sidebar - Add minimized SVG icons for notes and share modal links
- Moves `data-context` object to the modal content - Generalizes some modal JS functions
- Replace `review.png` with SVG - Add horizontal rule above links - Adjust modal cotent styling - Remove dead styles from shareLinks.less
@mekarpeles, I've changed the base branch from |
looks great to me -- @jimchamp and I walked through commit by commit during 1:1 He mentioned possible issue if patrons have js disabled (share modal won't pop up) Maybe in a future PR, if nojs enabled, then show those share icons on the page in place of / instead of the current action items which all require js. |
Closes #6557
Builds upon #6469
Replaces giant button that opens the share modal with a small icon with text. Creates similar icons for reviews and notes modals, and places all three icons beneath the star ratings component.
Removes review icon link from star ratings component.
Technical
A few things:
Modal link templates have been modified such that the markup for the triggering link is passed as an argument (as opposed to passing the anchor's content). This should give us more flexibility when using these templates in the future.
data-context
in modal link components is now attached to the modal content (instead of the triggering<a>
element, which no longer exists in modal templates).A guard has been added in order to prevent the review component from rendering when the patron is not logged in. The review component requires a logged in user to operate properly.
Click listeners for the share modal link have been moved to
models/index.js
. This file contains the client-side functionality for our notes and reviews modal links. Modal triggering function in this file are now more generalized, and can be used by components that do not includedata-context
attributes.If you see the old share image while testing, you may need to clear your browser's image cache. This was an issue I encountered in FF.
New Google Analytics events have been created for the icon links:
Testing
While logged in:
While logged out:
Screenshot
Stakeholders