pressbooks / pressbooks-aldine

Aldine is the default root theme for Pressbooks.
https://pressbooks.org/
GNU General Public License v3.0
11 stars 7 forks source link

New Aldine Catalog #242

Closed SteelWagstaff closed 2 years ago

SteelWagstaff commented 3 years ago

As a network manager, I'd like to present a more attractive catalog page to network visitors. Now that we have a new Pressbooks Directory, many network managers would like their network catalogs to look and function more like this. At the very least, they'd like to be able to display customizable welcome text, show a cover images for each of their books (where available), display more books per page, and apply filters to all books, not just those shown on first page of results.

v1:

Figma mockups/wireframes: https://www.figma.com/file/mQ7n8LlKjxWdUCdne4rTdk/Wireframing

Super fast fat-marker wireframe sketch of potential page layout (very similar to current Pressbooks Directory): IMG_20220728_160908580_BURST000_COVER_TOP

IMG_8341

SteelWagstaff commented 2 years ago

Hackathon schedule (day 1): https://docs.google.com/document/d/1oqonnKknBcCxM728zhKNzYn0Dv-h53m7aHUDew-gIZU/edit We've decided to rebuild Aldine using roots/sage. See https://github.com/pressbooks/pressbooks-aldine/tree/pb-hackaton-aldine-v2 for WiP

richard015ar commented 2 years ago

Progress trying to use Acorn in pressbooks/pressbooks and pressbooks-aldine:

We are facing problems trying to register all the necessary services to replace jenssegers/blade but we are getting multiple problems. We think we were not able to register all the necessary components, but also we think should exist an easier and better way to register everything needed in Acorn through a class/method/hook, but documentation is very basic. It seems Acorn does not support Autoload outside PSR-4. So far, seems to be easier to install this from a separate plugin/theme from scratch instead replacing this on the current ones, which would not make too much sense for now. We tried multiple things with no success.

Os brought up: https://docs.wpemerge.com/#/framework/overview, it seems what we want and looks like more flexible. We are concerned about the support/community and the stability of this according to what we inspect in GitHub.

We are not ready to say yet if it is the path we would take, we would like to discuss with Ned to see if he can bring ideas / experiences on this.

arzola commented 2 years ago

Also probably could be a good idea to use a leaner approach like https://github.com/mattstauffer/Torch and just use the things we need from the framework and build a quick but resilient environment for the new aldine theme using maybe vite, tailwind or scss and torch to use some laravel stuff if needed

arzola commented 2 years ago

We decided to create our own lightweight starter theme for the new aldine catalog with the laravel container, the blade view engine and probably vite for the frontend that will allow us to build the frontend using modern technologies like tailwind, alpine, etc...

We are gonna modify the current books API to support more query options and better filtering to being able to use those endpoints in the aldine catalog

richard015ar commented 2 years ago

Quick update: We integrated the new container to set up everything and we created a class that extends from the new container to keep compatibility. We also worked with Christopher to implement some changes needed (to avoid conflicts with env method, we deleted the oscar otero lib to use just one solution and avoid conflicts).

Before start to implementing everything, now we have the new Container working as expected with the proper bedrock changes, we want to give a second try to Sage, we expect to be successfull this time with this new approach. We will spend one hour or so trying, if it does not work, then we will follow the way Sage implements it but on our own.

richard015ar commented 2 years ago

Update: We made some changes on pressbooks/pressbooks and other plugins to adapt the test with the new container. We also created a new theme: https://github.com/pressbooks/pressbooks-aldine-v2 Oscar is working on implementing the new template using the sage approach, moving the templates form Aldine to this new theme. I am working in moving filters and actions with its namespaces to the new theme using the sage approach through services providers.

Next steps (Monday): We are working on separate branches so our next objective on Monday will be meet to merge the changes and make sure everything is working as expected. Oscar found some issues regarding how the current aldine theme assemble the DOM and how the styles are applied. There are multiple room of improvements there that Oscar is planning to work. Dalcin and I will work on the new Catalog on the new theme on Sage.

richard015ar commented 2 years ago

Update: We decided to create a new plugin that displays the new catalog. We created the repo with a basic structure: https://github.com/pressbooks/pressbooks-network-catalog. This plugin will have a new different structure to define, with more modern architecture including a new coding standards.

We will keep Aldine as it is, and we will check for a new hook to replace the current catalog when the new plugin is active.

Note: We deleted pressbooks-aldine-v2 and pressbooks-avram repos.