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

Add mobile OfflineStatus component #56848

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e63ef38
Revert format types hook refactor (#56859)
ellatrix Dec 7, 2023
5067361
Adding `aria-sort` to table view headers (#56860)
Dec 7, 2023
23c0de4
Update data view layout (#56786)
jameskoster Dec 7, 2023
c97e586
Editor: Move the device type state to the editor package (#56866)
youknowriad Dec 7, 2023
be7d518
Update changelog files
gutenbergplugin Dec 7, 2023
eae6a91
chore(release): publish
gutenbergplugin Dec 7, 2023
ee9baf2
Tabs: Implement `ariakit/test` in unit tests (#56835)
chad1008 Dec 7, 2023
9d13cf0
Site Editor: Fix active edited post (#56863)
youknowriad Dec 7, 2023
0fa652a
Update InnerBlocks defaultblock doc usage (#56728)
colorful-tones Dec 7, 2023
a9cbc06
One hook to rule them all: preparation for a block supports API (#56862)
ellatrix Dec 7, 2023
6a42225
RichText: pass value to store (#43204)
ellatrix Dec 7, 2023
f6adf1e
`FontSizePicker`: Add opt-in prop for 40px default size (#56804)
brookewp Dec 7, 2023
f48ac05
Keycodes: avoid regex for capital case (#56822)
ellatrix Dec 7, 2023
50571da
Add mobile OfflineStatus component
derekblank Dec 7, 2023
b45f22c
Refactor <BlockToolbar />: Add variant prop and <NavigableToolbar /> …
jeryj Dec 7, 2023
d541afc
Mobile: remove rich text multiline (#56117)
ellatrix Dec 7, 2023
67bea2a
Remove BlockTools BackCompat (#56874)
jeryj Dec 8, 2023
6a35fdf
Add OfflineStatus component to block-list behind __DEV__ flag
derekblank Dec 8, 2023
3ad117e
`BorderControl`: Fix button styles (#56730)
brookewp Dec 8, 2023
27b7d62
DataViews: Remove TanStack (#56873)
ntsekouras Dec 8, 2023
d87092c
Simplify page list edit warning (#56829)
getdave Dec 8, 2023
11862cf
Components: replace `TabPanel` with `Tabs` in the editor's `ColorPane…
chad1008 Dec 8, 2023
3613e9e
copy/fix capitalization of WordPress (#56834)
miminari Dec 8, 2023
cb1bbc7
Link to Dashicons (#56872)
taylorgorman Dec 8, 2023
46ea0ff
Fix PHP linter failing (#56905)
ellatrix Dec 8, 2023
7872195
DropdownMenuV2Ariakit: prevent prefix collapsing if all radios or che…
ciampo Dec 8, 2023
6211c7a
Tabs: replace `id` with new `tabId` prop (#56883)
chad1008 Dec 8, 2023
cfa3fd6
fix: Guard against a block styles crash due to null block values (#56…
dcalhoun Dec 8, 2023
91cb8fe
Block editor: hooks: manage BlockListBlock filters in one place (#56875)
ellatrix Dec 8, 2023
2e95c20
Tabs: sync browser focus to selected tab in controlled mode (#56658)
chad1008 Dec 8, 2023
8a702c3
Editor: Move the edit template blocks notification to editor package …
youknowriad Dec 8, 2023
25cd246
Doc: Spinner - add Storybook link (#56818)
bph Dec 8, 2023
83434bf
Improve text and design of the block removal warnings (#56869)
scruffian Dec 8, 2023
1783a4e
Editor: Unify device preview styles (#56904)
youknowriad Dec 9, 2023
6989045
Revert "Doc: Spinner - add Storybook link (#56818)" (#56913)
apeatling Dec 10, 2023
419d754
Don't render undefined classname in useBlockProps hook (#56923)
t-hamano Dec 10, 2023
5137da0
HTML API: Backport updates from Core, fix Interactivity API
dmsnell Dec 10, 2023
1c733e2
Merge branch 'feat/connectivity-status' into rnmobile/connect-offline…
derekblank Dec 11, 2023
615db01
Merge branch 'rnmobile/connect-offline-status-component' of https://g…
derekblank Dec 11, 2023
dc54432
Replace offline icon and update OfflineStatus text alignment
derekblank Dec 11, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Use [`enqueue_block_editor_assets`](https://developer.wordpress.org/reference/ho

- [Get started with wp-scripts](https://developer.wordpress.org/block-editor/getting-started/devenv/get-started-with-wp-scripts/)
- [Enqueueing assets in the Editor](https://developer.wordpress.org/block-editor/how-to-guides/enqueueing-assets-in-the-editor/)
- [Wordpress Packages handles](https://developer.wordpress.org/block-editor/contributors/code/scripts/)
- [WordPress Packages handles](https://developer.wordpress.org/block-editor/contributors/code/scripts/)
- [Javascript Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript) | MDN Web Docs
- [block-development-examples](https://github.com/WordPress/block-development-examples) | GitHub repository
- [block-theme-examples](https://github.com/wptrainingteam/block-theme-examples) | GitHub repository
Expand Down
2 changes: 1 addition & 1 deletion docs/reference-guides/block-api/block-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ The `ancestor` property makes a block available inside the specified block types
{ "icon": "smile" }
```

An icon property should be specified to make it easier to identify a block. These can be any of WordPress' Dashicons (slug serving also as a fallback in non-js contexts).
An icon property should be specified to make it easier to identify a block. These can be any of [WordPress' Dashicons](https://developer.wordpress.org/resource/dashicons/) (slug serving also as a fallback in non-js contexts).

**Note:** It's also possible to override this property on the client-side with the source of the SVG element. In addition, this property can be defined with JavaScript as an object containing background and foreground colors. This colors will appear with the icon when they are applicable e.g.: in the inserter. Custom SVG icons are automatically wrapped in the [wp.primitives.SVG](/packages/primitives/README.md) component to add accessibility attributes (aria-hidden, role, and focusable).

Expand Down
45 changes: 40 additions & 5 deletions docs/reference-guides/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,18 @@ _Returns_

- `string?`: Template ID.

### getDeviceType

Returns the current editing canvas device type.

_Parameters_

- _state_ `Object`: Global application state.

_Returns_

- `string`: Device type.

### getEditedPostAttribute

Returns a single attribute of the post being edited, preferring the unsaved edit if one exists, but falling back to the attribute for the last known saved state of the post.
Expand Down Expand Up @@ -1261,6 +1273,31 @@ _Related_

- selectBlock in core/block-editor store.

### setDeviceType

Action that changes the width of the editing canvas.

_Parameters_

- _deviceType_ `string`:

_Returns_

- `Object`: Action object.

### setEditedPost

Returns an action that sets the current post Type and post ID.

_Parameters_

- _postType_ `string`: Post Type.
- _postId_ `string`: Post ID.

_Returns_

- `Object`: Action object.

### setRenderingMode

Returns an action used to set the rendering mode of the post editor. We support multiple rendering modes:
Expand Down Expand Up @@ -1292,16 +1329,14 @@ _Parameters_

### setupEditorState

Returns an action object used to setup the editor state when first opening an editor.
> **Deprecated**

Setup the editor state.

_Parameters_

- _post_ `Object`: Post object.

_Returns_

- `Object`: Action object.

### showInsertionPoint

_Related_
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?php
/**
* HTML API: WP_HTML_Attribute_Token class
*
* @package WordPress
* @subpackage HTML-API
* @since 6.2.0
*/

/**
* Core class used by the HTML tag processor as a data structure for the attribute token,
* allowing to drastically improve performance.
*
* This class is for internal usage of the WP_HTML_Tag_Processor class.
*
* @access private
* @since 6.2.0
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
*
* @see WP_HTML_Tag_Processor
*/
class Gutenberg_HTML_Attribute_Token_6_5 {
/**
* Attribute name.
*
* @since 6.2.0
*
* @var string
*/
public $name;

/**
* Attribute value.
*
* @since 6.2.0
*
* @var int
*/
public $value_starts_at;

/**
* How many bytes the value occupies in the input HTML.
*
* @since 6.2.0
*
* @var int
*/
public $value_length;

/**
* The string offset where the attribute name starts.
*
* @since 6.2.0
*
* @var int
*/
public $start;

/**
* Byte length of text spanning the attribute inside a tag.
*
* This span starts at the first character of the attribute name
* and it ends after one of three cases:
*
* - at the end of the attribute name for boolean attributes.
* - at the end of the value for unquoted attributes.
* - at the final single or double quote for quoted attributes.
*
* Example:
*
* <div class="post">
* ------------ length is 12, including quotes
*
* <input type="checked" checked id="selector">
* ------- length is 6
*
* <a rel=noopener>
* ------------ length is 11
*
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
*
* @var int
*/
public $length;

/**
* Whether the attribute is a boolean attribute with value `true`.
*
* @since 6.2.0
*
* @var bool
*/
public $is_true;

/**
* Constructor.
*
* @since 6.2.0
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
*
* @param string $name Attribute name.
* @param int $value_start Attribute value.
* @param int $value_length Number of bytes attribute value spans.
* @param int $start The string offset where the attribute name starts.
* @param int $length Byte length of the entire attribute name or name and value pair expression.
* @param bool $is_true Whether the attribute is a boolean attribute with true value.
*/
public function __construct( $name, $value_start, $value_length, $start, $length, $is_true ) {
$this->name = $name;
$this->value_starts_at = $value_start;
$this->value_length = $value_length;
$this->start = $start;
$this->length = $length;
$this->is_true = $is_true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php
/**
* HTML API: WP_HTML_Span class
*
* @package WordPress
* @subpackage HTML-API
* @since 6.2.0
*/

/**
* Core class used by the HTML tag processor to represent a textual span
* inside an HTML document.
*
* This is a two-tuple in disguise, used to avoid the memory overhead
* involved in using an array for the same purpose.
*
* This class is for internal usage of the WP_HTML_Tag_Processor class.
*
* @access private
* @since 6.2.0
* @since 6.5.0 Replaced `end` with `length` to more closely align with `substr()`.
*
* @see WP_HTML_Tag_Processor
*/
class Gutenberg_HTML_Span_6_5 {
/**
* Byte offset into document where span begins.
*
* @since 6.2.0
*
* @var int
*/
public $start;

/**
* Byte length of this span.
*
* @since 6.5.0
*
* @var int
*/
public $length;

/**
* Constructor.
*
* @since 6.2.0
*
* @param int $start Byte offset into document where replacement span begins.
* @param int $length Byte length of span.
*/
public function __construct( $start, $length ) {
$this->start = $start;
$this->length = $length;
}
}
Loading
Loading