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

Public ideas board for Learn WordPress content #883

Open
hlashbrooke opened this issue Aug 11, 2022 · 7 comments · May be fixed by #1160
Open

Public ideas board for Learn WordPress content #883

hlashbrooke opened this issue Aug 11, 2022 · 7 comments · May be fixed by #1160
Assignees
Labels
Priority - Medium Medium priority issue. [Type] Enhancement New feature request for the Learn website.

Comments

@hlashbrooke
Copy link
Collaborator

hlashbrooke commented Aug 11, 2022

It would be great if we could have a public ideas board hosted directly on Learn WordPress where logged-in users can propose content ideas and there can be public voting. It doesn't need to be feature heavy and, in my estimation, would need the following to be included:

  • A new "Ideas" post type that includes title, description and comments
  • A front-end form for logged-in users to submit ideas, with a custom field for content type (tutorial, course, lesson plan or online workshop) - would only need title, description (ideally limited to a certain number of words), and the custom field.
  • A searchable archive of ideas on the frontend that can be filtered by idea status and ordered by number of votes
  • Comments enabled for logged-in users
  • A frontend UI element for upvoting an idea by logged-in users - this can be stored in a single custom field as an integer that is incremented with each vote
  • An array of usernames stored in a meta field on each idea to indicate who has voted to prevent them from voting a second time
  • A custom field for indicating the status of the idea - submitted, accepted, rejected, in progress, complete
  • A visual indicator in the dashboard list table and the edit screen showing number of votes
  • A way to change the idea status in the dashboard

That's about all I can think of - I don't feel like it's too intense in terms of development needs, but there could very well be something I'm not seeing.

@hlashbrooke hlashbrooke added [Type] Enhancement New feature request for the Learn website. Priority - Medium Medium priority issue. labels Aug 11, 2022
@hlashbrooke
Copy link
Collaborator Author

I started working on this, but then quickly realised I am woefully out of date with how to build with blocks in mind, so I only got as far as registering the post type. If anyone wants to work on this and have a very slight head start, here's that code:

// Register Custom Post Type
function wporg_ideas_register_post_type() {

	$labels = array(
		'name'                  => _x( 'Ideas', 'Post Type General Name', 'wporg_learn' ),
		'singular_name'         => _x( 'Idea', 'Post Type Singular Name', 'wporg_learn' ),
		'menu_name'             => __( 'Ideas', 'wporg_learn' ),
		'name_admin_bar'        => __( 'Idea', 'wporg_learn' ),
		'archives'              => __( 'Idea Archives', 'wporg_learn' ),
		'attributes'            => __( 'Idea Attributes', 'wporg_learn' ),
		'parent_item_colon'     => __( 'Parent Idea:', 'wporg_learn' ),
		'all_items'             => __( 'All Ideas', 'wporg_learn' ),
		'add_new_item'          => __( 'Add New Idea', 'wporg_learn' ),
		'add_new'               => __( 'Add New', 'wporg_learn' ),
		'new_item'              => __( 'New Idea', 'wporg_learn' ),
		'edit_item'             => __( 'Edit Idea', 'wporg_learn' ),
		'update_item'           => __( 'Update Idea', 'wporg_learn' ),
		'view_item'             => __( 'View Idea', 'wporg_learn' ),
		'view_items'            => __( 'View Ideas', 'wporg_learn' ),
		'search_items'          => __( 'Search Idea', 'wporg_learn' ),
		'not_found'             => __( 'Not found', 'wporg_learn' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'wporg_learn' ),
		'featured_image'        => __( 'Featured Image', 'wporg_learn' ),
		'set_featured_image'    => __( 'Set featured image', 'wporg_learn' ),
		'remove_featured_image' => __( 'Remove featured image', 'wporg_learn' ),
		'use_featured_image'    => __( 'Use as featured image', 'wporg_learn' ),
		'insert_into_item'      => __( 'Insert into idea', 'wporg_learn' ),
		'uploaded_to_this_item' => __( 'Uploaded to this idea', 'wporg_learn' ),
		'items_list'            => __( 'Ideas list', 'wporg_learn' ),
		'items_list_navigation' => __( 'Ideas list navigation', 'wporg_learn' ),
		'filter_items_list'     => __( 'Filter ideas list', 'wporg_learn' ),
	);

	$args   = array(
		'label'                 => __( 'Idea', 'wporg_learn' ),
		'description'           => __( 'Ideas submitted by site users', 'wporg_learn' ),
		'labels'              	=> $labels,
		'supports'            	=> array( 'title', 'editor', 'comments', 'revisions', 'custom-fields' ),
		'taxonomies'          	=> array( 'category', 'post_tag' ),
		'hierarchical'        	=> true,
		'public'              	=> true,
		'show_ui'             	=> true,
		'show_in_menu'        	=> true,
		'menu_position'       	=> 8,
		'menu_icon'           	=> 'dashicons-lightbulb',
		'show_in_admin_bar'   	=> true,
		'show_in_nav_menus'   	=> true,
		'can_export'          	=> true,
		'has_archive'         	=> 'ideas',
		'exclude_from_search' 	=> false,
		'publicly_queryable'  	=> true,
		'capability_type'     	=> 'post',
		'map_meta_cap'        	=> true,
		'show_in_rest'        	=> true,
	);
	register_post_type( 'wporg_idea', $args );

}
add_action( 'init', 'wporg_ideas_register_post_type', 0 );

@hlashbrooke
Copy link
Collaborator Author

A suggested existing plugin that we could use: https://wordpress.org/plugins/simple-feature-requests/ - I will test this soon.

@amitpatel0702
Copy link

Hi @hlashbrooke, Just checked the above plugin, it seems interesting. so do you suggest customizing it and merge it? or we can utilize free version and check for the same?

@azhiya
Copy link
Collaborator

azhiya commented Aug 16, 2022

HI, @hlashbrooke is the plan that these ideas will then be automatically added to our Content Projects board on GitHub? I can see the post being more accessible and easy to use than GitHub but how do we avoid duplication?

@hlashbrooke
Copy link
Collaborator Author

@azhiya GitHub is only really something that contributors see - my thinking is that this ideas board would be on Learn itself (not on Make) and we could move ideas to GitHub when we approve them. This would mean the ideas board is more readily open to learners and they don't need to navigate GitHub (which can be confusing for many people) in order to suggest content ideas.

@hlashbrooke
Copy link
Collaborator Author

@amitpatel0702 We could use the free version if it suits our needs. I tested it out, and it's OK, but I'm not fully sold on it as an option. I would much prefer if we could build our own solution as it would be lean and tailored to what we need without any extra fluff or needing a pro version.

@amitpatel0702
Copy link

Yes, Developing a custom solution will be the best way to deal with that. Because you never know when any feature might be pulled off from the free version and making us dependent on the same.

@adamwoodnz adamwoodnz added this to the Meetup 2022 milestone Oct 6, 2022
hlashbrooke added a commit that referenced this issue Dec 6, 2022
@hlashbrooke hlashbrooke linked a pull request Dec 6, 2022 that will close this issue
@Piyopiyo-Kitsune Piyopiyo-Kitsune self-assigned this Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority - Medium Medium priority issue. [Type] Enhancement New feature request for the Learn website.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

5 participants