Skip to content

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

Merged
merged 7 commits into from
Jan 31, 2022

Conversation

xristianstefanov
Copy link
Contributor

  • Added Kb for implementing Carousel Thumbnail Navigation.

@xristianstefanov xristianstefanov requested a review from a team January 28, 2022 15:45
@xristianstefanov xristianstefanov self-assigned this Jan 28, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2022

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.

  • create pr to production

Comment on lines +30 to +33
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.
Copy link
Contributor

@dimodi dimodi Jan 28, 2022

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.

Suggested change
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.

Copy link
Contributor

@dimodi dimodi left a 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

@marin-bratanov
Copy link
Contributor

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.

@github-actions
Copy link
Contributor

Here you are the link to your PR to production: 750

@github-actions github-actions bot deleted the kb-carousel-thumbnail-navigation branch January 31, 2022 11:13
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