Opened 12 years ago
Closed 12 years ago
#28761 closed defect (bug) (fixed)
wpviews: gallery shortcodes displaying "undefined" for an instant
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.0 | Priority: | normal |
| Severity: | normal | Version: | 3.9 |
| Component: | TinyMCE | Keywords: | has-patch |
| Focuses: | Cc: |
Description
We should return ''; while loading the gallery.
But ideally, we should create a loading function that inserts some content, because doing an ajax call to render a view is not uncommon. The embed view does the same... Something like this.loading() maybe?
Attachments (3)
Change History (8)
#2
@
12 years ago
How about we insert a temporary (loading) placeholder while the data is being fetched? We can style it any way we want depending on the view, hide it completely, etc.
#3
follow-up:
↓ 4
@
12 years ago
I thought we had discussed a loading indicator at some point - we should probably do that.
#4
in reply to:
↑ 3
@
12 years ago
Replying to helen:
I thought we had discussed a loading indicator at some point
Right. In 28761.3.patch:
- Add
loadingPlaceholder()that returns the html. Would it be better if this was a template? - Fix
setContent(), it should empty the element before appending the new node. getHtml()should always return a string.
The default loadingPlaceholder has the dashicons-admin-media icon and a small "loading" CSS animation. Does it need to be more "distinct" or more styling? (To test it: edit line 50 in mce-view.js, from var html = this.getHtml() || this.loadingPlaceholder(); to var html = this.loadingPlaceholder();.)
This will make sure getHtml actually returns something.