Comments (9)
Note: "ServerSideRender should be regarded as a fallback or legacy mechanism, it is not appropriate for developing new features against." https://developer.wordpress.org/block-editor/reference-guides/packages/packages-server-side-render/
That said, I really meant "dynamic blocks" rather than "blocks using ServerSideRender," although the latter would allow proper in-editor previews, whereas dynamic blocks would only be rendered on the front end, and stick to a Placeholder in-editor.
from indieblocks.
And:
This package is meant to be used only with WordPress core. Feel free to use it in your own project but please keep in mind that it might never get fully documented.
from indieblocks.
On dynamic blocks:
Blocks where updates to the code (HTML, CSS, JS) should be immediately shown on the front end of the website.
https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/creating-dynamic-blocks/
This is sort of applicable, especially if we schedule ("delay") the fetching of linked pages. (If we do everything inline, not so much.)
from indieblocks.
Nice example of ServerSideRender on that last page, too.
from indieblocks.
Not sure what would happen to dynamic blocks if the plugin is uninstalled, though. I don't like the idea of a "lock-in" of sorts, which is why I prefer blocks over other solutions (meta boxes, etc.).
Think it may be possible, though, to save the output of a ServerSideRender component. (Attributes get saved immediately whenever they are modified.)
from indieblocks.
Alternatively you can make the save function a cached version of the block that can be displayed if the plugin containing the block is deactivated. Essentially youβre saving some form of fallback markup for the block to use in the case the server-side rendering function goes away.
https://jasonyingling.me/building-dynamic-blocks-for-the-gutenberg-editor-in-wordpress/
from indieblocks.
Current behavior is we try to fetch the page's title. We can make this smarter, look for microformats (incl. author info), and then fall back on just the title, although things aren't too bad as they are.
from indieblocks.
Author info is added to API endpoint (if the page we link to turns to be marked up as a h-entry, at least), but not yet used in the block
from indieblocks.
The "Better Context" block (or whatever I end up calling it) now has this.
I likely won't add avatars or author URLs. I used to go with just plain URLs, in fact, for years; worked OK for me.
from indieblocks.
Related Issues (20)
- Keep webmentions open but reject only new posts, after "closing" them? HOT 2
- Create WP-CLI command to store/cache (and delete) images
- Smarter avatar filtering HOT 2
- Add compatibility with rssclub post type
- Look into delete_metadata's $delete_all HOT 1
- Facepile block conflict with Webmention v5.3.0 HOT 4
- CLI command for deleting webmention avatars HOT 2
- Latest Webmention update "kills" IndieBlocks Facepile HOT 13
- Webmention sidebar not showing? HOT 1
- Add CSS support for Webmention's mentions
- Hide Facepile Content block from inserter? HOT 1
- Check for empty page content HOT 1
- Better avatar filenames
- Use avatar subdirs HOT 1
- Facepile "type" argument HOT 4
- Somehow show only like or repost counts HOT 1
- Decode avatar URLs
- Plugin update obscures Gravatar, UI in post-new.php HOT 7
- Webmention deletes
- ActivityPub integration? HOT 4
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 indieblocks.