Skip to content

Add landing page tour #1508

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

Merged
merged 1 commit into from
May 3, 2017
Merged

Conversation

jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented May 3, 2017

https://trello.com/c/oveRlqqd

Launched via:
First user visit to the landing page
‘Take Home Page Tour’ button on landing page (less than 2 projects)
‘Tour Home Page’ menu item from the help menu

@@ -47,4 +61,31 @@ angular.module('openshiftConsole')
// add the item to recently-viewed. No-op if the dialog is not open.
addTemplateToRecentlyViewed();
});

function dataLoaded() {
if (tourConfig && tourConfig.enabled && tourConfig.steps) {
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to calculate this once above and remember so we don't have the same logic twice in the same controller.

I think an early return is easier to understand here instead of nested if statements.

if (!tourEnabled) {
  return;
}

if ($routeParams.startTour) ...

// Reset the route params in the next digest cycle
$timeout(function() {
$location.replace();
$location.search('startTour', null);
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to remove the startTour query parameter? I might just leave it. This doesn't cause the route to reload, does it?

Copy link
Member

Choose a reason for hiding this comment

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

I guess it might be bad if someone bookmarked the page :/

Copy link
Member Author

Choose a reason for hiding this comment

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

It does look like it is reloading now that you mention it.

Copy link
Member

Choose a reason for hiding this comment

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

@jeff-phillips-18 You should be able to add reloadOnSearch: false to the route in app.js

Copy link
Member Author

Choose a reason for hiding this comment

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

That prevents the tour from launching if it is already on the landing page.

options.push(
{
type: 'dom',
node: '<li><a href="./#?startTour=true" >Tour Home Page</a></li>'
Copy link
Member

@spadgett spadgett May 3, 2017

Choose a reason for hiding this comment

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

Should this be ./?startTour=true with no #?

Nit: extra space before >

Launched via:
First user visit to the landing page
‘Take Home Page Tour’ button on landing page (less than 2 projects)
‘Tour Home Page’ menu item from the help menu
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

Thanks @jeff-phillips-18. Please open an issue for the page reloading

@spadgett
Copy link
Member

spadgett commented May 3, 2017

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to 660bb1f

@openshift-bot
Copy link

openshift-bot commented May 3, 2017

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1317/) (Base Commit: 513de5a)

@openshift-bot openshift-bot merged commit 9f15b0a into openshift:master May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants