Skip to content

Issue/1750 aztec design changes#2200

Merged
AmandaRiu merged 8 commits intodevelopfrom
issue/1750-aztec-design-changes
Apr 15, 2020
Merged

Issue/1750 aztec design changes#2200
AmandaRiu merged 8 commits intodevelopfrom
issue/1750-aztec-design-changes

Conversation

@anitaa1990
Copy link
Copy Markdown
Contributor

@anitaa1990 anitaa1990 commented Apr 6, 2020

Fixes #1750 by adding design changes to the Aztec Toolbar editor.

Note that this PR is in draft till this Aztec PR is merged and then we would need to update the hash to this branch before it can be merged.

I decided to implement this change in the dark mode branch since it updates styles and colors to the Aztec editor.

Screenshots

Light Mode:

. .

Dark mode

. .

To test

  • Testing in API 28, 28, 21 and 23 with both dark and light mode would be great.
  • General smoke testing the Aztec toolbar to ensure that everything is working as expected.

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@anitaa1990 anitaa1990 added needs: design Requires design input/work from a designer. feature: product details Related to adding or editing products, includes product settings. labels Apr 6, 2020
@anitaa1990 anitaa1990 added this to the 4.1 milestone Apr 6, 2020
@anitaa1990 anitaa1990 requested a review from Garance91540 April 6, 2020 14:40
@AmandaRiu AmandaRiu self-assigned this Apr 6, 2020
@AmandaRiu
Copy link
Copy Markdown
Contributor

Nice! You figured out the toolbar styling! That's amazing. Now I'm wondering how I missed it. Let me know when this one is ready for an official review.

@anitaa1990
Copy link
Copy Markdown
Contributor Author

anitaa1990 commented Apr 7, 2020

Thanks @AmandaRiu! This PR is in draft till this Aztec PR changes have been reviewed.

Garance91540
Garance91540 previously approved these changes Apr 7, 2020
Copy link
Copy Markdown

@Garance91540 Garance91540 left a comment

Choose a reason for hiding this comment

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

🎉

@Garance91540 Garance91540 removed the needs: design Requires design input/work from a designer. label Apr 7, 2020
@AmandaRiu
Copy link
Copy Markdown
Contributor

Thanks @AmandaRiu! This PR is in draft till this Aztec PR changes have been reviewed.

Oh! Ok now it all makes better sense. You've added those changes to the aztec library. Very cool. Nice work!

@anitaa1990 anitaa1990 changed the base branch from feature/dark-mode to develop April 8, 2020 03:44
@anitaa1990 anitaa1990 dismissed Garance91540’s stale review April 8, 2020 03:44

The base branch was changed.

@peril-woocommerce
Copy link
Copy Markdown

peril-woocommerce bot commented Apr 8, 2020

You can test the changes on this Pull Request by downloading the APK here.

Garance91540
Garance91540 previously approved these changes Apr 8, 2020
@anitaa1990 anitaa1990 requested review from Garance91540 and removed request for Garance91540 April 10, 2020 07:11
@anitaa1990 anitaa1990 marked this pull request as ready for review April 10, 2020 07:54
@anitaa1990
Copy link
Copy Markdown
Contributor Author

@AmandaRiu PR ready for review 👍

Copy link
Copy Markdown
Contributor

@AmandaRiu AmandaRiu left a comment

Choose a reason for hiding this comment

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

@anitaa Thank you for taking care of styling this toolbar. There are some code comments below to point out places where the deprecated values/files have been used.

After a close review of the changes and style options available I think we should try to style the AztecEditor toolbar exactly the same as the bottom bar in the main screens for consistency. I've made a few changes to how we're organizing the styles due to the way the styling is implemented in the AztecEditor side of things that requires overriding the library’s AztecToolbarStyle directly and doesn’t allow for extending it for customized styles or defining a theme-level style. The changes to support theming properly would be small so maybe we can get that added later. Either way it’s not a big deal.

I’ve created a new temporary branch with the recommend changes amanda/1750-aztec-design-changes (click on the link to view the diff). These include the following:

  • Add all style definitions to the AztecToolbarStyle style and move it to the new styles_base.xml file.
  • Remove the custom toolbar style and remove the style definition from the layout file.
  • Update the colors of available options to match the bottom navigation bar.

Here’s how these changes look. WDYT?

Before After
light-highlighted-before light-after-highlighted
light-disabled-before light-after-disabled-normal
dark-highlighted-before dark-after-highlighted
dark-disabled-before dark-after-disabled-normal

android:layout_width="match_parent"
android:layout_height="@dimen/min_tap_target"
app:toolbarBackgroundColor="@color/color_surface"
app:toolbarBorderColor="@color/wc_border_color"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a color from the now deprecated color file wc_colors.xml. The new colors are in the following files:

  • values/wc_colors_base.xml - these are the palette colors and should contain only hexidecimal color values
  • values/colors_base.xml + values-night/colors_base.xml - the light/dark color assignments and should use the colors defined in wc_colors_base.xml.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 7c91e3b 👍

Comment on lines +406 to +411
<style name="AztecToolbarStyle">
<item name="advanced">false</item>
<item name="toolbarIconNormalColor">@color/color_on_surface_medium</item>
<item name="toolbarIconHighlightColor">@color/color_primary</item>
<item name="toolbarIconDisabledColor">@color/color_on_surface_disabled</item>
</style>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This style has been added to the deprecated style file styles.xml. All new styles should be added to values/styles_base.xml.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops! My bad! I added everything to deprecated files 🤦‍♀️! Fixed in 7c91e3b

@anitaa1990
Copy link
Copy Markdown
Contributor Author

Thanks for the review @AmandaRiu! I'm good to make those changes to Aztec given that it's consistent with how our bottom navigation bar is displayed. I think it warrants a design review from @Garance91540 since this modifies the designs a little bit :D

@anitaa1990 anitaa1990 requested a review from Garance91540 April 13, 2020 02:59
Garance91540
Garance91540 previously approved these changes Apr 13, 2020
Copy link
Copy Markdown

@Garance91540 Garance91540 left a comment

Choose a reason for hiding this comment

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

👍

@anitaa1990
Copy link
Copy Markdown
Contributor Author

Fixed the requested changes @AmandaRiu! PR ready for another round 👍

@anitaa1990 anitaa1990 requested a review from AmandaRiu April 15, 2020 07:37
Copy link
Copy Markdown
Contributor

@AmandaRiu AmandaRiu left a comment

Choose a reason for hiding this comment

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

Beautiful work! 👍
:shipit:

@AmandaRiu AmandaRiu merged commit 2b7b8c5 into develop Apr 15, 2020
@AmandaRiu AmandaRiu deleted the issue/1750-aztec-design-changes branch April 15, 2020 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: product details Related to adding or editing products, includes product settings.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aztec editor: Design changes

3 participants