Merged
Conversation
To remove extra queries.
Collaborator
|
Changes unknown when pulling c4c39b3 on nimmo-simplify-lightbox-caption into ** on main**. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To remove extra queries on the obs index.
To reproduce the issue, on
<main>go to http://localhost:3000/505457, and then hit "Index" to be sure we're on the same page of the index. Extra queries will fire after the lineIf you examine the lightbox caption for observations like 505457 (it's encoded as a data-attribute in the image) you'll find the ID's of some of the associations that are firing the extra queries.
The issue is compounded on the matrix-box carousel PR #1598 because every image in every matrix box gets a lightbox caption.
Note that changes in this PR will also affect lightboxes on the show_obs page. This PR:
show_obs_title, which has links to owner namings, deprecated names etc., and uses the shorter matrix-box-style obsnameinstead, linking to the obs.Provisionally eliminatesthe obsnotesfrom the lightbox caption, because it's the only place i could think that might involveprojects. These were some of the extra associations getting loaded. Please let me know if that's not the case. It could be the image copyright instead, for example.Restored the obs notes because I believe the title was causing all the problems.