Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Configs! step vs tour vs global vs defaults #67

Open
eoneill opened this issue Mar 13, 2014 · 3 comments
Open

Configs! step vs tour vs global vs defaults #67

eoneill opened this issue Mar 13, 2014 · 3 comments

Comments

@eoneill
Copy link
Contributor

eoneill commented Mar 13, 2014

this sounds like a mess, we should have a consistent interface for setting hopscotch configs at each level

@kate2753
Copy link
Contributor

+1

@timlindvall
Copy link
Collaborator

As part of breaking things apart in #72, I could see us creating a config class that acts as an accessor for other components to read from or set to. Probably similar to HopscotchBubble, each callout or Hopscotch would own its own config class. Or maybe HopscotchBubble creates its own config instance when it's created.

Dunno if there are any utils that are relying on global configs, though. We'll have to explore this more and see what relies on configs and where their configs are coming from. In general, though, does the above sound like it's going in the right direction?

@kate2753
Copy link
Contributor

kate2753 commented Oct 1, 2015

I've created a simple version of the config on gh72 branch

https://github.com/linkedin/hopscotch/blob/gh72/src/es/modules/config.js

The idea with this approach is that config can inherit from another config. So we will have a hierarchy of configs defaultConfig, globalConfig (hopscotch.configure), tourConfig (tour level options) and calloutConfig(standalone callout options, or specific step options. Inherits from globalConfig if it's a standalone callout).

We still need unit tests for this module, but it's 70% there :)

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