openlab-at-city-tech / webworkqa

WeBWorK integration for WordPress and BuddyPress
GNU General Public License v2.0
4 stars 2 forks source link

Bring WP theme under plugin #116

Closed boonebgorges closed 3 years ago

boonebgorges commented 6 years ago

The theme is currently stored separately, which is a huge pain. It would be nice to merge it into the plugin. This can be done using WP's register_theme_directory(), but this is somewhat limited because the theme is a child of Hemingway, which we can't ship with the plugin.

I may go with register_theme_directory() in the near-term, and then add some mechanism in the future that enforces the installation of Hemingway before the plugin can properly work. Alternatively, maybe we'll make it so that the theme is no longer a child of Hemingway.

boonebgorges commented 5 years ago

Reviewing this in more detail, register_theme_directory() won't work. On multisite installations, register_theme_directory() will do its work only if the plugin is network-activated, which seems like a bad idea for a number of reasons.

For the time being, I think we'll have to move webwork-theme to its own repository, and have manual installation as part of the plugin config process.

boonebgorges commented 5 years ago

We can mitigate the inconvenience by moving most of the critical functionality out of the theme. The most important part is the page-webwork.php template, which provides a full-width space for WeBWorK content, and then bootstraps the JS application. But we can probably do both of these things in a way that's relatively theme-agnostic: the former by suggesting specifically that users suggest a wide-view template from their theme (most have them available), and the latter through the use of a shortcode (easy in the short term) or a Block (in the longer term). The theme then becomes a strongly suggested but strictly optional part of a webwork-for-wordpress installation.

boonebgorges commented 4 years ago

An update on progress:

I still have work to do on this last item, and the related task of making the header image customizable.

boonebgorges commented 4 years ago

I've got a first pass ready for testing here. A few things to check:

  1. When using webwork-for-wordpress with webwork-theme, check for stylistic consistency with the current production site at https://openlab.citytech.cuny.edu/ol-webwork/
  2. When using webwork-for-wordpress with a different theme (twentysixteen works well, but really any theme with a full-width template), ensure that the WW content looks like it ought to look
  3. When using webwork-theme, test the custom header (which should fall back on the current OL-WW logo, but presumably it will be replaced with something new once we've made branding decisions)
boonebgorges commented 4 years ago

I'm adding the testing-needed label but this is probably not fully ready for testing yet, if only because I need to make the new webwork-theme available on openlabdev.org. @bree-z Please touch base with me before we begin testing any of the tickets for the next milestone, so that we can get our ducks in a row.

bree-z commented 3 years ago

Hi @boonebgorges - is this ready to test?. If so, could you provide some general guidance on what I'm looking for? Thanks!

boonebgorges commented 3 years ago

What you've been testing on the hardg.com site is the new theme configuration.

The production ol-webwork is also running all of these changes (they were pushed there in an emergency fashion after the Rederly switchover).

If you haven't noticed anything odd, then there's probably nothing else to test, and we can close the ticket.

bree-z commented 3 years ago

Got it, thanks Boone. I haven't noticed any issues.

bree-z commented 3 years ago

Actually, sorry, I closed this prematurely!

bree-z commented 3 years ago

Hi Boone,

Everything looks good with webwork-theme, except changing the header image. Here's what I did:

  1. I uploaded and saved a new header image. This worked fine - the new header appears on the front end.
  2. I tried to change back to the default header image (OL-WW), and even though in the customizer it looked like I successfully changed back to to the OL-WW header and it had successfully saved the changes, when I view the front end, the previous header image is still there. I'm having trouble recording my screen right now, but here's a screenshot:
Header

As far as changing the theme, I'm able to do that. They all technically work, though some look pretty bad. Is this good enough, since we can't account for the range of themes users could potentially choose?

Thanks!

boonebgorges commented 3 years ago

Everything looks good with webwork-theme, except changing the header image. Here's what I did:

Good catch - I had registered the default header images incorrectly (WP makes this weird and difficult). It should be fixed.

As far as changing the theme, I'm able to do that. They all technically work, though some look pretty bad. Is this good enough, since we can't account for the range of themes users could potentially choose?

That's as good as we can do.

bree-z commented 3 years ago

Thanks Boone! This looks good.