Refactor to use Breezy Utility for utility class management

Created on 15 March 2024, 8 months ago
Updated 2 April 2024, 8 months ago

Problem/Motivation

Currently, Breezy Layouts has hard coded Tailwind classes in a service. This was done as a short term solution to get the module up and running. The plan was always to make the classes into plugins so they could be augmented as desired.

I've started work on a new module, breezy_utility, which will initially ship with the same Tailwind classes and more, but will also be extensible, and should be "utility class agnostic". That means, themes and modules will be able to provide their own utility class system.

This might be a breaking change. The old system uses a machine_name for the CSS Properties (flex_basis, flex_direction) for looking up classes, while the new module will use the actual CSS property (flex-basis, flex-direction). Hopefully, I will be able to provide an update hook to find the old CSS Properties and convert to the new properties.

The new module will be a dependency of this module, and will open the door to an entire suite of utility-first modules.

🌱 Plan
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @scottsawyer
  • πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta

    I just merged some significant changes to the module, including adding a dependency on breezy_utility. This change will break everything, so please backup, export config, uninstall and remove. Require `drupal/breezy_layouts`, and you should now have breezy_utility. All of the configurations will need to be added, all variants will need to be recreated, I needed to restart my lando instance.

    I apologize for any disruptions, but the changes needed to be made so we could go further with this module.

    If you are going to attempt to restore your layout variants, after you install the updated version, enable breezy_layouts_ui, and configure both Breezy Utility and Breezy Layouts. Then find all of the fields you created in your breezy_layouts.variant.*.yml files, and change all of the #property keys that have underscores (_) to hyphens (-).

    So, flex_basis becomes flex-basis.

    Please let me know if you run into problems.

  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States scottsawyer Atlanta
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024