Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve consistency among task HTML classes #1865

Closed
2 tasks done
TomWol opened this issue Apr 11, 2023 · 2 comments
Closed
2 tasks done

Improve consistency among task HTML classes #1865

TomWol opened this issue Apr 11, 2023 · 2 comments
Labels
scope: css styling Changes to styling of elements displayed by Tasks, including search results and individual tasks status: wontfix This will not be worked on type: enhancement New feature or request

Comments

@TomWol
Copy link

TomWol commented Apr 11, 2023

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.

🔖 Feature description

In the new Tasks themability functionality, merged from #1519, both taskand tasks prefixes are used for classes inside a task li element.

Inside the li element, a task's children have the following classes:

  • task-list-item-checkbox (input)
  • tasks-list-text (span, notice the plural tasks)
  • task-extras(span, back to singular task).

Inside the two spans, we have the following classes (I'm probably missing some, mostly just to illustrate my point):

  • task-description
  • task-priority
  • task-recurring
  • task-done
  • tasks-backlink (back to plural)
  • tasks-edit (also back to plural)

I think there should be better consistency among these classes. Thank you very much!

✔️ Solution

I feel like these should all be altered to prefix task.

❓ Alternatives

Up to @esm7 to decide.

📝 Additional Context

No response

@TomWol TomWol added the type: enhancement New feature or request label Apr 11, 2023
@esm7
Copy link
Contributor

esm7 commented Apr 11, 2023

The inconsistency was there before, and in my PR tried to stick to the singular form. I believe (though I admit I haven't verified) that the plural tasks form is for the classes added by the Tasks plugin and the original (before my PR) singular task classes are Obsidian ones (e.g. task-list-item-checkbox). I find task to be more consistent.
It's easy to change the plural names added in the past by Tasks, but it breaks backwards compatibility of themes and custom CSS snippets which I assume @claremacrae will not want.
(Maybe 3.0.0 was an opportunity to do that :( )

@claremacrae claremacrae added scope: css styling Changes to styling of elements displayed by Tasks, including search results and individual tasks status: wontfix This will not be worked on labels Apr 11, 2023
@claremacrae
Copy link
Collaborator

The only options would be:

  • change the existing names - which would break people's existing CSS
  • Add new synonyms, spelled the other way - which would make the code and docs more complicated and confuse users.

Yes, @esm7 is correct that I would not want a breaking change.

So sorry, I'm making this as won't do.

@claremacrae claremacrae closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: css styling Changes to styling of elements displayed by Tasks, including search results and individual tasks status: wontfix This will not be worked on type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants