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

Update WordPress trunk to Gutenberg 5.3 #14532

Closed
wants to merge 691 commits into from
Closed

Conversation

jorgefilipecosta
Copy link
Member

Features

Enhancements

Bug Fixes

Documentation

Various

johngodley and others added 30 commits February 15, 2019 11:20
window.getSelection() can return an empty range, causing getRangeAt() to fail
* Improve publish panel landmark and button position.

* Use outline for navigate regions focus style.

* Avoid conflict with publish panel animation.

* Make the outline animation expand inwards.

* CSS lint after rebase.

* Rebuild outline animation.

* Try negative z-indexes.

* Change animation timing to 0.1s.
* Add new package for editor configuration, initially containing just feature flags

Rework build commands to use correct NODE_ENV for feature flags

* Revert "Rework build commands to use correct NODE_ENV for feature flags"

This reverts commit 4cb0a39.

Revert "Add new package for editor configuration, initially containing just feature flags"

This reverts commit 0c21fc2.

* Switch to using webpack define plugin to inject a global GUTENBERG_PHASE variable

* Iterate: use window.GUTENBERG_PHASE to avoid thrown errors from an undefined global

* Add custom eslint rule for usage of GUTENBERG_PHASE

* Disable new eslint rule when used in webpack config

* Add readme

* Include phase 2 features in e2e tests

* Allow use of GUTENBERG_PHASE in a ternary and update documentation.

* Add links to docs

* Minor docs changes

* Switch from window.GUTENBERG_PHASE to process.env.GUTENBERG_PHASE

* Update docs for feature flags. Move `Basic Use` section higher up, and simplify a sentence

* Ensure GUTENBERG_PHASE environment variable is available for webpack

* Ensure GUTENBERG_PHASE is a number

* Ensure GUTENBERG_PHASE is set in unit tests

* Use <rootDir> in jest config

* switch to using package.json config to define the value of GUTENBERG_PHASE

* Sort custom lint rules alphabetically

* Add comment about GUTENBERG_PHASE

* Update jest config for GUTENBERG_PHASE

* Add webpack as dependency to main package.json
* RichText: don't set selection during selectionchange

* Add e2e test
The block editor supports an inverted UI to ensure contrast in themes that register themselves as having dark backgrounds (see https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/#dark-backgrounds).

What this mode does, is invert the UI wherever it can, so dark gray borders are light gray on black backgrounds, and the mover icons are white instead of black.

But they shouldn't be in nested contexts, because in nested contexts the movers have a white background.

This PR fixes that.
* RichText: Fix browser formatting buttons

* Simplify

* componentDidMount instead of componentWillMount
* Basic functionality

* Only update width on submit

* Fix styles

* Push a little polish

* Select objects when clicked

* Fix getDerivedStateFromProps

* Reselect image after update

* Move PositionedAtSelection

* Export PositionAtSelection in same way we export other @wordpress/components
* Plugin: Extract block editor styles replacement as filter

* Plugin: Override default styles by exact file contents match

* Plugin: Fix editor styles prepend behavior
* Decode URL encoding slug in sidebar permalink

* Decode URL encoding slug in sidebar permalink pt.2.

* Decode URL encoding slug in sidebar permalink pt.3.

* Decode URL encoding slug in sidebar permalink pt.4.
* Have a image placeholder while image size is being calculated.

* Move placeholder image to image block code.
* Allow progress call to update the thumbnail image.

* If we already have a subscription don’t go it again.

* Fix bottomsheet event removal.
* onReplace: select the last block

* Update tests

* Add second test to cover cases of REPLACE_BLOCKS
* Store current selection in RichText state

* Make native RichText use format-library

This is a work in progress. Sometimes it works, sometimes it doesn't, I haven't
figured out the right way to wire the RichText structure into Aztec

* Fix bad merge

* Don't use applyRecord for now

* Missing newlines

* Do not change lastContent on formatChange, let the component rerender and update record. Also minor cleanup

* Make sure the component rerenders when isSelected changes so FormatToolbar is removed

* Make a simple version of Link that displays on mobile

* Rerender on selection change to update record

* Make it update onFormatChange when url changes

* Cleanup changes in Heading and Paragraph

* Remove unnecessary components and styles added while testing

* Improve link editing UI

* Fix adding a new url without a selection

* Fix editing the text part of the url

* Fill modal URL to current value

* Pressing Remove dismisses the popup. Improve styles

* Bring back multilineTag prop

* Remove unused param in shouldComponentUpdate

* Remove withBlockEditContext for now, it will need a better refactor to properly deal with focus from Aztec

* Temporary fix for whitespace in HTML, will need to be addressed later

* Make sure end is always greater than start for the text selection

* Remove unsupported css property

* Disable autoCapitalize and autoCorrect for URLInput

* Fix lint errors in mobile and in rnmobile/rich-text-formats

* Use a template string to generate html for Aztec in RichText

* Preprocess the HTML value before sending it to Aztec, removing whitespaces in the process

* Use custom button instead of native provided by react-native

* Add some padding to our custom button

* Send active formats to RCTAztecView so we can type new words in a format

* Handle multiple formats with format placeholder

* Cleanup applyFormat

* Make applyFormat support applying multiple formats at once

* Keep formatting when onSelectionChange is emitted without changes

* Keep the same order of formats

* Prevent inserting anything other that a formatting element from the link modal

* Make sure wrapping tags returned by aztec are removed so it's not added to formats

* Improve styling of the modal

* Make sure we don't pass undefined values in activeFormats

* Update formatPlaceholder when user decides to unselect a format in an existing formatted text

* Update props.value on format change

* Force update native view onFormatChange by not setting this.lastContent

* Handle inserting a link

* Fix updating format properties

* Expand link selection automatically so we can edit a link without selecting it explicitly

* Force an aztec text refresh on format change so we make sure the active formats are in sync

* Add comment and make the code more consistent for debugging

* Make sure we don't use format ref inside the placeholder formats

* Make sure we don't use format ref inside the placeholder formats

* Do not try to call valueToFormat on format change without selection

* Fix editing link url

* Add the ability to remove a link without selection

* Do not remove trailing whitespace characters

* Unescape spaces coming from Aztec

* Fix code styling issues

* Pick the formats of the first char when in text start

* Fix lint errors

* RichText value may be undefined

* Update lastEventCount on enter and selection changes

* Update ModalLinkUI to avoid the keyboard

* Lint fixes
* Mobile BottomSheet: Added the posibility of selecting the cell  separator style.

* Mobile BottomSheet: Increased space between top and table

* Mobile BottomSheet: Truncating long values at the middle of the string.

* Fix lint issues

* Fix syntax error to pass CI

* Fix lint issue

* Mobile Picker: Tweak Android styles.

* Mobile BottomSheet: Simplified Android cell styling.

* Mobile: Fix swipe to dismiss on BottomSheet

* Fix lint issues

* Mobile BottomSheet: Fixes sensibility of pan vs tap gestures on swipe to dismiss.

* Fix lint issues

* Fixed failed tests

* Mobile BottomSheet cell: Removed unnecessary variable init.

* Fixed set state after component is unmounted

* Revert "Fixed set state after component is unmounted"

This reverts commit 787df73.
Remove an unnecessary word from the readme.
Soean and others added 28 commits March 15, 2019 15:03
…s it (#14450)

* Input Interaction: only consider selection at edge if directed towards it

* Add e2e test
* Initial commit to update CheckboxControl readme

These changes add design documentation.

* Fix tabbing on code example
* Add thick borders to the left of blocks when they're hovred + selected.

* Add thick left border to the page title.

* Turn off block toolbar centering for alignwide blocks.

This splits the left border in two, which looks a bit weird.

* Move block breadcrump to the left side, position it on top of the block.

* Clean up the block toolbar's left border.

* Use inset borders on mobile.

* Prevent inset borders from overlapping with full-bleed content.

* Use a gray border instead of a blue one on hover.

* Use a sass variable to define the left block border width

* Fix breadcrumb potision for alignfull blocks.

* Clean up breadcrumb position for left & right-aligned blocks.

* Sync block mover animation up with the hover state.

* Darken focused block borders slightly.

From $light-gray-500 to $light-gray-800.

* Switch to using border instead of outline for block borders.

Also, change the thick left border to a solid color, to prevent weird overlap.

* Make this work better with Windows High Contrast Mode

* Adjust z-index of border + breadcrumb for child blocks.

So that they're not overlapped by the parent block's border + toolbar.

* Remove extra z-index rule from the block border.

Turns out this wasn't needed anyway.

* Remove extra z-index rule from the block border. Minor description cleanup.

* Ensure these styles are compatible with Top Toolbar mode.

* Use the new gray value for the mobile toolbar border.

* Add a matching left border to the post permalink area above the title.

* Improve border position for mobile screens, especially for elements that float left/right.

* Remove a couple unnecessary border updates from 047e1e4.

Turns out these styles can be preserved on all screen sizes with no ill effect.

* Clean up bugs related to the hover + focus states of the classic editor block.

* Classic Block toolbar icon cleanup.

Even out margins, remove white background.

* Reusable Block border cleanup.

* Keeping a light border on the classic block when it's inactive.

* Clean up borders on warning blocks.

* Switch to a solid color border color for the permalink box.

This mirrors the approach we use for block toolbars, and also ensures that we don't layer opacities and make the permalink toolbar darker than intended.

* Update z-index rule name to match the one used in the latest merge.

* Combine full-wide toolbar centering rules.

Previously, these were declared in two separate palces.

* Add a darker hover state for dark themes.

* Remove the left toolbar border on mobile screens.

This fixes some visual bugs with themes like TwentyNineteen, which include margins on either side of the block on mobile.
* Input Interaction: allow outer vertical edge to be selected

* Add e2e test
* DOM: Limit single tabbable radio input by name

* DOM: Avoid consolidating unnamed radio inputs
Add design guidelines and screenshots.
* Update MenuGroup Readme.

Add design guidelines and screenshots.

* Adjust introduction to be more concise.
* Fix: Pasting captions without an image fails

Fixes #13527
See original work in #12315

When pasting content which includes the `[caption]` shortcode we assume
that the content is well-formed (that there is not only an `<img />` in
there but also in the first position).

In this patch we fix the problem by removing the old code, which removed
the first `Element` node, and replaced it with code that removes the
first `IMG` node _if one is found_.

We're leaving other image nodes in place in case the caption contains
image nodes and we're not requiring that the `IMG` be the first child
of the caption shortcode in case people are wrapping the image in other
valid HTML like this...

```html
[caption]<a href="some.link"><img src="some.image"></a>[/caption]
```

See the new unit tests for a more complete specification of the
intended behaviors.

PR reviewed, debugged, and created by:
-> LANNISTER MOB <-
 - @codebykat
 - @dmsnell
 - @gwwar
 - @kwight
 - @mmtr
 - @obenland
 - @rodrigoi
 - @vindl

* Update stripFirstImage behavior to also remove matching topmost parent node
…t-jsx-pragma with @wordpress/babel-preset-default (#14482)
* Clarify that JSX is not part of ESNext in JS build setup tutorial

* Docs: Polish @wordpress/scripts README and related tutorial

* Emphasize that build and start scripts should be used with the default config

* Add Advanced information subsection for all scripts

* Link the existing tutorial for build and start scripts
@strarsis
Copy link
Contributor

Related: #14552

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.