-
Notifications
You must be signed in to change notification settings - Fork 75
kb(carousel):thumbnail scrollable navigation #743
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
Conversation
xristianstefanov
commented
Jan 28, 2022
- Added Kb for implementing Carousel Thumbnail Navigation.
Hello @xristianstefanov, Check the below option if you would like to automatically generate PR to production. The automation uses the branch for the cherry-pick, and then will delete the branch. Please, do not delete it manually.
|
1. Add HTML `<div>` container under the `Carousel` markup. | ||
2. Apply custom CSS with the needed styles to the container. | ||
3. Inside the `<div>`, loop through all the images in `Carousel` and define them in a smaller size. | ||
4. Optionally, use a javascript function that keeps the synchronization of the `AutomaticPageChange` and the thumbnail. |
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 to-do list contains too much low-level advice, but lacks the conceptual stuff.
1. Add HTML `<div>` container under the `Carousel` markup. | |
2. Apply custom CSS with the needed styles to the container. | |
3. Inside the `<div>`, loop through all the images in `Carousel` and define them in a smaller size. | |
4. Optionally, use a javascript function that keeps the synchronization of the `AutomaticPageChange` and the thumbnail. | |
1. Render the thumbnails in a `<div>` container under the `Carousel`. | |
1. Use a `click` handler for the thumbnails to page the Carousel programmatically. | |
1. Optionally, use JavaScript to synchronize the scroll position of the thumbnails with the current Carousel page. This applies to the case when the user pages the Carousel with the built-in component buttons. |
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.
Updated the example code to:
- include the JS code in the Razor file.
- demonstrate thumbnail scrollability - when you implement a nice hack, make it show
Add a note that the js function belongs to a proper place and the supress-error hack is a hack for development. Consider commenting out the console.log calls in it. |
Co-authored-by: Dimo Dimov <[email protected]>
Co-authored-by: Dimo Dimov <[email protected]>
Co-authored-by: Dimo Dimov <[email protected]>
Here you are the link to your PR to production: 750 |