Use case or problem
I’d like to add emojis in front of directory names without actually adding the emoji to the name. I followed this snippet to do that. It relies on a data-path
attribute in the DOM.
For example:
.nav-folder-title[data-path="projects"] .nav-folder-title-content::before,
.nav-folder-title[data-path="archive/projects"] .nav-folder-title-content::before {
content: "📋 ";
font-size:1.3em;
}
There is a minor inconvenience related to the data-path
attribute though: currently it doesn’t get updated as new directories are created or moved. The value remains Untitled
.
Proposed solution
Update data-path
attributes in the DOM following the changes in the directory structure.
Current workaround (optional)
Restarting (or reloading) the application.
Related feature requests (optional)
I originally reported this as a bug here. I still believe this is rather a bug, but it got closed. More details (with steps to reproduce) are available in that post.