Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

mailing-list enhancements #107

Open
2 tasks
SaFrMo opened this issue Dec 5, 2018 · 3 comments
Open
2 tasks

mailing-list enhancements #107

SaFrMo opened this issue Dec 5, 2018 · 3 comments

Comments

@SaFrMo
Copy link
Contributor

SaFrMo commented Dec 5, 2018

From @drewbaker :

Normally clients want it to show X times before never showing again for Y days, and if they have submitted it successfully, then never show again. But then often times we'd use the same component on the contact page, or in a menu, so we need a way to force show it too.

  • Add timesToShow prop to show X times before hiding for cookieLength days
  • Add removeOnSuccess prop to hide permanently on success
@SaFrMo SaFrMo assigned SaFrMo and unassigned SaFrMo Dec 5, 2018
@drewbaker
Copy link
Member

And we need to be able to "always show" the same component, like if it's used in the footer o a contact page, or there is a "subscribe" button in the menu that anyone can click.

@johndigital
Copy link
Contributor

Does it make sense to have logic setting cookies and localstorage on this component? Seems like we should split out that type of functionality into a road-block component or something like that. mailing-list was really just intended to deal with relaying info back and forth from Mailchimp or other newsletter services and parsing the responses in a uniform way.

Since a mailing list doesn't always have to live within a roadblock but often can, I imagine we could set it up as 2 components and then do this easily:

<road-block timesToShow="3" removeOnSuccess >
  <mailing-list />
</road-block>

That way pretty much anything can go in the roadblock and it only deals with the logic of cookies, repeated use, etc.

Relatedly, I have also struggled a bit with the way mailing-list is set up. The markup is difficult to control because it's hard-coded in the component. The slots help but I rarely get it to look exactly the way it should without some weird hacking. Have you guys experienced the same thing? Would it make more sense as a mixin that only really handles the logic and not the template?

@drewbaker
Copy link
Member

I agree that <road-block as it's own component makes a lot more sense. That would be way more flexible, and we could put anything in it (like an age-checker). Lets do that!

I think the <mailing-list> component is good. I've told design team to only design a mailing list form that is basically the same all the time, so it's worked great. John is if it's Funkhaus work, feel free to change the design a little (or have the team do it). I'd rather that than hacky stuff.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants