Skip to content

Mobile: Update the border colours#25429

Closed
enejb wants to merge 9 commits intotrunkfrom
RN/add-border-color-tokens
Closed

Mobile: Update the border colours#25429
enejb wants to merge 9 commits intotrunkfrom
RN/add-border-color-tokens

Conversation

@enejb
Copy link
Copy Markdown
Contributor

@enejb enejb commented Sep 17, 2020

Description

This PR updates deprecates the following colour variables.

$light-gray-500: #e2e4e7; // Good for "grayed" items and borders.
$light-gray-400: #e8eaeb;
$light-dim: #0000001e; //rgba(0, 0, 0, 0.12); 

and replaces them with

$neutral-dim-light: rgba($black, 0.12);
and
$neutral-dim-dark: rgba($white, 0.15);

While at the same create a few different design tokens which make it easier to update the colours in the future.

How has this been tested?

This has been tested using the demo app on both Android and iOS. In light and dark mode.

Screenshots

In order to make the different changes easier to see. I made the
following changes to the _colors.native.scss file.

$border-color: red;
$border-color-dark: red;
$modal-border-color: orange;
$modal-border-color-dark: orange;
$drag-indicator: yellow;
$drag-indicator-dark: yellow;
$spacer-color: blue;
$spacer-color-dark: blue;
Highligheted colours $border-color and $border-color-dark Column Block ![Screen Shot 2020-09-17 at 2 45 49 PM](https://user-images.githubusercontent.com/115071/93531677-7bbe5000-f8f4-11ea-95b7-932577a8c7cc.png)

Media Text Block
Screen Shot 2020-09-17 at 2 46 08 PM

Cover Block
Screen Shot 2020-09-17 at 2 45 10 PM

Buttons Block
Screen Shot 2020-09-17 at 2 46 27 PM

Contact Info Block
Screen Shot 2020-09-17 at 2 46 52 PM

$modal-border-color and $modal-border-color-dark

Toolbar
Screen Shot 2020-09-17 at 2 49 38 PM

Model colours
Screen Shot 2020-09-17 at 3 20 46 PM
Screen Shot 2020-09-17 at 3 20 51 PM

.
Screen Shot 2020-09-17 at 2 51 00 PM

Screen Shot 2020-09-17 at 2 49 59 PM
Screen Shot 2020-09-17 at 2 50 14 PM

$drag-indicator and $drag-indicator-dark.

Notice the yellow drag handle.
Screen Shot 2020-09-17 at 2 50 14 PM

$spacer-color and $spacer-color-dark.
Spacer Block
Screen Shot 2020-09-17 at 2 44 34 PM

With the true colours.

iOS

Screen Shot 2020-09-17 at 3 27 13 PM
Screen Shot 2020-09-17 at 3 27 20 PM
Screen Shot 2020-09-17 at 3 27 24 PM
Screen Shot 2020-09-17 at 3 27 30 PM
Screen Shot 2020-09-17 at 3 27 35 PM
Screen Shot 2020-09-17 at 3 27 44 PM

Toolbar
Screen Shot 2020-09-17 at 3 28 25 PM

Modal
Screen Shot 2020-09-17 at 3 28 49 PM
Screen Shot 2020-09-17 at 3 29 52 PM
Screen Shot 2020-09-17 at 3 29 41 PM

iOS DarkMode
Screen Shot 2020-09-17 at 3 32 51 PM
Screen Shot 2020-09-17 at 3 33 00 PM
Screen Shot 2020-09-17 at 3 33 13 PM
Screen Shot 2020-09-17 at 3 33 30 PM

Modal
Screen Shot 2020-09-17 at 3 31 59 PM
Screen Shot 2020-09-17 at 3 32 37 PM
Screen Shot 2020-09-17 at 3 31 26 PM

Screen Shot 2020-09-17 at 3 33 41 PM
Screen Shot 2020-09-17 at 3 33 48 PM

Toolbar
Screen Shot 2020-09-17 at 3 34 57 PM

Android

Blocks

Screen Shot 2020-09-17 at 3 43 11 PM
Screen Shot 2020-09-17 at 3 43 21 PM
Screen Shot 2020-09-17 at 3 43 32 PM
Screen Shot 2020-09-17 at 3 43 40 PM
Screen Shot 2020-09-17 at 3 43 54 PM
Screen Shot 2020-09-17 at 3 45 18 PM
Screen Shot 2020-09-17 at 3 45 44 PM
Screen Shot 2020-09-17 at 3 46 04 PM

Toolbar
Screen Shot 2020-09-17 at 3 44 06 PM

Modal
Screen Shot 2020-09-17 at 3 44 37 PM
Screen Shot 2020-09-17 at 3 44 50 PM

DarkMode

Blocks

Screen Shot 2020-09-17 at 3 47 10 PM
Screen Shot 2020-09-17 at 3 47 22 PM
Screen Shot 2020-09-17 at 3 47 33 PM
Screen Shot 2020-09-17 at 3 47 41 PM
Screen Shot 2020-09-17 at 3 47 51 PM

Modal
Screen Shot 2020-09-17 at 3 48 21 PM
Screen Shot 2020-09-17 at 3 48 34 PM
Screen Shot 2020-09-17 at 3 48 55 PM
Screen Shot 2020-09-17 at 3 49 08 PM

Toolbar
Screen Shot 2020-09-17 at 3 48 04 PM

Types of changes

Color Refactor.

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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 17, 2020

Size Change: 0 B

Total Size: 1.2 MB

ℹ️ View Unchanged
Filename Size Change
build/a11y/index.js 1.14 kB 0 B
build/annotations/index.js 3.52 kB 0 B
build/api-fetch/index.js 3.34 kB 0 B
build/autop/index.js 2.72 kB 0 B
build/blob/index.js 620 B 0 B
build/block-directory/index.js 8.41 kB 0 B
build/block-directory/style-rtl.css 943 B 0 B
build/block-directory/style.css 942 B 0 B
build/block-editor/index.js 128 kB 0 B
build/block-editor/style-rtl.css 11.1 kB 0 B
build/block-editor/style.css 11.1 kB 0 B
build/block-library/editor-rtl.css 8.59 kB 0 B
build/block-library/editor.css 8.59 kB 0 B
build/block-library/index.js 135 kB 0 B
build/block-library/style-rtl.css 7.6 kB 0 B
build/block-library/style.css 7.59 kB 0 B
build/block-library/theme-rtl.css 741 B 0 B
build/block-library/theme.css 741 B 0 B
build/block-serialization-default-parser/index.js 1.77 kB 0 B
build/block-serialization-spec-parser/index.js 3.1 kB 0 B
build/blocks/index.js 47.5 kB 0 B
build/components/index.js 202 kB 0 B
build/components/style-rtl.css 15.5 kB 0 B
build/components/style.css 15.5 kB 0 B
build/compose/index.js 9.42 kB 0 B
build/core-data/index.js 12 kB 0 B
build/data-controls/index.js 1.27 kB 0 B
build/data/index.js 8.43 kB 0 B
build/date/index.js 31.9 kB 0 B
build/deprecated/index.js 772 B 0 B
build/dom-ready/index.js 568 B 0 B
build/dom/index.js 4.42 kB 0 B
build/edit-navigation/index.js 10.4 kB 0 B
build/edit-navigation/style-rtl.css 868 B 0 B
build/edit-navigation/style.css 871 B 0 B
build/edit-post/index.js 306 kB 0 B
build/edit-post/style-rtl.css 6.24 kB 0 B
build/edit-post/style.css 6.22 kB 0 B
build/edit-site/index.js 19.6 kB 0 B
build/edit-site/style-rtl.css 3.3 kB 0 B
build/edit-site/style.css 3.3 kB 0 B
build/edit-widgets/index.js 17.6 kB 0 B
build/edit-widgets/style-rtl.css 2.79 kB 0 B
build/edit-widgets/style.css 2.79 kB 0 B
build/editor/editor-styles-rtl.css 492 B 0 B
build/editor/editor-styles.css 493 B 0 B
build/editor/index.js 45.3 kB 0 B
build/editor/style-rtl.css 3.8 kB 0 B
build/editor/style.css 3.8 kB 0 B
build/element/index.js 4.45 kB 0 B
build/escape-html/index.js 733 B 0 B
build/format-library/index.js 7.49 kB 0 B
build/format-library/style-rtl.css 547 B 0 B
build/format-library/style.css 548 B 0 B
build/hooks/index.js 1.74 kB 0 B
build/html-entities/index.js 622 B 0 B
build/i18n/index.js 3.54 kB 0 B
build/is-shallow-equal/index.js 711 B 0 B
build/keyboard-shortcuts/index.js 2.39 kB 0 B
build/keycodes/index.js 1.85 kB 0 B
build/list-reusable-blocks/index.js 3.02 kB 0 B
build/list-reusable-blocks/style-rtl.css 476 B 0 B
build/list-reusable-blocks/style.css 476 B 0 B
build/media-utils/index.js 5.12 kB 0 B
build/notices/index.js 1.69 kB 0 B
build/nux/index.js 3.27 kB 0 B
build/nux/style-rtl.css 671 B 0 B
build/nux/style.css 668 B 0 B
build/plugins/index.js 2.44 kB 0 B
build/primitives/index.js 1.34 kB 0 B
build/priority-queue/index.js 789 B 0 B
build/redux-routine/index.js 2.85 kB 0 B
build/rich-text/index.js 13.7 kB 0 B
build/server-side-render/index.js 2.6 kB 0 B
build/shortcode/index.js 1.7 kB 0 B
build/token-list/index.js 1.24 kB 0 B
build/url/index.js 4.06 kB 0 B
build/viewport/index.js 1.74 kB 0 B
build/warning/index.js 1.13 kB 0 B
build/wordcount/index.js 1.17 kB 0 B

compressed-size-action

@enejb enejb self-assigned this Sep 17, 2020
@enejb enejb 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 Sep 17, 2020
@enejb
Copy link
Copy Markdown
Contributor Author

enejb commented Sep 17, 2020

Just pushed a change that updates the dark mode to
Screen Shot 2020-09-17 at 4 52 06 PM
Screen Shot 2020-09-17 at 4 51 58 PM
Screen Shot 2020-09-17 at 4 51 55 PM

And light more do
Screen Shot 2020-09-17 at 4 54 38 PM
Screen Shot 2020-09-17 at 4 54 59 PM
Screen Shot 2020-09-17 at 4 55 06 PM

@enejb enejb force-pushed the RN/add-border-color-tokens branch from b634d70 to 478ffc8 Compare September 22, 2020 00:30
@guarani
Copy link
Copy Markdown
Contributor

guarani commented Nov 4, 2020

This PR focuses on border colors, but I just want clarify one aspect of this, dashed border colors.

Looking at the changes regarding dashed border colors, I see:

Before After
$gray (#87a6bc)
light-gray-500 (#e2e4e7)
$border-dashed-color (rgba($black, 0.25))
$gray-70 (#3c434a)
rgba($color: $light-gray-500, $alpha: 0.3)
$border-dashed-color-dark (rgba($white, 0.27))

What I don't understand is where these conversions are coming from, could you please clarify this?

Also, I'm not able to test this unfortunately, the branch needs updating and I get quite a few linter errors when running git merge --continue after manually resolving the conflicts. Let me know if there's anything I can do to help.

@iamthomasbishop
Copy link
Copy Markdown

What I don't understand is where these conversions are coming from, could you please clarify this?

@guarani Good question! They're discrete values, chosen specifically so that the optical weight of the dashed border is roughly the same as the standard border when side-by-side.

Base automatically changed from master to trunk March 1, 2021 15:44
@guarani guarani removed their request for review February 7, 2022 18:52
@guarani
Copy link
Copy Markdown
Contributor

guarani commented Feb 7, 2022

Un-assigning myself here as I'm no longer working on the editor part of the app.

@enejb
Copy link
Copy Markdown
Contributor Author

enejb commented Aug 3, 2022

I am closing this now since I think we should come up with a different approach to unifying the colours in the editor. This PR was trying to do too much.

@enejb enejb closed this Aug 3, 2022
@johnbillion johnbillion deleted the RN/add-border-color-tokens branch April 22, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants