simonyeldon / bootstrap-shortcodes

WordPress shortcodes for easier use of Bootstrap elements in your content.
http://wp-snippets.com/freebies/shortcodes-for-twitter-bootstrap
4 stars 1 forks source link

Help Tab #27

Closed MWDelaney closed 11 years ago

MWDelaney commented 11 years ago

Once again my most sincere apologies for all the spam.

Since I can't seem to figure out how to keep feature branches from eating themselves on merge, this pull request has all the changes I've made in my fork of bootstrap-shortcodes including organizing the files into an includes subdirectory, and the Help Tab.

Both you, @simonyeldon, and @filipstefansson should weigh in on whether we want the help tab or not. It's a pretty significant design decision and it's not one I, as a contributor who opens and closes ten incorrect pull requests in a day, am comfortable making. Details are below:

Help Tab This is a tab that will appear next to the "Add Media" button in WordPress. It pops up a ThickBox showing the README.md documentation, which means there's only one piece of documentation to update.

I think that our target audience with these shortcodes is slightly more advanced than your average end-user. As such I think showing the documentation is a really good way to educate and inform without cluttering up TinyMCE with tons of buttons.

What Bootstrap user isn't constantly referring to documentation?

Here's what the tab looks like: screen shot 2013-09-14 at 7 55 03 am

And here's the popup it displays: screen shot 2013-09-16 at 10 20 33 am

filipstefansson commented 11 years ago

Maybe open it in a regular popup instead of in a lightbox? That way you can edit your content and copy/paste from the docs. That's not possible with a lightbox solution.

simonyeldon commented 11 years ago

I am going to hold off of merging this one as it has the jumbotron and lead in it. Once I have merged that pull request I can merge this one.

As it stands, I have no issue at all with this help being a popup, I think that it is a good idea. @filipstefansson might have something else to say about it as he has an actual plugin page that he might prefer the plugin linked to.

n.b: if you want some help with how to branch etc then let me know. :wink:

MWDelaney commented 11 years ago

@simonyeldon My reasoning for using the help file rather than a link is that this way the documentation being shown to the user will always be accurate to the version of the plugin running.

@filipstefansson I was basing this method on what other plugins seem to do. I think users expect a lightbox when clicking a media button, but I'm open to the suggestion.

One outstanding issue is that when you copy/paste from the examples it brings along the PRE and CODE tags, which are made invisible by the visual editor, and break the shortcodes until you go to the text editor and edit them out. I'm going to look into stripping those out of the copy/paste without losing the formatting in the documentation as well.

MWDelaney commented 11 years ago

b4d03df adds buttons to the help-tab popup which insert the example codes from the documentation into the TinyMCE editor. How's that for splitting the difference?

simonyeldon commented 11 years ago

Merged into the Bootstrap3 branch