Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Site Editing: Add experimental SiteDescription block #18241

Conversation

Copons
Copy link
Contributor

@Copons Copons commented Nov 1, 2019

Description

Add a SiteDescription block similar to SiteTitle but with styling attributes like text and background colors, text and block alignments, and font size.

Note: this depends on #18238 which enhances the PlainText component with a few RichText-like features. Should we decide the PlainText refactor is not worth it, it's fairly easy to change this to use RichText without allowed formats (see the WordPress.com implementation).

How has this been tested?

Tested on the Docker environment with the Full Site Editing experiment enabled.
Since the FSE experiment replaces the theme, to test this on the front end is necessary to create a template (Appearance > Templates) with index as slug, that will render as the theme index.php file.

Screenshots

Editor Front End
Screenshot 2019-11-06 at 11 35 00 Screenshot 2019-11-06 at 11 35 46

Note: the font size difference is caused by the theme (Twenty Twenty). For some reasons, the larger font size is 32px in the editor and 42px in the front end.

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@Copons Copons self-assigned this Nov 1, 2019
@Copons Copons changed the base branch from master to update/site-title-attributes November 6, 2019 11:26
@Copons Copons marked this pull request as ready for review November 6, 2019 11:37
@Copons Copons force-pushed the add/experimental-site-description-block branch from c785ac7 to f65e5dd Compare November 6, 2019 14:58
Copy link
Contributor

@Addison-Stavlo Addison-Stavlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested these changes on my docker environment.

This block seems to work well in both the editor and front end running the Twenty Twenty theme.

I am a little unfamiliar on how theme support for FSE works here, but I do notice if I switch to an older theme like 'Twenty Eleven' that this block is still accessible but does not allow for much customization such as width, etc. Is it worth restricting access to blocks like this to FSE enabled themes only? (or are all themes technically FSE enabled when we run the experimental plugin and some just don't have as much support as others?)

@Copons
Copy link
Contributor Author

Copons commented Nov 13, 2019

@Addison-Stavlo Thanks for reviewing! 🙇

Currently Core FSE don't really have a theme/front end side yet, and Core FSE blocks are only gated behind the (Core) FSE experiment.

(Also please notice that this PR depends on #18361)

@Copons Copons added the [Status] Blocked Used to indicate that a current effort isn't able to move forward label Nov 13, 2019
@carolinan
Copy link
Contributor

@Copons is this still blocked?

@Copons
Copy link
Contributor Author

Copons commented Jul 8, 2020

@carolinan Things have changed a lot in the last many months, and I'm afraid I might mess up something while rebasing.
I'll close this and reopen a new one!

@Copons Copons closed this Jul 8, 2020
@Copons Copons deleted the add/experimental-site-description-block branch July 8, 2020 14:03
@Copons
Copy link
Contributor Author

Copons commented Jul 8, 2020

Replaced by #23788

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block library /packages/block-library [Status] Blocked Used to indicate that a current effort isn't able to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants