plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Show "x" to unfollow vs. "unfollow" button depending on page

Open jywarren opened this issue 7 years ago • 5 comments

We recently made it possible to "unfollow" a topic from a topic card, by pressing the x in the upper right corner:

image

This replaces the former button labelled unfollow (here, in an older screenshot, it says unsubscribe):

image

But topic cards appear in different places. We should have it offer an unfollow button on the https://publiclab.org/tags page, but an x on the dashboard. We can tell what page we're on by comparing the params[:action] and params[:controller] variables. For the dashboard it should be controller: home and action: dashboard, whereas for the /tags page, it should be controller: tag and action: index.

The x button is here:

https://github.com/publiclab/plots2/blob/cc10a02951110f0fed4ae9c15da13c7817ae5e40/app/views/tag/_topicCard.html.erb#L7-L9

We'd love help with this!

jywarren avatar Oct 08 '19 18:10 jywarren

Howdy, i can help with this. Assign it my way.

danielwheeler1987 avatar Oct 09 '19 00:10 danielwheeler1987

That would be great, thank you!

On Tue, Oct 8, 2019, 8:24 PM Daniel Wheeler [email protected] wrote:

Howdy, i can help with this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/6424?email_source=notifications&email_token=AAAF6J5RUVZ7M3KVMRRP6T3QNUQB3A5CNFSM4I6VUFFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAWBCSY#issuecomment-539758923, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAF6J2ZDZBSOSVZ2JPGZETQNUQB3ANCNFSM4I6VUFFA .

jywarren avatar Oct 09 '19 12:10 jywarren

@jywarren I have a PR ready locally... can you grant me permission to push it up? Ty.

danielwheeler1987 avatar Oct 10 '19 04:10 danielwheeler1987

@jywarren please close this issue as the PR has been merged.

seabl avatar Dec 11 '19 00:12 seabl

Thanks, just did that! Thanks all!

jywarren avatar Dec 11 '19 15:12 jywarren