-
Notifications
You must be signed in to change notification settings - Fork 187
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
Enable tour features #639
Enable tour features #639
Conversation
- Enable tour config feature in main.js - Add jquery-ui dialog - Change name of Google analytics import name to be consistent with codebase
- Add `autoStart: true` to initiate joyride v2.2.0 - Change feedback.js to export default
0962a9c
to
9a7f1c3
Compare
- Remove unsupported data-options - Move depreciated data-option joyride options to html classes - Fix multiple HTML errors in tour.html and format the HTML properly - Create CSS to style the tour windows as they were in previous joyride version* *Note !important classes were used to overwrite !important declarations found in the defauly joyride stylesheets
… into module-loaders-tour
… into module-loaders-tour
- Restore step page indicator - Fix styles related to modal arrow and button hover state
@bking, @localjo I can't seem to get the previous buttons to show up. If you get a chance to break away and look at this feature, here is where I am at: I see joyride examples with previous buttons here: http://zurb.github.io/joyride/ But then I see references to the functionality not working for others, see: And it is nowhere mentioned on the official page: Looking at the version we are running on production, it looks like there was significant modification to the previous button code: Also a few commits related to previous button in the file blame suggest the same If there is no obvious solution here, then it might be best to test the fix linked above, fork the repo, add that fix and then link to our fork in package.json. |
I took a look and agree that a fork is probably necessary. The working example (http://zurb.github.io/joyride/) isn't using Jquery-joyride so maybe the non-jquery version would work for us if it isn't a lot of work to migrate? |
web/css/tour.css
Outdated
@@ -22,6 +22,10 @@ | |||
width: 450px; | |||
} | |||
|
|||
.joyride-close-tip { |
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.
We didn't have custom .joyride
CSS before, and we're including the Joyride stylesheet in this branch already.
We shouldn't have to add custom CSS to our stylesheets to achieve style parity with production. @ZachTRice @Benjaki2 I might have missed something when I included the dependency stylesheets. Maybe the paths aren't correct, or maybe they're in the wrong order or something. Both of you have added dependency styles to stylesheets in your PRs, but I think maybe there's a problem with how I did the CSS originally. Have either of you looked into that?
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.
The version we were using before was modified to add css directly to the plugin. Here is the css blame: https://github.com/nasa-gibs/worldview/blame/master/web/ext/tour/joyride-2.0.3-3/joyride.css
web/pages/tour.html
Outdated
@@ -119,6 +119,7 @@ <h3>Timeline</h3> | |||
<li>Change the interval to "Days" and explore the imagery for that month.</li> | |||
</ul> | |||
</div> | |||
<p class="wv-tour-page-count">(page 1 of 6)</p> |
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.
How were these <p>
tags being added before?
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.
The plugin was a complete hack before. These were added into the core plugin before. There is no native support for this type of functionality.
web/js/feedback.js
Outdated
@@ -30,4 +29,4 @@ export const feedbackModal = (function () { | |||
}; | |||
|
|||
return self; | |||
})(); | |||
})({}); |
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.
Why did you move self
from being defined inside the function to being passed in as a parameter?
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.
Discussed in slack chat; export constant does not work in this case. We can look at changing this to a named function when we do a review. Util functions are setup in a similar manner as this.
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.
Does a naming the function change how parameters are passed in? Before, you could call this function with no parameters, feedbackModal()
, and it would work fine. Now we have to call the function with an empty object for it to work, feedbackModal({})
. Why can't we do var self = {}
inside the function like it was before?
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.
Good call, I have made this change and tested it.
web/js/feedback.js
Outdated
@@ -7,8 +7,7 @@ | |||
|
|||
import util from './util/util'; | |||
|
|||
export const feedbackModal = (function () { | |||
var self = {}; | |||
export default (function (self) { |
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.
Why go from a named export to an unnamed default
export?
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.
Discussed in slack chat; export constant does not work in this case. We can look at changing this to a named function when we do a review. Util functions are setup in a similar manner as this.
- Add fork version of jquery.joyride which is a fork of the npm module jquery.joyride and includes a fix to add previous buttons - Add styling for previous buttons - Add jquery-ui dark theme
- Fix page count position on last step - Fix dialog background from not closing properly - Fix tour completion window appearing when clicking previous on last step - Add css to move nub position to the right on the last tour step
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.
Looks good to me!
This is a WIP...
Changes in this pull request:
autoStart: true
to initiate joyride v2.2.0Note*: The previous version of joyride was customized directly to add this feature:
https://github.com/nasa-gibs/worldview/search?utf8=%E2%9C%93&q=wv-tour-page-count