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

Meta fields aren't represented in UI diff #12

Open
mboynes opened this issue Jul 2, 2015 · 7 comments
Open

Meta fields aren't represented in UI diff #12

mboynes opened this issue Jul 2, 2015 · 7 comments

Comments

@mboynes
Copy link

mboynes commented Jul 2, 2015

This can be somewhat tricky because the meta values are expected to always be strings. See https://core.trac.wordpress.org/ticket/29920.

@adamsilverstein
Copy link
Owner

adamsilverstein commented Apr 17, 2016

@mboynes

I take a first pass at this in https://github.com/adamsilverstein/wp-post-meta-revisions/tree/features/display-meta-on-revisions-ui - help testing/developing appreciated.

Looks like this:

http://cl.ly/0o212l3e0O09

@citelao
Copy link

citelao commented May 28, 2016

Why did this peter out? The UI lgtm

@adamsilverstein
Copy link
Owner

@citelao Thanks for taking an interest here!

I can assure you this has NOT petered out, progress waxes and wanes with my time availability, I am still working on it and welcome contributions. I think the biggest thing I want to improve is the way the fields are displayed - at least adding some filters so developers can customize what gets shown on the revisions screen. I think many developers use post meta for things other than pure strings they may want to represent differently in the diff.

Please let me know if you have any questions or feedback about this and also maybe tell me how you plan to use it.

@citelao
Copy link

citelao commented Jun 14, 2016

Here's my briefest thoughts on the UI:

  • A developer might like to change a row's output and column name. So add filters to both, allowing HTML.
  • A developer might like to "merge" rows or create new ones, so add a filter that generates a list of rows.

A developer can then create rows in the view as needed through the second filter and modify output through the first filters (if statements by row name, while inelegant, seem to be WP's solution to everything).

So long as developers have full control over the output (which it seems they do with such a filter schema), there should be no problem shipping such a UI. You could even add a third filter that allows HTML in the revision UI outside the table and a fourth that disables the table completely.

My use case is fairly simple... I have a few custom post types running almost entirely on custom meta, and I just need a simple table of all the content (with the ability to write in custom names in place of the internal meta-key names). Perhaps I would filter some of my many-to-many relationships to display the linked posts, but that's not necessary. Both things I could do with the suggested filter scheme.

Thoughts?

@adamsilverstein
Copy link
Owner

Thanks for the feedback @citelao. I agree additional filters here would be helpful, although I haven't decided exactly where to put them.

Continuing to work on this issue in #20

@citelao
Copy link

citelao commented Feb 7, 2017

@adamsilverstein happy to work further with you on this, though my availability also waxes and wanes 😁

@adamsilverstein
Copy link
Owner

Adding a display callback support would be great: see #2 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants