Comments (3)
I've created #1179 as an initial step.
It replaces the get_sites()
query for non-super-admins with get_blogs_of_user()
. I've currently got it in a draft state as I am unsure if anything is missing.
from distributor.
@boonebgorges perhaps a conditional there based on role such that super admins on particularly large installs maybe have things under perform but other users get the discrete listing of their sites more quickly? Though the AJAX approach probably suffices for cases of particularly long listings.
from distributor.
@jeffpaul Thanks for the quick response and for the thoughts. I think a pure AJAX solution is probably the one that will produce the fewest problems for the most people. However, this kind of interface is suboptimal for the kind of users I describe. If I'm a member of four or five sites, I'd probably prefer to see a simple dropdown with a list of my sites - this is easier than remembering the list and having to type. So this suggests two different kinds of strategy:
- Use a library that allows you to provide a pre-populated list in the dropdown. You'd then have the ability to type, which would first try to select from the pre-populated options. If the client knows that there are more items than what's been pre-populated (because you're a super-admin, or because a preflight check showed that you're a member of too many sites), then an AJAX search is performed and the dropdown updated with results. I've built something like this in the distant past using Select2 and more recently using a React dropdown library. This is a nice solution but is a decent-sized design and development lift.
- Do something more like what you've suggested: On the server, if we detect that you are a super admin and the network is large, give you an AJAX-powered typeahead. Otherwise, generate a dropdown using
get_blogs_of_user()
or similar.
from distributor.
Related Issues (20)
- Shipping rates on woocommerce
- May a typo in NetworkSiteConnection.php HOT 1
- Featured Image Not Pulling HOT 3
- Woocommerce images wrong transfer HOT 1
- i Cant connect my both sites HOT 1
- WordPress REST API Authentication plugin makes the disturbuter plguin do not work
- The plugin hasn't been tested with the latest version of WordPress HOT 1
- Distributor throws an error in WordPress 6.5 RC 3's new synced patterns editor HOT 1
- Registration validity indicator not displaying
- Filter Connection By Category
- Unable to access password protected site.
- Member only post content?
- Original date not used on pull (after use of snippet)
- Image Issues
- Getting an error on workpress post update of "Uncaught Error: Call to undefined function Distributor\InternalConnections\get_site()"
- Able to push and pull content from one site but not the other HOT 11
- Fatal error when pushing item HOT 4
- mapping to different categories possible? HOT 4
- How to remove distributed connections? HOT 5
- Authentication failed due to insufficient or invalid credentials. HOT 2
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 distributor.