Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Feature/intro js #322

Merged
merged 7 commits into from
Oct 9, 2015
Merged

Feature/intro js #322

merged 7 commits into from
Oct 9, 2015

Conversation

nlitwin
Copy link
Contributor

@nlitwin nlitwin commented Oct 7, 2015

@parthshah @tladendo @vikasrohit @thabofletcher

Hi all, please review my changes. I want to make sure that the approach I took is acceptable - thanks!


/////////////////

function getIntroData(stateName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain what you are trying to do here ? Is this to determine if a user has already seen this tutorial? If the requirement is to Auto-Start the tutorial - did you try https://github.com/mendhak/angular-intro.js#autostart ? There are other callbacks that we can tap into to mark the intro as viewed - https://github.com/mendhak/angular-intro.js#exit-method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, the goal was to have the IntroJS tutorial start automatically for dashboard, profile.about, and any profile subtrack page that is not copilot. The user should only see it once, and canceling the intro, clicking outside of it, or finishing the intro marks it was "seen". We need to keep track of all 3 intros per user and only show the intros if they are logged in and viewing their own profile.

As for ng-intro-autostart I couldn't get to work because either the elements on the page weren't ready yet or the stateParams weren't ready or both. I thought about using the exit callbacks, but we would have had to use both (because canceling and finishing should both trigger the intro as "seen") and I also realized that no matter what action they take, as long as the intro was initialized, we need to mark it as seen, so we can just mark that in the same place as starting it (lines 42, 49, 56).

nlitwin added a commit that referenced this pull request Oct 9, 2015
@nlitwin nlitwin merged commit ba06b85 into dev Oct 9, 2015
@nlitwin nlitwin deleted the feature/intro-js branch October 9, 2015 00:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy