-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Postpone button cannot be styled #2517
Comments
Hi @ScottKillen, thanks for the report. IIRC, the rendering of the Postpone button is pretty much as it was in the original PR, except I changed the style name for consistency with other Tasks elements. I’ll add the ‘help wanted’ tag. Given your knowledge of the situation and technology, a PR - including updating of the Styling page in the docs if need be - would be greatly appreciated. |
Thanks, @claremacrae. I will take a look. I am a developer, but this would be my first foray into TypeScript. It might be fun. |
Hi @ScottKillen, thank you. If you haven't seen it already, I created a Contributing guide - and the page Local setup and workflow for changes to code and tests is perhaps the best starting point. |
I had not seen it, but all I can say is, "Well, of course you did!" Tasks' documentation is one of the things I love about it! (One among many things!) |
I agree with @ScottKillen - the postpone button should be implemented in the same way as the edit button, using an anchor element instead of a button element, and it shouldn't be given an "id" attribute. It can be styled using the class-name "tasks-postpone" which is already added to the element. The fix would be straightforward: Just replace You could also argue that a button element is the better choice for a button, but then it should be done consistently. |
Thanks @claremacrae. You're right, the event handling of a button and a link is slightly different so we may need to adapt that a little bit as well if me make changes here. @ScottKillen you can give it a try and create a PR and add me as reviewer, or let me know if I shall create a PR and you want to review. I will then also double check that it does not break #2513 again. |
Sorry. I have not had a chance to do anything yet. Hopefully within the next 24 hours. |
No worries, it's not urgent. |
Clare suggested (on the Discord) that I add this request here... |
Thanks @menagerie198 ...
To clarify what I was suggesting - and why I referenced this ticket about styling the Postpone button: 'hide postpone button for tasks that have a Recurrence field' Bonus points for: 'hide postpone button for tasks that have a Recurrence field that does not contain |
(personally, I do sometimes postpone the 'put out the bin when the council comes' task, as our bin does not always have anything in it...) |
:-) You live a much more ascetic life than us, it is clear. Our bins could not survive a non-collection (our council empties them fortnightly)! |
Perhaps a CSS for 'hide postpone button for tasks that have a recurrence field AND a 'X' tag' ? |
Hi all. This is still on my radar, but I have not been able to find the time. I have been off, but family responsibilities and getting ready for the busy season at work (starting next week) have sapped my time. @menagerie198 This should be possible after the fix. The root of this issue is that the postpone button currently does not have proper wrapping to allow CSS styling. 🎉 Happy New Year Everyone! |
I would appreciate this being fixed some time soon, if possible... I'm considering adding another button soon, and would prefer to base it on fixed code, rather than creating a second that needs fixing. So @ScottKillen @Cito - it would really help if you could chat and decide which of you, if either, may be able to fix it? Many thanks in advance. |
@claremacrae since I had a little bit of time left today, I already gave it a try in #2562. @ScottKillen if you have time, please test and let us know if it solves your original problem. |
@Cito It appears you have fixed it. Thank you! |
Thanks, but re-opening - will let the merging of the PR do the closing.. |
This has been fixed by #2562 - and it will be included in the up-coming Tasks 6.0.0 release. |
Thanks @Cito ! |
Just released in 6.0.0 |
It works well. Thank you! |
Please check that this issue hasn't been reported before.
Expected Behavior
I can restyle all of the buttons on a task, with something similar to this:
I expect to be able to restyle the new postpone 'button'.
Current behaviour
The new postpone button uniquely injects content, namely ' ⏩', inside a
button
tag so that it cannot be styled.Steps to reproduce
View a task query with the postpone buttons displayed.
Which Operating Systems are you using?
Obsidian Version
1.5.2
Tasks Plugin Version
5.3.0
Checks
Possible solution
Make the code for the postpone button consistent with the existing buttons.
It is worth noting that having many
button
elements with the sameid
(postpone-button
) is invalid html.The text was updated successfully, but these errors were encountered: