-
Notifications
You must be signed in to change notification settings - Fork 0
[CORRUPTED] Synthetic Benchmark PR #36156 - FEATURE: allow quoting an image from the lightbox #18
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
base: base_pr_36156_20251204_8990
Are you sure you want to change the base?
[CORRUPTED] Synthetic Benchmark PR #36156 - FEATURE: allow quoting an image from the lightbox #18
Conversation
Also, fix quoting logic so when a draft is closed it will be reloaded prior to adding quote.
remove flakey test
We can pass the Post model itself (which also has the Topic attached) from the post decorator (via helper.model) to the lightbox init function. Then, we can later send this to the quote image code via the lightbox's `itemData` filter, which makes anything included from within the `onInit` and `onClick` callbacks of lightbox buttons. This same data was also used to extract more lightboxed image info (like width, height etc) so this doesn't need to be done inside quote-image.js either.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
User description
Benchmark PR discourse#36156
Type: Corrupted (contains bugs)
Original PR Title: FEATURE: allow quoting an image from the lightbox
Original PR Description: Also, fix quoting logic so when a draft is closed it will be reloaded prior to adding quote.
Original PR URL: discourse#36156
PR Type
Enhancement, Tests
Description
Add quote image functionality to lightbox with new button
Refactor quoting logic to handle draft reloading properly
Extract image markdown building into reusable utility module
Improve test coverage with new quote-image and markdown-builder tests
Fix flaky test and improve test selectors for reliability
Diagram Walkthrough
File Walkthrough
6 files
Add quote button registration and image data collectionNew module for quoting images from lightboxExtract reusable image markdown building utilityPass post model to lightbox initializationUse shared image markdown builder functionAdd styling for quote image button icon1 files
Refactor quoting logic to reload closed drafts6 files
Add quote image test and improve selectorsAdd quote button accessor methods to PhotoSwipe componentComprehensive unit tests for quote image functionalityUnit tests for markdown image builder utilityDisable flaky timezone-dependent testAdd draft endpoint mocks for quoting tests1 files
Add i18n string for quote image button