pootlepress / sfx-page-customizer

Page Customizer for Storefront
0 stars 0 forks source link

Storefront extension boilerlplate #12

Closed nickburne closed 9 years ago

nickburne commented 9 years ago

Hi Shramee,

I asked for this to be used when this plugin was first created. Now WooThemes have reviewed and are saying:

"Should use Storefront extension boilerplate. I had a quick look through the code and it's missing some key components. I'm afraid we'll have to be a stickler on this, it's very important that all extensions share a common codebase."

We REALLY need to use ALL of the boilerplate. Can you please do this?

https://github.com/woothemes/storefront-extension-boilerplate

shramee commented 9 years ago

Hi, First Column shows the issues secong one shows whether or not I got it corrected and third the comments. Feel free to pose disconnections, in fact that's why I've put it here ; )

Stuff Missing (M)/Structural Difference (D) Did I? Comments
M - Plugin Comment Y Thought was important
M - Woo Components Y Included woo-functions file and used woothemes plugin update
D - Hooks in __Construct Y We just added all the hooks on activation, whereas in boilerplate hooks are added only if theme is SF
D - Hooks in [plugin]_setup
D - Pootle Updater ? Both for now, lemme know if I should remove one
D - Woo Plugin Updater
M - Customize preview init javascript N We are not using the transport postMessage so not required
M - Body Class on activation Y Adds CSS class sfx-page-customizer-active to the body
M - Admin Notices functionality Y Our plugin didn’t have admin notices functionality!
M - Notice on welcome Y ‘Thanks for installing...’ with link to customizer, We can also mod it, (a pleasing note on activation, Good. Ain’t it?)
M - Plugin links Y Neat links to docs and support on the plugin page besides deactivate
shramee commented 9 years ago

I was thinking that I was missing something finally I realize that I forgot to remove the more section using storefront filter 'storefront_customizer_more', I had put that code but had commented it while testing : P Putting it right away.

shramee commented 9 years ago

Not exactly addressing that but I made a structural change in which no matter how many meta we create all are going to be saved automatically, notice near line 218, earlier we had three different sections ( four lines each ) for three metas, now we can have as many meta fields as we want saved by those 7 lines of code (foreach loop). I am sure this will help save our time in future.

nickburne commented 9 years ago

Ok - from above list:

D - Pootle Updater - keep this D - Woo Plugin Updater - keep this M - Customize preview init javascript - we need to include EVERYTHING from the boilderplate please.

So is this now EXACTLY the SAME as the boilerplate? All the same files?

shramee commented 9 years ago

We got a little different folder structure let me know if that could be a problem. I'll include 'Customize preview init javascript' I got both updaters included.

nickburne commented 9 years ago

Yes that is a problem! Is has to be EXACTLY the same. It may be that we need to re-build it from the boilderplate I think... This is what I asked the other developers to do from the beginning but they ignored me!

shramee commented 9 years ago

So I'd like to do this first : )

shramee commented 9 years ago

Its got a lot of useful stuff, glad we started it from the beginning!!

nickburne commented 9 years ago

CooL!

nickburne commented 9 years ago

Is this done? (you didn't post a comment yet)

shramee commented 9 years ago

Nope, I missed main plugin file, committing it shortly.

shramee commented 9 years ago

Sorry....

shramee commented 9 years ago

Done, Kindly check this one too.

nickburne commented 9 years ago

Looks great!