elementor / wp2static

WordPress static site generator for security, performance and cost benefits
https://wp2static.com
The Unlicense
1.43k stars 270 forks source link

add remaining cache page bulk actions and pagination count selector #637

Open leonstafford opened 4 years ago

leonstafford commented 4 years ago

@Flynsarmy I think that's just what's left from previous PR?

Flynsarmy commented 4 years ago

They all have the pagination form but the reason I didn't add the Remove action for Generated Static Site, Post-processed Static Site and Deploy Cache pages because it won't currently work with the GET-based form - the paths are too long. I need a new way to handle bulk actions that submits the data via POST instead and don't want to use the current non-associative array indeces because it may result in unexpected behavior if the list changes between when the admin opens the backend page and when the latest site indexing is triggered.

The problem with sending action data via POST though is that I feel the ViewRenderer methods might get a bit long and unwieldy if I add more logic into each method. I'm also repeating a lot of boilerplate already which isn't great. We should ideally have a separate controller per backend page the way most CMS's do. Then we can add methods, traits, inheritance etc as we please and keep everything well designed.

If you guys can set up controllers for these pages and just get the pages loading I'll handle getting all the pagination, searching and action functionality implemented with them.

One other thing to keep in mind - we currently have every single class in one folder. That folder is only going to get longer over time. I'd recommend subfolders with appropriate namespaces. For example /Models, /Controllers, /Files, /Detection etc. Not entirely sure. Up to you.

leonstafford commented 4 years ago

@Flynsarmy all good points. Will see what I can do