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

[RNMobile] Add paused media state handlers to Android bridge code #57476

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
573d7f0
Fix incorrect heading level in Editor curation docs (#57409)
ndiego Dec 28, 2023
970e925
NumberControl: Make increment and decrement buttons keyboard accessib…
afercia Dec 28, 2023
9c8001a
DataViews: update names for `DropdownMenuRadioItemCustom` (#57416)
oandregal Dec 28, 2023
3f6c738
Navigation Block: Use dom.focus for focus control (#57362)
t-hamano Dec 28, 2023
ec2c51d
DataViews: hide actions menu upon selecting a layout (#57418)
oandregal Dec 28, 2023
1f9b753
Server directive processing: Stop processing non-interactive blocks (…
cbravobernal Dec 28, 2023
1c79fd8
Performance: Avoid extra `useMarkPersistent` dispatch calls (#57435)
ntsekouras Dec 28, 2023
36396cc
Font Library: remove "has_font_mime_type" function (#57364)
HrithikDalal Dec 28, 2023
10facf1
Update modal description and button label (#57368)
HrithikDalal Dec 28, 2023
663916f
Update tutorial based on user feedback. (#57403)
ndiego Dec 28, 2023
83e1a2c
Change the slug for the theme.json doc to avoid conflicts (#57410)
ndiego Dec 28, 2023
6f6b083
Migrate 'allowed patterns' e2e tests to Playwright (#57399)
Mamaduka Dec 29, 2023
3591f4d
DataViews: fallback to `(no title)` if there's no rendered title (#57…
oandregal Dec 29, 2023
b85da47
DataViews: make fields dependant on view.type (#57450)
oandregal Dec 29, 2023
af8c530
DataViews: prevent unnecessary re-renders (#57452)
oandregal Dec 29, 2023
2888084
Docs/tutorial: Fix opposite condition for content generation in rende…
atachibana Dec 29, 2023
2dbd8a5
DataViews: prevent unnecessary renders for Pagination (#57454)
oandregal Dec 29, 2023
0d2bf01
Make the Replace featured image button perceivable by assistive techn…
afercia Dec 29, 2023
9431114
DataViews: memoize onSetSelection (#57458)
oandregal Dec 29, 2023
63a6321
Fix Template preview menu item accessibility. (#57456)
afercia Dec 30, 2023
fc36077
Migrate 'preferences' e2e tests to Playwright (#57446)
Mamaduka Dec 30, 2023
a87f24e
Migrate remaining 'publish panel' e2e tests to Playwright (#57432)
Mamaduka Jan 1, 2024
06b5fa5
Core Data: Pass the 'options' argument to data action shortcuts (#57383)
Mamaduka Jan 1, 2024
4eb3b74
Editor: Unify the DocumentTools component (#57214)
youknowriad Jan 1, 2024
18dd101
Avoid using a memoized selector without dependencies (#57257)
youknowriad Jan 1, 2024
1014dc6
Quality: avoid React warning when changing rendering mode (#57413)
t-hamano Jan 1, 2024
31e67ea
Global style revisions: move change summary code and tests to block e…
ramonjd Jan 2, 2024
5831320
Adding padding to entity save panel header (#57471)
ramonjd Jan 2, 2024
3c80f02
use a classname instead of the element in case a strong element is pa…
ramonjd Jan 2, 2024
f70554c
Passed progress values to failed media uploads and add paused media h…
derekblank Jan 2, 2024
2d43054
Migrate 'sidebar' e2e tests to Playwright (#57448)
Mamaduka Jan 2, 2024
0aabb54
Add onMediaFileSavePaused handler
derekblank Jan 2, 2024
f364b68
[RNMobile] Auto-scroll upon block insertion (#57273)
fluiddot Jan 2, 2024
9e0747e
Add individual headings to the elements translations (#57472)
ramonjd Jan 2, 2024
7ebb55c
DataViews: Use in patterns page (#57333)
ntsekouras Jan 2, 2024
1ed7ba2
[Mobile] Unselect blocks using the hardware back button (Android) (#5…
Jan 2, 2024
50a8314
Remove deprecated `behaviors` syntax (#57165)
michalczaplinski Jan 2, 2024
60bf21e
Add `compact` size variant to InputControl-based components (#57398)
mirka Jan 2, 2024
1b2dac7
Block editor: give iframe fallback background color (#57330)
ramonjd Jan 2, 2024
45dc4b1
Background image block support: Add tests for size and repeat output …
andrewserong Jan 2, 2024
78f28c1
Update paused handlers from merge
derekblank Jan 3, 2024
a33a090
Merge branch 'rnmobile/media-upload-progress-connection-subscription'…
derekblank Jan 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/explanations/architecture/key-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ More on [Site editing templates](/docs/explanations/architecture/full-site-editi

## Styles

Styles, formerly known as Global Styles and as such referenced in the code, is both an interface that users access through the editor and a configuration system done through [a `theme.json` file](/docs/how-to-guides/themes/theme-json.md). This file absorbs most of the configuration aspects usually scattered through various `add_theme_support` calls to simplify communicating with the editor. It thus aims to improve declaring what settings should be enabled, what specific tools a theme offers (like a custom color palette), the available design tools present, and an infrastructure that allows to coordinate the styles coming from WordPress, the active theme, and the user.
Styles, formerly known as Global Styles and as such referenced in the code, is both an interface that users access through the editor and a configuration system done through [a `theme.json` file](/docs/how-to-guides/themes/global-settings-and-styles.md). This file absorbs most of the configuration aspects usually scattered through various `add_theme_support` calls to simplify communicating with the editor. It thus aims to improve declaring what settings should be enabled, what specific tools a theme offers (like a custom color palette), the available design tools present, and an infrastructure that allows to coordinate the styles coming from WordPress, the active theme, and the user.

Learn more about [Global Styles](/docs/explanations/architecture/styles.md#global-styles).
4 changes: 2 additions & 2 deletions docs/explanations/architecture/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The final HTML document is the result of a few things:
The stylesheets loaded in the front end include:

- **Blocks**. The stylesheets that come with the block. In the front end, you can find a single stylesheet with all block styles defined by WordPress (`wp-block-library-*` ) or separate stylesheets per block in use (as in `wp-block-group-*`, `wp-block-columns-*`, etc). See [this note](https://make.wordpress.org/core/2021/07/01/block-styles-loading-enhancements-in-wordpress-5-8/) for the full details.
- **Global styles**. These styles are generated on the fly by using data coming from a theme.json file: see [note](https://make.wordpress.org/core/2021/06/25/introducing-theme-json-in-wordpress-5-8/), [reference](https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/), and [how to guide](https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/). Specifically, it merges the contents of the theme.json from WordPress, the theme.json from the theme (if it has one), and the user data provided via the global styles sidebar in the site editor. The result of processing this data is an embedded stylesheet whose id is `global-styles-inline-css`.
- **Global styles**. These styles are generated on the fly by using data coming from a theme.json file: see [note](https://make.wordpress.org/core/2021/06/25/introducing-theme-json-in-wordpress-5-8/), [reference](https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/), and [how to guide](https://developer.wordpress.org/block-editor/how-to-guides/themes/global-settings-and-styles/). Specifically, it merges the contents of the theme.json from WordPress, the theme.json from the theme (if it has one), and the user data provided via the global styles sidebar in the site editor. The result of processing this data is an embedded stylesheet whose id is `global-styles-inline-css`.
- **Theme**. Historically, themes have enqueued their own stylesheets, where the id is based on the theme name, as in `twentytwentytwo-style-css`. In addition to having their own stylesheets they can now declare a theme.json file containing styles that will be part of the stylesheet generated by global styles.
- **User**. Some of the user actions in the editor will generate style content. This is the case for features such as duotone, layout, or link color.
- **Other**. WordPress and plugins can also enqueue stylesheets.
Expand Down Expand Up @@ -515,7 +515,7 @@ There are currently four layout types in use:
- Flex: Items are displayed using a Flexbox layout. Defaults to a horizontal orientation. Spacing between children is handled via the `gap` CSS property.
- Grid: Items are displayed using a Grid layout. Defaults to an `auto-fill` approach to column generation but can also be set to a fixed number of columns. Spacing between children is handled via the `gap` CSS property.

For controlling spacing between blocks, and enabling block spacing controls see: [What is blockGap and how can I use it?](https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-json/#what-is-blockgap-and-how-can-i-use-it).
For controlling spacing between blocks, and enabling block spacing controls see: [What is blockGap and how can I use it?](https://developer.wordpress.org/block-editor/how-to-guides/themes/global-settings-and-styles/#what-is-blockgap-and-how-can-i-use-it).

### Targeting layout or container blocks from themes

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ This refers to a collection of features that ultimately allows users to edit the

The CSS styles generated by WordPress and enqueued as an embedded stylesheet in the front end of the site. The stylesheet ID is `global-styles-inline-css`. The contents of this stylesheet come from the default `theme.json` of WordPress, the theme's `theme.json`, and the styles provided by the user via the global styles sidebar in the site editor.

See [theme.json reference docs](/docs/reference-guides/theme-json-reference.md)</a>, the [how to guide](/docs/how-to-guides/themes/theme-json.md), and an introduction to [styles in the block editor](/docs/explanations/architecture/styles.md).
See [theme.json reference docs](/docs/reference-guides/theme-json-reference.md)</a>, the [how to guide](/docs/how-to-guides/themes/global-settings-and-styles.md), and an introduction to [styles in the block editor](/docs/explanations/architecture/styles.md).

Compare to <a href="#block-styles">block styles</a>.

Expand Down
17 changes: 9 additions & 8 deletions docs/getting-started/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ The first step in creating the Copyright Date Block is to scaffold the initial b
Review the <a href="https://developer.wordpress.org/block-editor/getting-started/devenv/get-started-with-wp-env/">Get started with create-block</a> documentation for an introduction to using this package.
</div>

You can use `create-block` from just about any directory on your computer and then use `wp-env` to create a local WordPress development environment with your new block plugin installed and activated.
You can use `create-block` from just about any directory (folder) on your computer and then use `wp-env` to create a local WordPress development environment with your new block plugin installed and activated.

Therefore, create a new directory (folder) on your computer called "Block Tutorial". Open your terminal and `cd` to this directory. Then run the following command.
Therefore, choose a directory to place the block plugin or optionally create a new folder called "Block Tutorial". Open your terminal and `cd` to this directory. Then run the following command.

<div class="callout callout-info">
If you are not using <code>wp-env</code>, instead, navigate to the <code>plugins/</code> folder in your local WordPress installation using the terminal and run the following command.
Expand Down Expand Up @@ -203,7 +203,7 @@ Before you start building the functionality of the block itself, let's do a bit

Open the [`index.js`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/file-structure-of-a-block/#index-js) file. This is the main JavaScript file of the block and is used to register it on the client. You can learn more about client-side and server-side registration in the [Registration of a block](https://developer.wordpress.org/block-editor/getting-started/fundamentals/registration-of-a-block/) documentation.

Start by looking at the [`registerBlockType`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/) function. This function accepts the name of the block, which we are getting from the imported `block.js` file, and the block configuration object.
Start by looking at the [`registerBlockType`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/) function. This function accepts the name of the block, which we are getting from the imported `block.json` file, and the block configuration object.

```js
import Edit from './edit';
Expand Down Expand Up @@ -351,9 +351,10 @@ To enable this starting year functionality, you will need one attribute to store

### Updating block.json

Block attributes are generally specified in the [`block.json`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/block-json/#data-storage-in-the-block-with-attributes) file. So open up the file and add the following section after the `example` in line 9.
Block attributes are generally specified in the [`block.json`](https://developer.wordpress.org/block-editor/getting-started/fundamentals/block-json/#data-storage-in-the-block-with-attributes) file. So open up the file and add the following section after the `example` property.

```json
"example": {},
"attributes": {
"showStartingYear": {
"type": "boolean"
Expand Down Expand Up @@ -391,7 +392,7 @@ Next, update the Edit function to return the current block content and an `Inspe

```js
export default function Edit() {
const currentYear = new Date().getFullYear().toString();
const currentYear = new Date().getFullYear().toString();

return (
<>
Expand Down Expand Up @@ -421,7 +422,7 @@ Then wrap the "Testing" message in the `PanelBody` component and set the `title`

```js
export default function Edit() {
const currentYear = new Date().getFullYear().toString();
const currentYear = new Date().getFullYear().toString();

return (
<>
Expand Down Expand Up @@ -964,9 +965,9 @@ You will not get any block validation errors, but the Editor will detect that ch

#### Optimizing render.php

The final step is to optimize the `render.php` file. If the `currentYear` and the `fallbackCurrentYear` attribute are the same, then there is no need to dynamically create the block content. It is already saved in the database and is available in the `render.php` file via the `$block_content` variable.
The final step is to optimize the `render.php` file. If the `currentYear` and the `fallbackCurrentYear` attribute are the same, then there is no need to dynamically create the block content. It is already saved in the database and is available in the `render.php` file via the `$content` variable.

Therefore, update the file to render the `$block_content` if `currentYear` and `fallbackCurrentYear` match.
Therefore, update the file to render the generated content if `currentYear` and `fallbackCurrentYear` do not match.

```php
$current_year = date( "Y" );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Disable Editor functionality
# Disable Editor functionality

This page is dedicated to the many ways you can disable specific functionality in the Post Editor and Site Editor that are not covered in other areas of the curation documentation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Continuing the examples with duotone, this means you could allow full access to
}
```

You can read more about how best to [turn on/off options with theme.json here](/docs/how-to-guides/themes/theme-json.md).
You can read more about how best to [turn on/off options with theme.json here](/docs/how-to-guides/themes/global-settings-and-styles.md).

### Disable inherit default layout

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The block editor provides a number of options for theme designers and developers

### Classic theme

In terms of block editor terminology this is any theme that defines its templates in the traditional `.php` file format, and that doesn't have an `index.html` format template in the `/block-templates` or `/templates` folders. A `Classic` theme has the ability to provide configuration and styling options to the block editor, and block content, via [Theme Supports](/docs/how-to-guides/themes/theme-support.md), or by including a [theme.json](/docs/how-to-guides/themes/theme-json.md) file. A theme does not have to be a `Block` theme in order to take advantage of some of the flexibility provided by the use of a `theme.json` file.
In terms of block editor terminology this is any theme that defines its templates in the traditional `.php` file format, and that doesn't have an `index.html` format template in the `/block-templates` or `/templates` folders. A `Classic` theme has the ability to provide configuration and styling options to the block editor, and block content, via [Theme Supports](/docs/how-to-guides/themes/theme-support.md), or by including a [theme.json](/docs/how-to-guides/themes/global-settings-and-styles.md) file. A theme does not have to be a `Block` theme in order to take advantage of some of the flexibility provided by the use of a `theme.json` file.

### Block theme

Expand All @@ -18,5 +18,5 @@ There isn't an FSE specific theme type. In WordPress > 5.9 FSE is enabled for an

**Contents**

- [Global Settings (theme.json)](/docs/how-to-guides/themes/theme-json.md)
- [Global Settings (theme.json)](/docs/how-to-guides/themes/global-settings-and-styles.md)
- [Theme Support](/docs/how-to-guides/themes/theme-support.md)
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,6 @@

WordPress 5.8 comes with [a new mechanism](https://make.wordpress.org/core/2021/06/25/introducing-theme-json-in-wordpress-5-8/) to configure the editor that enables a finer-grained control and introduces the first step in managing styles for future WordPress releases: the `theme.json` file. Then `theme.json` [evolved to a v2](https://make.wordpress.org/core/2022/01/08/updates-for-settings-styles-and-theme-json/) with WordPress 5.9 release. This page documents its format.

- Rationale
- Settings for the block editor
- Settings can be controlled per block
- Styles are managed
- CSS Custom Properties: presets & custom
- Specification
- version
- settings
- Backward compatibility with add_theme_support
- Presets
- Custom
- Setting examples
- styles
- Top-level
- Block-level
- Elements
- Variations
- customTemplates
- templateParts
- patterns
- FAQ
- The naming schema of CSS Custom Properties
- Why using -- as a separator?
- How settings under "custom" create new CSS Custom Properties
- Why does it take so long to update the styles in the browser?

## Rationale

The Block Editor API has evolved at different velocities and there are some growing pains, specially in areas that affect themes. Examples of this are: the ability to [control the editor programmatically](https://make.wordpress.org/core/2020/01/23/controlling-the-block-editor/), or [a block style system](https://github.com/WordPress/gutenberg/issues/9534) that facilitates user, theme, and core style preferences.
Expand Down
4 changes: 2 additions & 2 deletions docs/how-to-guides/themes/theme-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Themes can opt out of generated block layout styles that provide default structu
add_theme_support( 'disable-layout-styles' );
```

For themes looking to customize `blockGap` styles or block spacing, see [the developer docs on Global Settings & Styles](/docs/how-to-guides/themes/theme-json/#what-is-blockgap-and-how-can-i-use-it).
For themes looking to customize `blockGap` styles or block spacing, see [the developer docs on Global Settings & Styles](/docs/how-to-guides/themes/global-settings-and-styles.md#what-is-blockgap-and-how-can-i-use-it).

### Supporting custom line heights

Expand Down Expand Up @@ -434,7 +434,7 @@ add_theme_support( 'custom-spacing' );

## Link color control

Link support has been made stable as part of WordPress 5.8. It's `false` by default and themes can enable it via the [theme.json file](./theme-json.md):
Link support has been made stable as part of WordPress 5.8. It's `false` by default and themes can enable it via the [theme.json file](/docs/how-to-guides/curating-the-editor-experience/theme-json.md):

```json
{
Expand Down
6 changes: 3 additions & 3 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"parent": "curating-the-editor-experience"
},
{
"title": "DisableEditorFunctionality",
"title": "Disable Editor functionality",
"slug": "disable-editor-functionality",
"markdown_source": "../docs/how-to-guides/curating-the-editor-experience/disable-editor-functionality.md",
"parent": "curating-the-editor-experience"
Expand Down Expand Up @@ -301,8 +301,8 @@
},
{
"title": "Global Settings & Styles (theme.json)",
"slug": "theme-json",
"markdown_source": "../docs/how-to-guides/themes/theme-json.md",
"slug": "global-settings-and-styles",
"markdown_source": "../docs/how-to-guides/themes/global-settings-and-styles.md",
"parent": "themes"
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/reference-guides/block-api/block-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ _**Note:** Since WordPress 6.2._
- Subproperties:
- `minHeight`: type `boolean`, default value `false`

This value signals that a block supports some of the CSS style properties related to dimensions. When it does, the block editor will show UI controls for the user to set their values if [the theme declares support](/docs/how-to-guides/themes/theme-json/#opt-in-into-ui-controls).
This value signals that a block supports some of the CSS style properties related to dimensions. When it does, the block editor will show UI controls for the user to set their values if [the theme declares support](/docs/how-to-guides/themes/global-settings-and-styles.md#opt-in-into-ui-controls).

```js
supports: {
Expand Down Expand Up @@ -491,7 +491,7 @@ selectors: {

The filter can be applied to an element inside the block by setting the `selectors.filter.duotone` selector.

Duotone presets are sourced from `color.duotone` in [theme.json](/docs/how-to-guides/themes/theme-json.md).
Duotone presets are sourced from `color.duotone` in [theme.json](/docs/how-to-guides/themes/global-settings-and-styles.md).

When the block declares support for `filter.duotone`, the attributes definition is extended to include the attribute `style`:

Expand Down Expand Up @@ -675,7 +675,7 @@ _**Note:** Since WordPress 6.2._
- Subproperties:
- `sticky`: type `boolean`, default value `false`

This value signals that a block supports some of the CSS style properties related to position. When it does, the block editor will show UI controls for the user to set their values if [the theme declares support](/docs/how-to-guides/themes/theme-json/#opt-in-into-ui-controls).
This value signals that a block supports some of the CSS style properties related to position. When it does, the block editor will show UI controls for the user to set their values if [the theme declares support](/docs/how-to-guides/themes/global-settings-and-styles.md#opt-in-into-ui-controls).

Note that sticky position controls are currently only available for blocks set at the root level of the document. Setting a block to the `sticky` position will stick the block to its most immediate parent when the user scrolls the page.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/theme-json-reference/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Theme.json Reference

This reference guide lists the settings and style properties defined in the theme.json schema. See the [theme.json how to guide](/docs/how-to-guides/themes/theme-json.md) for examples and guide on how to use the theme.json file in your theme.
This reference guide lists the settings and style properties defined in the theme.json schema. See the [theme.json how to guide](/docs/how-to-guides/themes/global-settings-and-styles.md) for examples and guide on how to use the theme.json file in your theme.

- [Version 2 (living reference)](/docs/reference-guides/theme-json-reference/theme-json-living.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
> - the [theme.json v1](/docs/reference-guides/theme-json-reference/theme-json-v1.md) specification, and
> - the [reference to migrate from theme.json v1 to v2](/docs/reference-guides/theme-json-reference/theme-json-migrations.md).

This reference guide lists the settings and style properties defined in the `theme.json` schema. See the [theme.json how to guide](/docs/how-to-guides/themes/theme-json.md) for examples and guidance on how to use the `theme.json` file in your theme.
This reference guide lists the settings and style properties defined in the `theme.json` schema. See the [theme.json how to guide](/docs/how-to-guides/themes/global-settings-and-styles.md) for examples and guidance on how to use the `theme.json` file in your theme.

## Schema

Expand Down
Loading
Loading