Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Sep 10, 2025

Summary

  • replace vanilla DOM queries in flash-deals countdown with jQuery APIs
  • swap IntersectionObserver-based scroll video playback for a jQuery scroll handler
  • rework lookbook modal triggers to load and show content using jQuery

Testing

  • npm test (fails: Could not read package.json)
  • composer validate

https://chatgpt.com/codex/tasks/task_e_68c1b066aca08322b70636af1d2d243a

@CySSoO CySSoO merged commit c05604e into master Sep 10, 2025
0 of 4 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 372 to 388
// Lookbook modal triggers
document.querySelectorAll('[id^="block-"][data-lookbook-url]').forEach(function(block) {
var ajaxUrl = block.getAttribute('data-lookbook-url');
var blockId = block.id.replace('block-', '');
var modalEl = document.getElementById('lookbook-modal-' + blockId);
if (!modalEl) {
$('[id^="block-"][data-lookbook-url]').each(function() {
var $block = $(this);
var ajaxUrl = $block.data('lookbook-url');
var blockId = this.id.replace('block-', '');
var $modal = $('#lookbook-modal-' + blockId);
if (!$modal.length) {
return;
}
var modalBody = modalEl.querySelector('.modal-body');
var bootstrapModal = window.bootstrap ? new bootstrap.Modal(modalEl) : null;
block.querySelectorAll('.lookbook-marker').forEach(function(marker) {
marker.addEventListener('click', function(e) {
e.preventDefault();
var productId = marker.getAttribute('data-product-id');
fetch(ajaxUrl + '&id_product=' + productId)
.then(function(resp) { return resp.text(); })
.then(function(html) {
modalBody.innerHTML = html;
if (bootstrapModal) {
bootstrapModal.show();
} else if (typeof $ !== 'undefined' && $(modalEl).modal) {
$(modalEl).modal('show');
}
});
var $modalBody = $modal.find('.modal-body');
$block.find('.lookbook-marker').on('click', function(e) {
e.preventDefault();
var productId = $(this).data('product-id');
$.get(ajaxUrl + '&id_product=' + productId, function(html) {
$modalBody.html(html);
$modal.modal('show');
});

Choose a reason for hiding this comment

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

[P1] Assume jQuery modal plugin exists

The new lookbook click handler unconditionally invokes $modal.modal('show') after loading the product HTML. Bootstrap 5 dropped the jQuery modal plugin, so on setups that only expose bootstrap.Modal (the case the previous code handled explicitly) this call throws TypeError: $modal.modal is not a function and the modal never appears. This regresses lookbook functionality for the default Bootstrap 5 configuration.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants