Skip to content

Record Images Click to enlarge#2673

Merged
corsacca merged 10 commits into
DiscipleTools:developfrom
micahmills:larger-contact-images
May 20, 2025
Merged

Record Images Click to enlarge#2673
corsacca merged 10 commits into
DiscipleTools:developfrom
micahmills:larger-contact-images

Conversation

@micahmills
Copy link
Copy Markdown
Collaborator

Adds a modal so when the record image is clicked it shows a larger thumbnail. If the image does not exist it functions as before. If it does exist it opens a larger version with a button to replace the image which opens the previous upload modal

This is related to DiscipleTools/disciple-tools-storage#34

Adds a modal so when the record image is clicked it shows a larger thumbnail.
If the image does not exist it functions as before.
If it does exist it opens a larger version with a button to replace the image which opens the previous upload modal
@corsacca
Copy link
Copy Markdown
Member

I checked out the theme and forgot to check out the storage plugin. Maybe we add a small check?
Fatal error: Uncaught Error: Call to undefined method DT_Storage::get_large_thumbnail_url() in /Users/user/code/sites/multisite/app/public/wp-content/themes/disciple-tools-theme/dt-posts/posts.php on line 2612

@corsacca
Copy link
Copy Markdown
Member

@micahmills Nice!
Seeing the image in the modal is way better!

Is the thought here that the original image could be too large to display, so having the 1200px thumbnail is useful?

@micahmills
Copy link
Copy Markdown
Collaborator Author

Yes the original could potentially be a huge file size and take forever to load. Creating a large thumbnail is a trivial file size to upload and saves a ton of bandwidth.

@micahmills
Copy link
Copy Markdown
Collaborator Author

I checked out the theme and forgot to check out the storage plugin. Maybe we add a small check? Fatal error: Uncaught Error: Call to undefined method DT_Storage::get_large_thumbnail_url() in /Users/user/code/sites/multisite/app/public/wp-content/themes/disciple-tools-theme/dt-posts/posts.php on line 2612

This should be fixed now. I am not sure why the PHPCS is failing it isn't related to any of the code I changed that I can see. any ideas @corsacca?

@corsacca
Copy link
Copy Markdown
Member

Thanks @micahmills!
I'll check the PHPCS

@corsacca
Copy link
Copy Markdown
Member

@micahmills can we revert the whitespace changes on fd5e6b2 ?

@micahmills
Copy link
Copy Markdown
Collaborator Author

@corsacca I honestly have no idea what is happening here or why all those white space things changed when I changed 3 lines of code, and now I have nerve conflicts with details-bar.php. Unfortunately, I don't have time right now to figure this out.

@corsacca
Copy link
Copy Markdown
Member

Thanks @micahmills!
Frustrating when the IDE suddenly decides it knows better.
In the whitespace changes it looked like a } got deleted somewhere.
It also looks like some phpcs packages got upgrades, which might explain the news phpcs errors too.

@micahmills
Copy link
Copy Markdown
Collaborator Author

@corsacca I think the PHPCS errors are fixed but now a unit tests is failing for some reason

@corsacca
Copy link
Copy Markdown
Member

👍 those unit test look unrelated to this PR. I'll try to vanquish those. Oh the day when i can tell AI to go do it :p.
Thanks for the update

@corsacca
Copy link
Copy Markdown
Member

@micahmills, twas just a small tweak.
Now we are good to go!

@corsacca corsacca merged commit a074260 into DiscipleTools:develop May 20, 2025
2 checks passed
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.

2 participants