Commit graph

8 commits

Author SHA1 Message Date
Suzanne Aitchison
5efd72040b
change preview card dropdown position depending on viewport (#14473) 2021-08-11 18:40:11 +01:00
Suzanne Aitchison
75b6c8ed96
Use a single listener for all follow buttons on a page (#14246)
* create new pack, handle user follow buttons, use pack on article page, remove initializeUserFollowButts

* init all follow button types, add pack to tag index and podcast episode pages

* add pack to all relevant pages, listen for newly inserted follow buttons

* change to searchParams to remove follow button initializer calls

* fix bug with tag page, add pack to notifications page

* fix issue with follow back inner text

* update cypress specs

* run the followbuttons code on sponsors page

* remove extra foreach

* add test for follow from article sidebar

* add test for follow and unfollow tag

* add test for the tag index page

* add spec for organisation profile follow

* add tests for follow buttons in search results

* add tests for notification follows

* commit missed file - woops

* show login modal if user is logged out when they click

* add cypress tests for logged out state

* change tag button initialization

* remove data-button-initialized

* init follow buttons from base pack

* handle the case where multiple follow buttons exist on a page for the same user

* account for instantclick and userdata not being defined, lower coverage for jest

* use getInstantClick

* fix issue with set initialisation

* only listen for mutations in areas we know follow buttons may be added dynamically

* small refactors
2021-07-27 10:45:50 +01:00
rhymes
a118b9095a
Add JSON representation of Profile Preview Card info (#14296)
* Add tests and Railsify a few things

* Adds JSON representation of ProfilePreviewCardsController

* Load profile and setting eagerly

* Add profile preview card color
2021-07-21 16:23:54 +01:00
Suzanne Aitchison
1adf66260d
Delay the hover appearance of preview card (#14222)
* delay the hover appearance of preview card

* don't run animation if the dropdown is already held open by click

* wake up travis

* Trigger Travis CI

* remove unncessary document queries
2021-07-21 11:15:10 +01:00
Suzanne Aitchison
904d9846a5
use userId in path, remove need to pass preview card id (#14171) 2021-07-12 13:09:12 +01:00
Suzanne Aitchison
6a93ad914a
fetch preview card follow buttons in one network call (#14085)
* fetch preview card follow buttons in one network call

* when new comment is submitted, only fetch new comment status

* make sure individual button follow requests continue to init

* Add follow-user class to all follow user buttons via the application helper

Co-authored-by: mstruve <mollylbs@gmail.com>
2021-07-09 09:24:57 +01:00
Suzanne Aitchison
845a5fade5
Profile Preview Cards (RFC#222) - author name in comments (#14056)
* show dropdowns on pre-existing comments

* show preview on comments, v rough version of showing preview on recently added comments

* tidy up error, add some comments

* show the ama icon when appropriate

* add to comment on article cypress spec

* add test for preview card on article comment

* tidy up

* small refactors

* wait for button init in cypress test

* add test for article author byline on organization post

* Trigger CI builds

* Trigger CI builds
2021-06-25 10:05:37 +01:00
Suzanne Aitchison
7e322e4f7b
Optimise dropdowns for accessibility - Post comments and share (#13868)
* WIP - basic init of comment dropdowns with open and close on click

* WIP - initialize the share dropdown

* initialize all post dropdowns within packs, init copy to clipboard announcer

* refactor and add JSDocs to helper

* undo changes to base jsx

* update accessible name of post actions button in cypress test

* make sure dropdowns pack loaded on comment index page

* undo prettier changes in base jsx

* undo prettier changes in base jsx

* initialize comment dropdowns in podcasts

* add test for the post actions

* add article comment tests

* add cypress tests for comment dropdowns
2021-06-03 09:13:17 +01:00