Enhancement/ajax calls#957
Draft
sgiorgetti wants to merge 3 commits into
Draft
Conversation
Contributor
|
I have tried to review the changes to Presumably, it does something to a tools dropdown (see CSS selectors here). I have never seen the tools dropdown. Apparently, according to CSS selectors, it is this element:
But the dropdown doesn't open. If I try to open it, I am getting an error:
On the plants site, there isn't even a visual indicator about the presence of the dropdown:
I think, given that it is broken, we can just delete the masthead tools js file entirely. That should solve the problem with the ajax. |
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.



Summary
This PR reduces unnecessary masthead AJAX traffic by lazy-loading account dropdown content and only refreshing the tools Jobs tab when the browser is likely to have tools activity.
Changes
/Ajax/accounts_dropdownwhen the account dropdown is first opened or focused, instead of requesting it on every page load.*/Ajax/tools_tabrequests unless there are recent/current tools jobs, atlparameter, or a persisted browser hint.ensembl.hasToolsJobslocalStorage hint so later non-Tools pages can show Jobs without probing users who have never submitted jobs.Testing
Manual testing recommended: