-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add landing page tour #1508
Conversation
@@ -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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :/
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>' |
There was a problem hiding this comment.
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
There was a problem hiding this 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
[merge] |
Evaluated for origin web console merge up to 660bb1f |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/1317/) (Base Commit: 513de5a) |
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