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

Issue 484 - Combine Connectors and Contexts into a single column #537

Closed
wants to merge 41 commits into from

Conversation

lukecarbis
Copy link
Contributor

Resolves #484.

@frankiejarrett frankiejarrett self-assigned this May 20, 2014
Conflicts:
	includes/list-table.php
@@ -160,6 +157,14 @@ function get_records() {
}
$args['paged'] = $this->get_pagenum();

$context = explode( '-', wp_stream_filter_input( INPUT_GET, 'context' ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

@lukecarbis This logic seems to fail when you have a context that is multiple words, such as Main Menu or Primary Sidebar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From memory I thought this would work because these are always underscored, not dashed.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, the context for Main Menu shows up as context=menus-main-menu.

Which executes a query for $args['connector'] = 'menus' and $args['context'] = 'main'.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lukecarbis My thought is the cleanest way to implement this would be to use JS to draw a distinction between top-level items and sub-level items in the Context input and use the proper query string based on that.

e.g. ?connector=menus&context=main-menu

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@lukecarbis
Copy link
Contributor Author

Thanks for your help @fjarrett - this is looking good. Please continue your review. 😺

@@ -756,3 +788,9 @@ jQuery(function($){
intervals.init( $('.date-interval') );
});
});

jQuery.extend({
getQueryParameters : function( str ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@lukecarbis Do you think we should prefix this function name?

Copy pasta straight from: http://css-tricks.com/snippets/jquery/get-query-params-object/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! Good pickup.

@frankiejarrett
Copy link
Contributor

@lukecarbis Oh, it's also worth noting that Data Exporter, Notifications and Reports will all need to be updated to use this new UI.

@frankiejarrett
Copy link
Contributor

@lukecarbis This looks great. I'm going to close this PR though and please reissue one against the 2.0.0 branch.

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

Successfully merging this pull request may close these issues.

Refactoring the UI for improved Connector/Context/Action display
3 participants