Daily Search Forum Recap: February 26, 2021
Here is a recap of what happened in the search forums today, through the eyes of the Search Engine Roundtable and other search forums on the web…
Here is a recap of what happened in the search forums today, through the eyes of the Search Engine Roundtable and other search forums on the web…
There are a lot of different ways you can clean your home and business. But when it comes to your business you will want to make sure that it is cleaned completely. If you are looking to enhance the look of your company and make sure it looks amazing, then you will want to consider the benefits of hiring a commercial cleaning company. You will find that the decision to have it done is easy when you understand the tremendous benefits associated with it.
It does not take long for a high traffic area to turn into a dirty area. The more people that are moving through your space, the more you will need to have it professionally cleaned.
There are a lot of reasons why commercial cleaning services make sense for your company. These benefits and more can be your new reality once you have the service completed. If you have any questions about how the process works or what it will take to get the service started, then you will want to contact your local professional today.
The post Benefits of Commercial Cleaning Services appeared first on Business Opportunities.
I’m a developer that has started developing with Gutenberg recently. There are a bunch of amazing benefits and features, but there are also a ton of drawbacks, inconsistencies, as well as absolutely awful and outdated documentation.
One of the worst aspects of Gutenberg from a developer perspective has been block validation. Consider the following scenario. I build a custom (non-dynamic) JavaScript-based block, and a CMS editor adds the block to thousands of pages. What happens when or if I need to update the markup of the block?
By default, all of the blocks will enter a state of invalidation and not reflect on the front-end of the site. The CMS editor would have to go into thousands of pages and manually click the button which allows the block to be recovered.
Block deprecations have been suggested as a way to resolve this, but the API is poorly documented, confusing, and seems like it would become unmaintainable in the long term with more than a few deprecations.
Shouldn’t there either be a way for block developers to opt-out of the validation process or a global way to recover blocks?
PJ
You are certainly not holding anything back, PJ. While much of this is a bit more technical than I typically like to cover here at the Tavern, I decided to reach out to Riad Benguella, one of the lead Gutenberg developers, for more insight into the situation.
Before diving into his response, I have given one aspect of your question some thought. There are times when developers need to deprecate old markup and move onto something new. However, this should not happen often. Generally, it is a sign of poor architecture if the HTML needs to be overhauled regularly. This also leads to other issues, such as a third party not being able to maintain stylistic changes.
When developing blocks or any type of application that outputs front-end code, you need to think about what that should look like today and in 10 years. What happens if a user adds some custom CSS to style your block and the block’s HTML structure has changed? From their perspective, your block update has broken their site. The same could be said for another plugin that extends your plugin in some way.
Ask any theme author how frustrating it is any time Gutenberg/WordPress changes its block output. While it has improved in the last couple of years, styling blocks for the editor and front-end has often been a maintenance nightmare.
As a developer, I have always tried to think through any real-world consequences of making these changes from a user’s perspective. That should happen from Day #1, not after you have released your project.
Doing this adds time to the early project when you are just trying to get it out the door and into users’ hands. This is where taking a pre-release step back helps. Get away from the computer. Go on a walk. Think about the architecture of your project and whether it is ideal for the long term.
“For the block versioning/updates, it’s indeed one of the areas of the Gutenberg APIs where we needed to make architectural tradeoffs, and we decided to favor the user experience over the developer’s,” said Benguella.
Regardless of your development method, following the project’s approach of a user-first experience will help in the long term.
“To understand the problem properly, one needs to understand how blocks work and are edited,” said Benguella. “Block instances are a JSON object, and the editor UI manipulate that JSON, but in order to stay backward compatible, to ensure the preservation of user’s content in the most readable format, and to embrace web standards as much as possible, the block editor doesn’t store the JSON object but an HTML serialization of it in post_content
.”
That serialization is parsed and converted to JSON when the editor reloads the content to edit again. In the final stages of parsing, it is up to the block author to decide how to save and parse the object.
“Now, imagine if a user altered the saved HTML (serialization) and just put any random content there,” said Benguella. “The block might not be able to parse the HTML properly because it doesn’t match its expectations (what has been defined by the block author), which means recreating that JSON object in order to be manipulated won’t be possible at this point.”
When this happens, the block editor provides the user with an interface to make an informed decision. They can attempt to “force parse” the block JSON or convert it to an HTML or Classic block.
This same type of invalidation can happen when a plugin developer updates their block. However, instead of the saved HTML changing, the developer changed the “expectations” of the block — altering how it gets saved and parsed.
“Which is why we ask block developers to provide block deprecations representing the old markup of the same block,” said Benguella. “Deprecations can also be thought of as valid, alternate sources for the same block. This allows the editor to parse the old markup when loaded and save the new markup back if an update is made to the block.”
WordPress has block deprecation documentation. However, it is not thorough. The best source of seeing real-world deprecations is looking through Gutenberg’s block library. Deprecated blocks have a deprecated.js
file.
Benguella said that this system can be frustrating for block authors. This is especially evident in a development environment when making changes. This has lead developers to ask for a method of disabling the validation algorithm.
“It’s something we don’t want to provide at the moment because, as explained above, the validation is also important when markup changes for another reason (external edit, another editor, etc.),” he said. “So it may cause content loss for users without them being aware of anything. The preference right now is given to user awareness.”
The team has improved the validation system over time, allowing for small changes that do not break the block state. There is also an open ticket for improvements in the future.
Hey Divi Nation! Thanks for joining us for the next installment of our weekly Divi Design Initiative where each week, we give away brand new freebies. Today, we’re sharing a global presets style guide for Divi’s Telehealth Layout Pack. Divi’s global presets help you speed up your web design process in no time, and to help you speed it up even faster, we’ll be regularly providing global presets, that are unique to the layout pack, in one single layout. You can choose if you want to upload all global presets at once or select specific ones.
To lay your hands on the free global presets style guide, you will first need to download it using the button below. To gain access to the download you will need to subscribe to our Divi Daily email list by using the form below. As a new subscriber, you will receive even more Divi goodness and a free Divi Layout pack every Monday! If you’re already on the list, simply enter your email address below and click download. You will not be “resubscribed” or receive extra emails.
Join the Divi Newsletter and we will email you a copy of the ultimate Divi Landing Page Layout Pack, plus tons of other amazing and free Divi resources, tips and tricks. Follow along and you will be a Divi master in no time. If you are already subscribed simply type in your email address below and click download to access the layout pack.
The beauty of Divi is that it gives you full control over the design of your website using a wide range of design settings that you can use to customize the appearance of any element or module.
The new Divi Presets system allows you to design a custom appearance for a Divi element (like a button module) and save it as a preset. All of the design changes you make are saved in the preset. When you add a new module to your page, you can browse your saved presets and quickly apply them.
Once a preset has been applied, the module’s default design is controlled by the preset. If you update the style of a preset, all modules using that preset are updated as well. This allows you to control the design of your entire website using a small collection of saved presets. Plus, it saves tons of time when adding new modules to your page, since you don’t need to design each new module from scratch but instead can quickly select an appearance from your Divi Presets library.
Preferably, you’ll start using a global presets style guide before building your pages, templates, etc. The reason behind that is that you’ll be able to immediately access your global presets while building your designs, instead of having to go back to your design, reset inline styles on an element level and apply a global preset.
Starting your Divi build process after you’ve created a style guide helps you avoid having to manually make changes to modules inside their individual settings. If you’re working with global presets from the beginning, you’ll be able to modify them in one place and watch the changes unfold across your entire website at once.
If you’re looking to create your own global presets style guide from scratch, as opposed to using one that is based on a layout pack, check out the style guide framework download post.
This approach will automatically add all presets to your preset library at once.
Go to your Divi Library in the backend of your WordPress website.
There, click on the “Import & Export” button at the top.
Continue by clicking on the import tab and selecting the JSON file which you were able to download at the beginning of this post. To automatically import presets, tick off the “Import Presets” box too. This will automatically add each preset to each module.
Below, you have a list of all presets and their names that have been added to your modules. The order is the same as in the print screen below. You can always go back to the style guide for reference.
You can access each one of the uploaded presets by opening or adding a new module, clicking on the preset item at the top and selecting a preset of your choice.
With this approach, you have a bigger say in what appears in your global presets library and what doesn’t. The elements will be provided to you in one place and you can visually pick which one you want to manually turn into a global preset with a name of your choice.
Navigate to your Divi Library in the backend of your WordPress website.
Then, click on the “Import & Export” button.
Go to the import tab and select the JSON file you were able to download at the beginning of this post. If you want to be able to pick which modules you turn into global presets, it’s important to leave the “Import Presets” box unchecked.
Now, create a new page draft for the global presets style guide layout.
Go through all the elements and decide which ones you want to turn into global presets.
Say, for instance, you want to turn one of the Button Modules into a global preset. Open the Button Module settings and click on the preset option at the top.
Turn the module settings into a new preset from custom styles.
Name the new preset however you want.
Repeat these steps for each preset you want to create.
Turn the HEX color codes of your choice, which you can find in the style guide, global by right-clicking the color and selecting “Conver to Global”. You can do this for each one of the colors inside your color palette so you can easily access them when designing and building inside Divi.
Last but not least, it’s a great idea to always keep the style guide in a separate tab. Using Divi’s built-in and cross-page copy-paste option will help you quickly transfer styles, like gradient backgrounds, from one element to another!
We hope you enjoy this week’s global preset style guide. We look forward to hearing your opinions in the comment section below. Make sure you check back next week for more freebies!
The post Download a FREE Global Presets Style Guide for Divi’s Telehealth Layout Pack appeared first on Elegant Themes Blog.
We’re all guilty of it at some point. I know I certainly am. Glamorizing writing is an easy trap to…
The post 21 Useful Keyboard Shortcuts for Writers appeared first on Copyblogger.