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

[M3] Components - Data Table #328

Closed
igruszkauy opened this issue Apr 2, 2022 · 14 comments · Fixed by #383
Closed

[M3] Components - Data Table #328

igruszkauy opened this issue Apr 2, 2022 · 14 comments · Fixed by #383
Projects
Milestone

Comments

@igruszkauy
Copy link
Collaborator

igruszkauy commented Apr 2, 2022

Feature description

Update Data Table component to match M3 style


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

image

  • When the user opens Gutenberg page with m2 component it automatically migrates to M3

Implementation brief

QA testing instructions

  • Download current version of plugin from wp.org, Install add data table and table component.
  • Download the latest version of plugin and theme and upgrade and open post in backend:
    • Previous block should be migrated to the new version.
    • Default table block should be migrated to WP core table.
    • Verify frontend is looking like the one in https://m3.material.io/foundations/design-tokens/overview for material data table.
    • Verify WP core table should look material without rounded edges. (Due to WP core markup is not compatible with material design).

Demo

Changelog entry

@igruszkauy igruszkauy added this to To Groom / Define in Execution Apr 2, 2022
@igruszkauy igruszkauy moved this from To Groom / Define to To Do in Execution May 24, 2022
@PatelUtkarsh PatelUtkarsh self-assigned this May 30, 2022
@PatelUtkarsh PatelUtkarsh added this to the M3 milestone Jun 25, 2022
@igruszkauy igruszkauy moved this from To Do to In Progress in Execution Jul 5, 2022
@PatelUtkarsh PatelUtkarsh mentioned this issue Jul 12, 2022
4 tasks
@mattchungxwp
Copy link
Collaborator

Confirm with @rodydavis : Which M3 color tokens to use for the border and header background.

@PatelUtkarsh
Copy link
Collaborator

Hello @rodydavis ,

As per material site:

  1. Border is using --mio-theme-color-surface-variant which seems like --md-sys-color-surface-variant
  2. Table header (TD) is using --mio-theme-color-surface-1 as background, we don't have suface-1 should we assume --md-sys-color-surface?

After doing above data table with generated theme looks like following:

image

If we use 1 and 2 both as --md-sys-color-surface-variant then it looks like following:

image

Which m3 token should we use for border and background for td?

@PatelUtkarsh
Copy link
Collaborator

PatelUtkarsh commented Jul 14, 2022

Outline for border; Between headers use on surface varient; Background is --md-sys-color-surface.

@PatelUtkarsh
Copy link
Collaborator

Hello @rodydavis,

Here is a table heading with surface variant. (Border inside header is using on surface variant)

surface-varient-encoded.mp4

If we use table heading background as surface, it matches the page background. See below:

image

While m3 reference site is using surface-1; Should we continue to use surface variant?

Screenshot for reference:

image

@PatelUtkarsh PatelUtkarsh moved this from In Progress to Code Review in Execution Jul 15, 2022
Execution automation moved this from Code Review to Done Jul 25, 2022
@emeaguiar emeaguiar moved this from Done to QA in Execution Jul 25, 2022
@PatelUtkarsh
Copy link
Collaborator

@rodydavis to provide designer feedback on the ticket.

@PatelUtkarsh
Copy link
Collaborator

Confirmed on call: Okay to use surface variant.

@felipebochehin87
Copy link
Collaborator

@PatelUtkarsh

  • when I upgrade my local site to use the latest version, I see issues in the table borders. They're not rounded. I manually changed the Global Corner Styles, but I still see the square borders;
  • the footer doesn't have the same background color as the header. The header is being automatically set to a color, but the footer is not.

settings local

table local

@felipebochehin87 felipebochehin87 moved this from QA to In Progress in Execution Jul 29, 2022
@PatelUtkarsh
Copy link
Collaborator

@felipebochehin87 Is this material block or WP core table block?

@felipebochehin87
Copy link
Collaborator

@PatelUtkarsh you're right, I checked the wrong table on local, sorry. It is working in dev and in local using the correct table. Thanks for pointing that out. Moving to UAT.

@felipebochehin87 felipebochehin87 moved this from In Progress to QA in Execution Jul 29, 2022
@felipebochehin87 felipebochehin87 moved this from QA to Demo in Execution Jul 29, 2022
@igruszkauy
Copy link
Collaborator Author

igruszkauy commented Jul 31, 2022

I installed locally and this is what I am seeing after updating. @felipebochehin87 can you please post screenshots of how you are seeing the new components migrated? I am not sure if I am doing something wrong

BEFORE
image

AFTER
image

@felipebochehin87
Copy link
Collaborator

@igruszkauy here's a video of how I tested in my local site (BTW, I used "Data Table (Material)" to test this).

2022_08_01_08_50_21.mp4

@igruszkauy igruszkauy moved this from Demo to QA in Execution Aug 1, 2022
@felipebochehin87
Copy link
Collaborator

In a fresh install, the new table (Material) is not displaying the round corners, the lines between the cells... This is working for me in an existing site.

image

@felipebochehin87 felipebochehin87 moved this from QA to In Progress in Execution Aug 2, 2022
@PatelUtkarsh
Copy link
Collaborator

Hello @felipebochehin87, Does this work post colour generation from customizer and saving it?

image

I tested m3 zip with fresh WordPress and post color generation in customizer this seems to work for me. Can you give it a try?

Steps:

  1. Fresh installation of WP.
  2. Add theme and plugin zip.
  3. Activate theme and plugin.
  4. Create post with material data table, Border is not visible. Save draft or publish.
  5. Go to /wp-admin/customize.php
  6. Material design option -> Color Palette.
  7. Click random generation icon or pick any color.
  8. Save
  9. Go back to post in backend and refresh. Verify frontend.

@PatelUtkarsh PatelUtkarsh moved this from In Progress to QA in Execution Aug 2, 2022
@igruszkauy
Copy link
Collaborator Author

Works as expected, besides the need of choosing source color if coming from a new install.

@igruszkauy igruszkauy moved this from QA to Demo in Execution Aug 5, 2022
Execution automation moved this from Demo to Done Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

6 participants