Hello!
Could you give the user the possibility to customize the logic of deleting and renaming classes in html and css?
At the moment when a class is irrevocably deleted from the css panel, the class name remains in html, and I would like that when a class is irrevocably deleted in the css panel - this class is deleted everywhere in html (everywhere where there is a mention of this class). I would also like that when changing the name of a class, the name would be changed everywhere in html, not just in the css panel.
This would speed up and simplify things a lot, taking away some of the chore from the user. Right now, unfortunately, I have to avoid deleting and renaming classes.
Thanks for your attention
A tool for finding abandoned CSS Classes would be helpful.
For now i would use Search&Replace whenever i remove a Class form CSS.
Some CSS Classes might be needed for JS or get styling from external CSS (for example if you create WordPress Themes / Blocks). So a fully automated removal of CSS classes would not be a feasible solution.
Hi @MichelyWeb Thanks for the suggestion.
A good solution to our problem might be to choose between irrevocably deleting the class in css and all its references in html, or deleting only in css. But why did the developers decide to leave everything in its current state?
Since 2014, we read and discuss EACH of the requests we receive here (and in our support inbox), but indeed, some may never meet the qualifications.
While weâd like to claim complete thoroughness, Pinegrow should be viewed as a tool in your arsenal rather than the solution to ALL your web-development needs.
Weâve already discussed the risks associated with this type of automation, and at Pinegrow, the longevity of your content is one of our main concerns. Weâre sorry, but as of now, we havenât found a practical and reliable solution that allows for such feature/automation.
Hereâs a list - that isnât mine - but highlights the drawbacks of automating this kind of process :
Unintended Removals: Automated tools might inadvertently remove classes that are still needed. For instance, if you have a class named âbuttonâ in one CSS file that you want to remove, but itâs also used in another CSS file or framework, an automated tool might remove all instances, breaking your design.
Dynamic Class Applications: Many modern web applications use JavaScript to dynamically add or remove classes. Automated tools might not account for these dynamic changes, potentially leading to unexpected behavior in your application.
Specificity Issues: Removing a class could alter the specificity of your CSS selectors, potentially changing how styles are applied to elements. This could lead to subtle visual inconsistencies that are hard to track down.
Performance Impact: While cleaning up unused CSS can improve performance, the process of scanning and modifying multiple files can be resource-intensive, especially for large projects.
Version Control Complications: Automated large-scale changes can make code reviews more challenging and potentially complicate merge processes in version control systems.
Context Loss: Automated tools lack the human understanding of design intent. A class that appears unused might be kept for future use or consistency across different pages.
Framework Compatibility: If youâre using CSS frameworks like Bootstrap or Tailwind, automated removal tools might not fully understand the frameworkâs class structure, potentially removing essential classes.
Maintenance Overhead: Setting up and maintaining automated tools requires time and expertise. The effort needed to keep these tools updated and functioning correctly should be weighed against the benefits.
False Sense of Security: Relying too heavily on automated tools might lead to less careful manual code review, potentially allowing other issues to slip through.
@Emmanuel Thank you very much for your detailed answer.
I am not a developer and I come from the world of no-code platforms, also I donât know anything about the peculiarities of developing such complex applications as Pinegrow.
I can only compare Pinegrow with other visual editors and give my opinion.
My suggestion in the post (link) was not to change the logic of working with selectors towards automation, but to provide a choice.
Why not let the user customize Pinegrow by himself using the menu you see on the screenshot?
This is just my fantasies, Iâm not a UX/UI designer, I canât evaluate how usable this would be. But it seems to me that with such a choice, people who create simple and small sites will be able to work faster due to automation, and those who thoughtfully develop complex projects will also get a choice in selector management to optimize development.
I donât know how difficult it is to develop and maintain such a solution, but it seems to me that many users would love the provision of choice. You can even set up a poll if you want to know what users think.
It seems to me that Pinegrow is literally a few steps away from the title of âthe solution to all web development needsâ, at least for developing themes for wordpress, creating marketing sites without looking at VS code and other code editors.
@creer
Thanks for this mockup.
In fact, Itâs not really an issue of UX or âuser story,â but rather the implications that come with such a feature.
To keep it short, if you take a look at the list of points I posted earlier, itâs not as simple as it might seem
@Emmanuel
It looks like it will take me a while to fully understand all the points you cited in your post.
Perhaps my suggestions are ridiculous because Iâm not in the context of a problem that you currently canât solve, since Iâm not a techie. Perhaps I should use page builders, and go back to Pinegrow when the âsimplifiedâ version I managed to read about on the forum comes out, instead of wasting your time.
If itâs no secret, is the âsimplifiedâ version of Pinegrow still in your plans or have you decided to invest your time in another project?
To be honest, youâre in a situation thatâs not necessarily the same as other developers. The feature youâre dreaming ofâwhich would also be useful for me at timesâcan have completely different implications depending on the framework you choose, whether youâre working in a team or not, etc. (see list)⌠and because we canât safely and simply cover all use cases, thatâs why we donât currently offer a solution.
If itâs no secret, is the âsimplifiedâ version of Pinegrow still in your plans or have you decided to invest your time in another project?
Ah yes, this simplified version is still our own holy grail, but Iâll let @matjaz respond if he wants to.
Awesome news about that Find & Replace feature you were waiting for! Itâs coming in Pinegrow 8.1, and I think itâs actually way cooler than you could have imagined
Youâll be able to search through your project using tags, classes, attributes, text, or selectors - or mix them all together. Then you can make changes like updating classes, replacing text, or even using AI transformations (if you have an OpenAI/Anthropic subscription). Plus, you can see and click the elements directly in your page view.
Should be out really soon - canât wait to hear what you think about it!
Note: A big thank you to everyone who has mentioned this feature recently or in the past; youâve been a true inspiration!
@ me , I donât believe Iâve ever directly weighed in on the âSearch and Replaceâ / âFind and Replaceâ desires of users over the years. This approach looks quite promising and encompassing so I hope it will meet most the historical requirements and desires of users. Maybe it will also enable you to remove this verbiage from the Pinegrow Faqs page. Congrats!
Great! Youâll be happy to know that your suggestion has been taken into account and the changes should appear soon on the FAQ.
However, we wonât be removing the previous âverbiageâ because there are still many users of the perpetual versions who havenât updated and donât plan to do so anytime soon.
So weâre addressing the question for both BEFORE and AFTER 8.1 QED
Regarding Theme Converter, which isnât relevant to this topic, donât worryâIâll make sure to contact you personally when an update is available.
I did a quick test of the update and liked everything. Thank you very much!
Only I wasnât able to mass rename an existing class , but thatâs minor things, overall Find & Replace looks awesome