Alex Ciobica
Member
Plugin Contributor
Posted 2 years ago #
I know you're working on improvements on the UI and I'm not sure what you're planning but I'd like to throw some ideas at you:
- Support for asterisk in the search box to show all, or the addition of a show all button. This could either just generate a list with all results or add a drop down with all items to select from to avoid issues when there are too many posts.
- The ability to customize all interface elements elements at connection registering. Also, the addition of support for different messages for each post type when reciprocal relations are involved.
E.g.:
$args = array(
'from' => 'book',
'to' => 'author',
'reciprocal' => true,
'title' => array( 'Authors', 'Books written by this Author' ),
'label' => array( 'Search authors', 'Search books' ),
'description' => array ( 'Use * to see all authors. Click to add', 'Use * to see all books. Click to add.' )
);
p2p_register_connection_type( $args );
would result in:
http://i.imgur.com/lblI8.png for the "Add book" perspective.
Tell me if I can help.
Here's what the new UI looks like:
http://wordpress.org/support/topic/plugin-posts-2-posts-how-to-add-info-to-connection/page/2?replies=62#post-2002746
The "Show all" button has been on my mind for some time. Care to make a mock-up with it?
As for the labels, they're translatable, so they're already customizable in a way. Will revisit after the UI is more stable.
I was thinking of adding some tabs, like on the menu page: "Recent", "View All" and "Search".
By the way, if you really want to control every character in the box, you can set the 'box' argument to your own class and overwrite the box() method.
Alex Ciobica
Member
Plugin Contributor
Posted 2 years ago #
The "Show all" button has been on my mind for some time. Care to make a mock-up with it?
Maybe something like this (when the show button is pressed)?
And like this , when searching for something. The buttons at the bottom could be replaced by tabs.
The info button could show the description in a speech bubble.
I like the + icon. It allows the title link to always send you to that post's editing screen, regardless if the connection was created yet or not. Are those icons available somewhere?
With those in place and the "Type to search for books" text, is the info button even necessary?
Also keep in mind that it can get pretty wide:
http://i.imgur.com/0E6yx.png
Alex Ciobica
Member
Plugin Contributor
Posted 2 years ago #
First, lemme say, this is fun!
I like the + icon. It allows the title link to always send you to that post's editing screen, regardless if the connection was created yet or not.
Actually I imagined it as a visual reminder that when clicked, that item is added.
This could be a better solution.
The Fields icon could launch a speech bubble modal with the list of fields, as for many fields the interface becomes unusable in the narrow column.
With those in place and the "Type to search for books" text, is the info button even necessary?
Probably not. Can be dropped.
Also keep in mind that it can get pretty wide...
Maybe something like this for the wide version?
The only weird thing is the space after the search input.
Here are the icons
Are those icons made by you? If so, awesome! and would you be willing to release them under the GPL?
If not, I need to know the original source, for licensing info.
The Fields icon could launch a speech bubble modal with the list of fields, as for many fields the interface becomes unusable in the narrow column.
No no no; modal windows are evil. I'm thinking of automatically making it wide if the number of fields is larger than 1.
Modesty
Member
Posted 2 years ago #
Alex Ciobica
Member
Plugin Contributor
Posted 2 years ago #
No no no; modal windows are evil.
:)
I'm thinking of automatically making it wide if the number of fields is larger than 1.
That'll work.
If not, I need to know the original source, for licensing info.
Not mine. They're Alexey Egorov's who's in dire need of a proper site.
Lemme know if want help with the coding.
Latest incarnation: http://i.imgur.com/xln2Y.png (no "show recent" button yet).
Feel free to make a fork on github to add it, if you're itching to code. :)
@Modesty: Yeah, the silk icon set is very popular, but kind of distracting.
owenwalz
Member
Posted 2 years ago #
Great interface. An auto-fill for relationship fields would be very helpful (sorry to be redundant here... this was mentioned in another post).
There's no point in repeating the same request over and over, especially since you created a separate thread for it.
What WPMUDEV said (which was actually me :P).