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

Update CheckBox.tid #3996

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Update CheckBox.tid #3996

merged 1 commit into from
Jun 18, 2019

Conversation

twMat
Copy link
Contributor

@twMat twMat commented Jun 18, 2019

No description provided.

@Jermolene
Copy link
Owner

Thanks @twMat

@Jermolene Jermolene merged commit 6fd70f9 into Jermolene:tiddlywiki-com Jun 18, 2019
@twMat
Copy link
Contributor Author

twMat commented Jun 18, 2019

@Jermolene - Forgive me, this PR was an error. Please revoke.

However, the example, as found at very bottom in https://tiddlywiki.com/prerelease/#CheckboxWidget does not work correctly. The added tags are faulty.

@Jermolene
Copy link
Owner

Hi @twMat yes indeed -- @Marxsal I think this was your example from #2673, can you recollect what it is supposed to be doing? Many thanks.

@Marxsal
Copy link
Contributor

Marxsal commented Jun 18, 2019

It takes the tags from "Features" and "Encryption" and applies them to the current (CheckBoxWidget) tiddler.
Mat's fix will make things slightly more broken, I think. The fix is to roll back his change and then take out the part inside the triple quoted string:

<$action-sendmessage $message="tm-add-tag" $param=<<tag>> />

After 2.5 years, I have no idea why this 2nd clause is in there, nor how it escaped testing. Apologies :$

@Jermolene
Copy link
Owner

Thanks @Marxsal. I'm actually inclined to remove the example entirely since it doesn't really demonstrate the checkbox widget and is overly complex.

@twMat
Copy link
Contributor Author

twMat commented Jun 19, 2019

Thanks @Marxsal. I'm actually inclined to remove the example entirely since it doesn't really demonstrate the checkbox widget and is overly complex.

But the actions (and uncheckactions) attributes are really important and they are by necessity more complex than the the other attributes. An example is absolutely needed IMO. However, maybe it is possible to externalize the argument into a macro, to make the example clearer?

@Jermolene
Copy link
Owner

But the actions (and uncheckactions) attributes are really important and they are by necessity more complex than the the other attributes. An example is absolutely needed IMO. However, maybe it is possible to externalize the argument into a macro, to make the example clearer?

I couldn't come up with a good example in reasonable time. I don't consider it a particularly useful feature: we already have adequate bindings between the checkbox and the tiddler store, and I struggle to see scenarios where the action string attribute is useful.

@twMat
Copy link
Contributor Author

twMat commented Jun 20, 2019

I don't consider it a particularly useful feature: we already have adequate bindings between the checkbox and the tiddler store, and I struggle to see scenarios where the action string attribute is useful.

Are you implying one should use other means, presumably then the ButtonWidget, instead of the checkbox when further actions are needed? And then even a second button for uncheckactions....?

@Marxsal
Copy link
Contributor

Marxsal commented Jun 20, 2019

Currently you can use "tag" and "untagged" to flip the presence of a tag in a tiddler. A plausible real-life example where the actions attribute is needed is when you want there to also be an "untagged" Tag that is added when unchecked and taken away when checked.

@twMat
Copy link
Contributor Author

twMat commented Jun 20, 2019

A plausible real-life example

If we need real-life examples I refer to the fields2table macro that I released just the other day. The table "edit toggle" is a styled checkbox that performs multiple actions on both check and uncheck. The option would be two buttons and two reveal widgets.

@Jermolene
Copy link
Owner

Thanks @Marxsal @twMat that's helpful.

Currently you can use "tag" and "untagged" to flip the presence of a tag in a tiddler. A plausible real-life example where the actions attribute is needed is when you want there to also be an "untagged" Tag that is added when unchecked and taken away when checked.

In that situation one would try to avoid using the "untagged" tag and instead dynamically read the untagged tiddlers with the untagged operator. Part of the problem is that it wouldn't be a two way binding: at present changing the tags/fields on a tiddler automatically changes any checkbox widgets bound to that tiddler. But removing the "untagged" tag wouldn't affect the checkbox display.

The table "edit toggle" is a styled checkbox that performs multiple actions on both check and uncheck. The option would be two buttons and two reveal widgets.

It's great that it's been convenient, but I don't think that that would be concise enough for the sort of example we want here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants