Skip to content

Add move to top bottom when long pressing block movers#27554

Merged
cameronvoell merged 12 commits intoWordPress:masterfrom
illusaen:issue-1191-add-move-to-top-bottom
Dec 23, 2020
Merged

Add move to top bottom when long pressing block movers#27554
cameronvoell merged 12 commits intoWordPress:masterfrom
illusaen:issue-1191-add-move-to-top-bottom

Conversation

@illusaen
Copy link
Copy Markdown
Contributor

@illusaen illusaen commented Dec 7, 2020

Description

Original issue link: 1191
Gutenberg-mobile link: PR 2872

Add move to top and move to bottom actions when long pressing block movers.

@iamthomasbishop I have the words in the menu as sentence cased (first word capitalized, rest not); there is a discrepancy in the current app, however, where long pressing the block picker has all words capitalized whereas the gear icon in blocks shows the sentence casing I'm using. I have it is as sentence cased because I think it looks better, but please feel free to inform me if you think that all capitalized looks better.

How has this been tested?

  • Long pressing block that's not on top and seeing action sheet pop up with "Move to top". When pressed, block moves to top.
  • Long pressing block that's not on bottom and seeing action sheet pop up with "Move to bottom". When pressed, block moves to bottom.
  • Long pressing block that's not on top and seeing action sheet pop up. Pressing cancel makes no changes.
  • Long pressing block that's not on bottom and seeing action sheet pop up. Pressing cancel makes no changes.

Screenshots

iOS Android

Types of changes

New feature added.

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.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@illusaen illusaen marked this pull request as draft December 7, 2020 15:59
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 7, 2020
@cameronvoell cameronvoell self-requested a review December 16, 2020 19:10
@illusaen illusaen marked this pull request as ready for review December 18, 2020 19:37
@illusaen illusaen requested a review from ellatrix as a code owner December 18, 2020 19:37
Copy link
Copy Markdown

@iamthomasbishop iamthomasbishop left a comment

Choose a reason for hiding this comment

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

The interaction looks great, @illusaen. Nice work!

Regarding casing, per our discussion in slack let's go with sentence-case (per our new guidelines for UI copy). We'll need to do an audit soon across the entire app to find and update title-cased strings, but that will be done separately.

@cameronvoell cameronvoell added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Dec 19, 2020
@cameronvoell cameronvoell self-requested a review December 23, 2020 23:02
Copy link
Copy Markdown
Member

@cameronvoell cameronvoell left a comment

Choose a reason for hiding this comment

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

New feature is looking good. Nice work here @illusaen !

@cameronvoell cameronvoell merged commit 7f7910f into WordPress:master Dec 23, 2020
@github-actions github-actions bot added this to the Gutenberg 9.7 milestone Dec 23, 2020
cameronvoell pushed a commit that referenced this pull request Jan 14, 2021
* WC: Added move to top and bottom functionality via long pressing BlockMover buttons and clicking the button on the BottomSheet Picker.

* WIP: Unit tests.

* WC: WIP unit tests for add move to top and bottom

* WC: Moving UI tests to gutenberg with other UI tests instead of keeping at gutenberg-mobile. Adding more convenience functions to EditorPage.

* WIP: Unit tests.

* WC: Adding icon and title to picker for move to top/bottom.

* WC: Cleaning up code.

* WC: Fixing merge issue where import was changed to const.

* WC: Changing all imports to requires as per jest bug.

* WC: Removing before/afterAll blocks from UI tests.

* WC: Removing e2e tests to issue-1191-add-move-to-top-bottom-ui-tests branch.

* WC: Updating imports to fall in line with other files.

Co-authored-by: Wendy Chen <wendy.chen@automattic.com>
cameronvoell added a commit that referenced this pull request Jan 18, 2021
* Release script: Update react-native-editor version to 1.44.0

* Release script: Update with changes from 'npm run core preios'

* Mobile - Link settings - Fix data not being saved when closing the bottom sheet (#27997)

* Set onComplete handler as optional in Range cell component (#27987)

Range cell component is used in multiple components but not all of them require the onComplete handler so it should be optional.

* Mobile - Link settings - Check for onClose (#28039)

* Fix: Add Image style settings for hotlinked images (#28006)

* Update CHANGELOG.md (#28042)

* Change spaces back to tabs

* Release script: Update react-native-editor version to 1.44.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Fix crash in mobile paragraph  blocks with custom font size (#28121)

* Remove px suffix from fontSize for Android paragraph

* Issue does not seem to be limited to android on latest gutenberg master

* Move fontSize char removal to richtext to account for multiple block errors

* Add move to top bottom when long pressing block movers (#27554)

* WC: Added move to top and bottom functionality via long pressing BlockMover buttons and clicking the button on the BottomSheet Picker.

* WIP: Unit tests.

* WC: WIP unit tests for add move to top and bottom

* WC: Moving UI tests to gutenberg with other UI tests instead of keeping at gutenberg-mobile. Adding more convenience functions to EditorPage.

* WIP: Unit tests.

* WC: Adding icon and title to picker for move to top/bottom.

* WC: Cleaning up code.

* WC: Fixing merge issue where import was changed to const.

* WC: Changing all imports to requires as per jest bug.

* WC: Removing before/afterAll blocks from UI tests.

* WC: Removing e2e tests to issue-1191-add-move-to-top-bottom-ui-tests branch.

* WC: Updating imports to fall in line with other files.

Co-authored-by: Wendy Chen <wendy.chen@automattic.com>

* Fixed crash introduced from recent fontSize fix (#28209)

* Updated changelog

Co-authored-by: Paul Von Schrottky <paul.von.schrottky@automattic.com>
Co-authored-by: Gerardo Pacheco <gerardo.pacheco@automattic.com>
Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Co-authored-by: Enej Bajgoric <enej.bajgoric@automattic.com>
Co-authored-by: illusaen <tilphousia@gmail.com>
Co-authored-by: Wendy Chen <wendy.chen@automattic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants