Skip to content

Request: amendment to https://github.com/emberjs/rfcs/pull/391 #789

Open

Description

@NullVoxPopuli

This has come up a bit as I've been discussing emberjs/ember.js#19271 and #391 with folks.

as is, I don't think #391's anchor-listener is able to be implemented as default behavior.

Mainly due to analytics.
I made a demo here showing that willRouteChange can be used for a lot of things.
But, if you want to do A/B testing with different call-to-action phrasings, we need some way to hook in to the transition/navigation logic (so that we can grab the clicked text)

I'd like to propose a couple options:

  • an additional event on the router service, for handling click events (to grab the text of the anchor, for example)
  • passing the any potential "meta" along with the arguments of willRouteChange and didRouteChange events (and having the clicked element as a part of that "meta")

Activity

  1. sandstrom commented on Jan 29, 2022

    @sandstrom
    Contributor

    Good idea!

  2. wagenet commented on Jul 23, 2022

    @wagenet
    Member

    @NullVoxPopuli is anything stopping you from making a draft RFC for this?

  3. NullVoxPopuli commented on Jul 23, 2022

    @NullVoxPopuli
    SponsorContributorAuthor

    time / motivation / work priorities 😅

  4. wagenet commented on Jul 23, 2022

    @wagenet
    Member

    Unless I'm misreading things, this doesn't strike me as a particularly hard RFC to write. Is there any way we could make the process simpler?

  5. NullVoxPopuli commented on Jul 23, 2022

    @NullVoxPopuli
    SponsorContributorAuthor

    I think in this particular case, it needs some planning / thinking through more use cases -- and then if the polaris / post-polaris routing efforts affect this? 🤔

    having a lot of uncertainty around that kinda makes me feel uncertain about any routing changes at all -- which isn't good for anyone 🙃

  6. wagenet commented on Jul 23, 2022

    @wagenet
    Member

    @NullVoxPopuli on the one hand, I get that uncertainty here isn’t great. On the other, I’ve looked at the Router code and it’s very clear why nobody has made any significant changes recently! If a revamped router actually ships in timely fashion, I’d be thrilled!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions