Comments (5)
It looks like the delay is primarily caused by the SQL call to get the config data for the EDS API Plugin. that config data tells it whether it should set the dropdown to default or not, and then paints the dropdown and selects accordingly. I agree there doesn't seem to be a great shortcut for this. In the past, this was shortcutted via a jStorage library caching settings after the first load, but it caused headaches with admin settings that weren't getting properly updated when admin settings were changed.
In testing this change, I'm finding there's still a brief delay before the disable happens, long enough for someone moving quickly to click it and then get frustrated. I also absolutely agree that the delay is frustrating. I think we're running into a number of issues though:
Delay on the plugin JS being loaded and running.
Delay on the plugin checking the SQL settings.
Delay on painting the dropdown once SQL responds (this one is minimal).
Before I pull the PR for this one in, I'm looking to see if there's anything else that could be done to speed this all up, and I'm open to suggestions!
from edsapi-koha-plugin.
In the coverflow plugin we have an update_coverflow_js function:
https://github.com/bywatersolutions/koha-plugin-coverflow/blob/master/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm#L355
We call it when the plugin settings are updated:
https://github.com/bywatersolutions/koha-plugin-coverflow/blob/master/Koha/Plugin/Com/ByWaterSolutions/CoverFlow.pm#L175
Could you do the same here? Build the dropdown when the options are saved in the admin interface, then simply pass the prebuilt dropdown into the JS so it is available when the page loads?
from edsapi-koha-plugin.
Thanks! I like this solution presented in the coverflow plugin. I'm putting this on my priority list to try and address for 20.05 forward. I'll update when more progress has been made on this!
from edsapi-koha-plugin.
PR #101 is attempting to fix this issue by removing the need to query the table for configuration on every load. It's working great locally but would love some more eyes on it if you have a 20.05 instance you can test against. Thanks for all the conversation around this! Once the PR is merged I'll close this issue.
from edsapi-koha-plugin.
PR #101 is merged to master and should resolve this issue.
from edsapi-koha-plugin.
Related Issues (20)
- Can't locate object method "create_message_headers" via package "Koha::Email" error when sending email from the Cart HOT 2
- Results not updated after logging in HOT 2
- 21.05 version of plugin does not start on Koha 21.05 HOT 5
- eds-detail.pl needs to be updated for Bootstrap in 21.05+
- Plugin doesn't appear at Koha 21.11 and produces 500 error HOT 3
- Plugin will not start in Koha 21.11 HOT 2
- Plugin does not include a en.inc file
- Cannot send opac baskets in Koha 21.11 HOT 7
- 500 Error when refreshing session token HOT 9
- SetEDS() and SetKoha() functions attempt to call jQuertUI's autocomplete
- Plugin not constructing URLs correctly in 22.11.08 HOT 5
- Cannot download cart in Koha 22.11
- Cannot send cart from OPAC in 22.11
- Issues loading plugin in IE, EDGE, Safari HOT 2
- Cannot send basket with Koha 19.05 & plugin 19.05009 HOT 1
- Out of date templates with Koha 20.11 HOT 5
- README.md appears to be incorrect regarding versions HOT 3
- Using Github's "Releases" functionality HOT 2
- Use Koha's REST API instead of relying on altered Apache configuration HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edsapi-koha-plugin.