Global class usage list

Summary of request:

  1. Ability to see which classes are being used
  2. Ability to see how many usages there are of each class
  3. Ability to see whether a global class is empty at a glance (from the list)
  4. Ability to sort and filter based on number of usages and emptiness
  5. Ability to see usage locations for a class and click to go directly to them

Request details:

There are a few scenarios that crop up during development.

Occasionally we will inherit sites created by other developers / agencies. Also, working in a team, sometimes multiple people will work on a website.

When this happens, you may find there are classes that were created that aren’t named semantically or are seemingly redundant/duplicates.

In this case, we often find we are attempting to locate which blocks/pages these classes are used on. In the most basic sense, the aim is just to see whether they are being used at all so they can potentially be cleaned up.

It will be incredibly useful to be able to see which classes are being used, and how many times. As a bonus, if we can know where they are being used, it will be amazing.

Given the fact that Cwicly does tree shaking to optimise the global class stylesheet, I imagine that some of this information is already available, so it may just require adding a UI to make it accessible.

As a bonus feature, if we can also see when a global class is empty at a glance, this will also be useful.

Having a way to sort and filter this list based on number of usages or whether it is empty would be incredibly powerful.

As the cherry on the cake, having a dialog/popup that shows where each class is used and a link that allows you to go directly there is an absolute “killer” feature.

2 Likes

Couldn’t agree more! Another cherry on top would be a little button within that UI that allows us to delete all empty classes with one click.

When I used to work in webflow back in the day, I used this feature on every project.

2 Likes

this reminds me somewhat of what Advanced Theme for Bricks could do. If only there’s a version of AT for Cwicly :slight_smile:

1 Like

Aye a modal or a sidebar that would pop up so you can perform all those tasks. The issue with Bricks/Advanced Themer is it takes over the entire viewport.

2 Likes

Great summary, thanks for bringing these up.
Point #2 just came into my mind the other day again, but I agree to all of them.

I would like to see these aspects taken into account in the forthcoming global class rework.

3 Likes