Thoughts on checkboxes

Hello there,

I was surprised to find there is no default way to have checkboxes in a wiki page.
I found other forum threads asking for this feature:

I found some community extensions that do provide some kind of checkbox functionality

https://extensions.xwiki.org/xwiki/bin/view/Extension/Todo%20Macro

https://extensions.xwiki.org/xwiki/bin/view/Extension/TaskMacro

https://extensions.xwiki.org/xwiki/bin/view/Extension/Task%20Manager%20Application

but they all have not been actively maintained since 4+ years.

I want to depend on checkboxes for interoffice slips, release notes (PO and managment check these boxes before the release) etc. in a production instance of XWiki for the next years. It seems these extensions are slowly rotting away - so it is only a matter of time til they break in future upgrades of XWiki.

I have took note of https://store.xwiki.com/xwiki/bin/view/Extension/TaskApplication but it is not worth to pay ca. 1K just to get a simple checkbox macro (when I do not need all the other additional functionality).

I am curious to know why checkboxes have not been thought of in the XWiki Document Syntax or the set of features provided by the Standard Flavor. Why? Is it for historic reasons, because the element needs to remember its state?

Best Regards,
Mali

I think the main reason is because it’s quite easy with XWiki to build your own app using Application Within Minutes, so users probably do that.

Once you learn to use AWM, you can have your own simple app under 5 minutes.

Note that for Release notes, there’s https://extensions.xwiki.org/xwiki/bin/view/Extension/App%20Within%20Minutes%20Application (which we’re using on xwiki.org for release notes of XWiki).

I don’t see how that would help with having a simple checkbox syntax.

I mean something like this here in the forum - even our forum supports this kind of checkbox syntax!

1 Like

I think the main difficulty is indeed having a nice and clean way to update the state of the checkbox when clicking on it, correctly matching the checkbox the user clicked on in the page source.

Personally, for my own note-taking in XWiki, I’ve started using emojis like :white_large_square: (can be triggered with :white_large in the WYSIWYG editor) and :white_check_mark: (triggered with :white_heavy) but I agree that it would be lot nicer to have an actual checkbox syntax/macro.

AWM looks interesting but I wonder how you created the XWiki release notes that look like a page because I am just able to create all the fields with a little black title and value

By default AWM allows you to create a home page for your app with a LiveTable in it and then the ability to create item pages with a form inside.

Then if you need more complex behaviors you’ll need to customize the generated app. See https://extensions.xwiki.org/xwiki/bin/view/Extension/App%20Within%20Minutes%20Application#HCustomization

Not sure what you mean. Maybe post a screenshot?

I was trying to answer why we don’t have a good simple checkbox/todo/task extension (or even syntax). XWiki has been developed for 20+ years and we don’t have one. This can only mean it’s not been needed much. And I believe the main reason is because you can quickly write a more elaborate app to achieve some similar results (which you cannot do in forums or simpler wikis).

This is a guess ofc but I can’t see why we wouldn’t have a good solution if it had been needed for 20+ years otherwise. YMMV.

This is how a item page looks by default after creating an example app with AWM. I was wondering because you referred to the XWiki release notes you generate with AWM. AWM does not give you much in-built design options. So the solution is heavy customization in the Code pages, I assume. This would be the not-so-simple part again

Note that there would be plenty of ways to do this checkbox with XWiki syntax. We’d need to settle down on the most useful/common one before implementing it:

  • Checkbox is just a glorified icon
  • Checkbox can be edited by anyone editing
  • Checkbox can be edited when viewing a document
    • By anyone
    • By the checkbox author only
    • By anyone with a right (edit right? new checkbox right? …)

IMO there needs to be more thoughts put into its design (mostly interaction wise) if we want it in XWiki Syntax.

From what I understand, the best way to get it in XS is if someone pushes for it by improving one of the extensions you mentionned to the point where we can consider moving them in xwiki-paltform.

AFAIU, it’s because noone pushed for it to be part of XWiki standard. If you want it in XWiki Standard, the first step is to discuss it with the community like you’re doing here :slight_smile: If the idea is approved, then you can create an improvement ticket on the jira (if it’s not already existing, didn’t check)

I would be +1 to add a checkbox macro to XS.

Personally it wouldn’t be in my development priorities right now though.

Thanks for starting the topic!
Lucas C.

The Married field shows a checkbox if you decide to edit its value.

You need to add Boolean or Static List fields to your AWM to have checkboxes

I’m not sure allowing users to edit values when still completely in view mode would be good in Xwiki Standard. It would be the only place where it’s possible and would probably feel like an inconsistency for most users.

1 Like

I don’t see the need to have it in XS. That’s what extensions are for.

I think I would be -1 on my side because:

  1. I don’t consider it core (i.e. XS) and we’ve already stated we wanted a core as small as possible. For the few users who need it, it’s not too hard to install. Same as other non-bundled macros. Note that when using the WYSIWYG editor, it lists non-installed macros, so it’s discoverable from inside XS.

  2. I don’t think we should have it in the syntax because I don’t think syntax elements should change the state of something stored elsewhere and storing the state in the content itself feels too hackish. For sure, it’s not the spirit of XWiki where content is separated from data and data can be queried.

Thanks

Note: The Release Notes app was not coded using AWM.

AWM is easy is you keep the default usage, which is to have pages with form data. It’s also relatively easy to customize how the data is displayed in pages (by editing the sheet page).

Have you tried them? I haven’t on my side but it’s possible that they work fine. We’re trying to not break backward compatibility as much as possible so maybe they work fine (the UI part is likely the part that will fail the faster though).

I think the https://extensions.xwiki.org/xwiki/bin/view/Extension/Task%20Manager%20Application extension is probably the one that would work the best.

Just to be clear: I think it would be great to have a simple and working checkbox contrib extension.