Skip to content

feat: add list view toggle to chart library with user meta persistence#1285

Open
HardeepAsrani wants to merge 3 commits intodevelopmentfrom
feat/issue-510
Open

feat: add list view toggle to chart library with user meta persistence#1285
HardeepAsrani wants to merge 3 commits intodevelopmentfrom
feat/issue-510

Conversation

@HardeepAsrani
Copy link
Member

Summary

Adds a grid/list view toggle to the Visualizer library page. List view renders charts in a WP-style table. The selected view is saved to user meta so it persists across visits without a redirect.

  • List view: WP table layout, no canvas rendering, tooltips on actions
  • Shortcode cell is clickable to copy to clipboard with visual feedback
  • View preference saved via update_user_meta() with allowlist validation
  • 10 Playwright e2e tests covering toggle, persistence, and table content

Will affect visual aspect of the product

YES

Screenshots

Screenshot 2026-03-17 at 7 30 39 AM

Test instructions

  • Make sure the List/Grid layouts both work properly.
  • Make sure the change of layouts is persistent.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/visualizer-pro/issues/510.

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Mar 17, 2026
@pirate-bot
Copy link
Contributor

pirate-bot commented Mar 17, 2026

Plugin build for 0010c70 is ready 🛎️!

Adds a grid/list view toggle to the Visualizer library page. List view
renders charts in a WP-style table. The selected view
is saved to user meta so it persists across visits without a redirect.

- List view: WP table layout, no canvas rendering, tooltips on actions
- Shortcode cell is clickable to copy to clipboard with visual feedback
- View preference saved via update_user_meta() with allowlist validation
- 10 Playwright e2e tests covering toggle, persistence, and table content
@rodica-andronache
Copy link
Contributor

@HardeepAsrani

  • Can we move the notice at the top? Right now, not sure why, it appears after two charts like this
image
  • The download PNG is missing from the List view. Can it be added?
image
  • For the Edit button, can we add the "Edit" text with the little crayon icon instead of the wheel?

@HardeepAsrani
Copy link
Member Author

The download PNG is missing from the List view. Can it be added?

No, we can't. The chart needs to be rendered for us to screenshot it.

@rodica-andronache
Copy link
Contributor

@HardeepAsrani I can't see the changes. The notice is still at the bottom in List view
image
now, the previous notice is back in Grid mode
image
the Edit button is the same.

I'm missing something?

@HardeepAsrani
Copy link
Member Author

@rodica-andronache No, it was my fault. Should be fine now.

@rodica-andronache
Copy link
Contributor

@HardeepAsrani thanks! The notice should be the same in both views.
How it's now in list view
image
It should be in Grid too. I see the old one
image

Also, can we add the "Edit" text to the Edit button?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants