Skip to content
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

Provide full configuration of underlying Shepherd.Tour JS component #8

Closed
kofronpi opened this issue Feb 6, 2017 · 3 comments
Closed
Labels

Comments

@kofronpi
Copy link
Contributor

kofronpi commented Feb 6, 2017

Right now, the shepherd component is initialized like this:

  var tour = new Shepherd.Tour({
    defaults: {
      classes: '<%= Rails.configuration.abraham.default_theme %>'
    }
  });

It would be great to be able to use all of Shepherd.js options.

Maybe it would be easier to do with PORO Abrahamah tours rather than yml files, just suggesting :)

@jabbett
Copy link
Contributor

jabbett commented Feb 6, 2017

Great question. Is there a way we could do both, i.e. a YAML-driven approach for the simple cases, and a PORO-driven approach for full customization?

My primary motivation for creating Abraham was to simplify the implementation of the most typical product tours, after building them by hand with the same Shepherd configuration each and every time. This way, it becomes possible for non-developer team members to compose and refine tour flow/content. Whatever we do, I want to ensure we maintain that possibility.

@kofronpi
Copy link
Contributor Author

kofronpi commented Feb 7, 2017

I understand the need and think it's great, but I also think it's a great gem for more technical profiles. Convention by default, configuration if needed :)

How could we configure yml vs ruby without checking at each controller call ?

@jabbett jabbett added the idea label Mar 8, 2017
@jabbett
Copy link
Contributor

jabbett commented Oct 16, 2019

@kofronpi FYI, in addressing #22, I'm going to make new Shepherd.Tour() accept a full JSON block from abraham.yml, so you can configure it with anything you like.

Putting JSON into YAML isn't the most beautiful thing to do, but it'll get the job done ;)

For example:

defaults: &defaults
  :tour_options: '{ classPrefix: "abraham-" }'

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

Successfully merging a pull request may close this issue.

2 participants