discourse/app/assets/javascripts
David Battersby ad365fad7a
FIX: lightbox setup blocked due to waiting for first image load (#22612)
The Problem
Clicking on a large image opens lightbox, however the new lightbox currently waits for the first image to finish loading before it finishes loading the lightbox UI correctly (ie. background color). This makes the visual experience feel broken.

Because open() is waiting for the image to load, it doesn't trigger the onOpen callback, which appends a .has-lightbox class to the html tag. The lightbox background color requires that css class to be set for the styles to be applied correctly.

The Solution
This PR prevents blocking when loading loading the first image (image that was clicked) within the lightbox, and therefore allows the css class to be appended to the html tag correctly and as a result fixing the styling issues.

The #setCurrentItem  function is async and awaits the loading of preloadItemImages already, so the image will load correctly when complete despite the rest of the UI loading in advance.
2023-07-14 14:02:06 +08:00
..
admin Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00
bootstrap-json DEV: Improve ember-cli 'LOAD_PLUGINS' behavior (#22590) 2023-07-13 11:27:29 +01:00
confirm-new-email DEV: Add error message styling (#21225) 2023-04-25 08:40:18 -04:00
dialog-holder FIX: Ensure dialogs are still rendered if triggered during boot (#22511) 2023-07-10 11:29:04 +01:00
discourse FIX: lightbox setup blocked due to waiting for first image load (#22612) 2023-07-14 14:02:06 +08:00
discourse-common DEV: move raw handlebars to /raw-templates/ (#22574) 2023-07-13 12:57:45 -05:00
discourse-hbr DEV: move raw handlebars to /raw-templates/ (#22574) 2023-07-13 12:57:45 -05:00
discourse-plugins DEV: move raw handlebars to /raw-templates/ (#22574) 2023-07-13 12:57:45 -05:00
discourse-widget-hbs Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00
docs
ember-addons
ember-cli-progress-ci DEV: Add progress output in CI during ember-cli build (#17977) 2022-08-17 22:39:52 +01:00
ember-production-deprecations DEV: Clean up package.json files (#22349) 2023-06-30 13:01:45 +02:00
locales UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
patches DEV: Update ember-cli to 5.0.0 (#22280) 2023-06-26 17:15:59 +02:00
pretty-text Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00
select-kit Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00
truth-helpers Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00
wizard Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00
.licensee.json DEV: Update sub-dependencies (#22325) 2023-06-29 17:08:33 +02:00
.npmrc
discourse-js-processor.js DEV: Update ember-cli-htmlbars to 6.2.0 (#20467) 2023-02-27 18:43:28 +01:00
handlebars-shim.js
package.json Build(deps-dev): Bump patch-package in /app/assets/javascripts (#22577) 2023-07-13 11:10:33 +02:00
polyfills.js Drop support for iOS < 15.7 (#19847) 2023-01-16 17:28:59 +00:00
service-worker.js.erb FIX: Attempt to reconnect to server when browser visibilty changes (#22259) 2023-06-23 11:32:34 -05:00
yarn.lock Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#22578) 2023-07-13 12:11:54 +02:00