themovation / th-widget-pack

Theme Widget Pack
19 stars 6 forks source link

Demo Importer - Style Selector #127

Closed ryanlabelle closed 7 years ago

ryanlabelle commented 7 years ago

Hi @adiraomj , Could you please look into the demo importer and see if there is a way that the user can choose 1 of 3 preset styles during the import process? This would load a different content.json file and images. Right now I believe there is only one content.json but we have 3 presets. I see the flow something like:

Currently the wizard works great, this would be a dream feature to have. What do you think?

ps. the importer included a style selection feature but I don't think it worked in the same way.

adiraoco commented 7 years ago

@ryanlabelle very nice idea. I'll implement this.

Just one thing. How about renaming the section as Demo instead of Style ? Style makes it sound like the theme has 3 distinct stylesheets. We can also rename the options as Demo 1, Demo 2 and Demo 3. What do you think?

ryanlabelle commented 7 years ago

That works well. Good idea

adiraoco commented 7 years ago
  1. I have created a branch https://github.com/ryanlabelle/Embark/tree/wizardSetup where I have made changes for this feature.
  2. I have created folders for the 3 demos here https://github.com/ryanlabelle/Embark/tree/wizardSetup/plugins/envato_setup/content.
  3. Generate the default json and xml files for the 3 demos and place them in their respective folders.
  4. The demo form is just 3 links that I have styled. Let me know if you would prefer a radio field.
  5. You can modify the styling here. https://github.com/ryanlabelle/Embark/blob/wizardSetup/plugins/envato_setup/css/envato-setup.css#L516-L546

Please test and let me know if there are any bugs or if you want any changes.

ryanlabelle commented 7 years ago

Thanks Adi, I did some testing and I committed some sample import json / xml files to the branch so you can test.

DEMO 1 - a very simple simple site with 1 page, 1 widget, 1 custom setting in the customizer etc.

DEMO 2 is the same has Demo 1 but instead of 'Export 1' I used 'Export 2' - Same results as above.

DEMO 3 - Was just for fun, I exported my current working demo.

If we can get the errors corrected for DEMO 1 import then I think that's a good first step.

Not sure what happened to the Formidable step, it used to work well. Now the ajax status gives me a 'failed'.

Thanks for your help with this.

adiraoco commented 7 years ago

The forms xml has to be in the demo folders. So the idea is that you can have different forms for each demo.

ryanlabelle commented 7 years ago

Thanks Adi, I think that's what I have. I put the formidable xml in each demo folder. Although I tested with the master branch and it worked well. Maybe my formidable xml file was corrupt.