Resetting block controls to their default state is often unintuitive and is sometimes impossible #55258
Labels
[Feature] Blocks
Overall functionality of blocks
Needs Design Feedback
Needs general design feedback.
[Type] Enhancement
A suggestion for improvement.
There are a number of blocks in the editor where using a control changes the block markup/metadata, and resetting to a default untouched state is either unintuitive or impossible. This is problematic when trying to design default styles while respecting changes the user has made since the user does not think they've made an explicit choice.
Examples
Gallery Columns
The gallery block's columns control changes markup in a way that can't be undone. Here's the markup/serialized block data for a gallery where the columns value has not been edited:
Note the
columns-default
class and the lack of a columns key. If I change this gallery to 1 column and then set it back to 2 then this is the resulting markup:There is now a
columns-2
class and a "2" key even though the block appears exactly the same to the user.Column Width
When you add a set of columns that are equal width (50/50 or 33/33/33) the width value is empty, and adding another column resizes all the existing ones so they stay equal width. If a user tries out custom width and decides to go back to equal width they will likely type an explicit 50%, which then means that two column blocks that look identical to the user will have different markup and inline styles:
Additionally, adding another column to a block with defined widths leads to a column that's a single pixel wide. This is a little odd on its own, but it's extra confusing when it unexpectedly occurs in a block with two columns that have explicit 50% widths, as to the user that block will look identical to a block with two columns that have no explicit width.
Text Alignment and Column Vertical Alignment
Blocks that support text alignment generally also inherit the alignment from parent elements. However, the fact that you can also select the default or inherited state is confusing. A user that changes a heading to "center" and decides they don't like that will probably just select "left" since there is no "none" option, as there is for the block's layout alignment.
CleanShot.2023-02-10.at.11.16.32.mp4
This means that blocks will have a text align class applied unnecessarily and will not react as expected when placed in a container that modifies text alignment.
(Much of this also applies to the column block's vertical alignment control.)
Row/Stack Alignment
These blocks include default alignment values and then the supporting styles are always included, even if the user didn't change them away from the default. This makes it impossible to take the user's choices into consideration when creating a block style or theme default styles.
Solution
It would be ideal if there was a consistent way to "unset" every control, like Webflow's "reset" function. You can sometimes use the reset function in the three dots menu, but that doesn't apply to many different controls.
Related issues:
The text was updated successfully, but these errors were encountered: