New contrib repository request for content formatting

Hello everyone,

I’m developing some macros dedicated for the content formatting. For now the idea is to develop 3 macros but this can be extended later.

The first one will be named center which will center content. This will center text but also other content like image, div, etc…

The second one will give the possibility to make some content “clickable”. Currently we can create a link in XWiki but making a group of blocks clickable is less straightforward. For example if I want to make an image with some text all clickable with a link it’s currently less easy to do in XWiki. I suggest calling this macro clickable.

Finally, the idea is to make it easy to create a button. We can create a link, but with the style of a button it’s a bit less easy. So with this macro we can easily create a button on any page. This macro can be named button.

For this project I would need a new contrib repository and a Jira project. I suggest to name the contrib project: content-formating or maybe content-tools

And for the Jira I suggest: CF (for content formatting) or CT (for content tools)

Note for the naming I would be open for any other name if you have any other idea.

WDYT ?

Best regards

Hi @Josue

Another option is to have one repo per macro. We already have repos like GitHub - xwiki-contrib/macro-tooltip: Displays contextual information in a tooltip, when the user clicks or passes his mouse over a word or a sentence or GitHub - xwiki-contrib/macro-showhide: Wiki macros implementation for simple show/hide of a content with some animations.

It depends if you think these macros will always be released together or not I guess.

My worry with a single generic repo is that it’ll tend to be too generic and more and more macros will added to it over time and they won’t have the same release cycles at all. Content formatting is very generic (and content tools even more ;)).

I understand the will to not have tons of small repos, but I still wonder if that’s not the best approach.

Any opinions everyone?

Thx

Hello Vincent,

Thank you for your answer. We also thought about the possibility to make one repos for each macro. I thought that making one repos for only few line of code was a bit overkill but I also understand your point of view. Personally I don’t have any strict opinion on this, it’s totally ok for me to also create 3 separate repos and jira project.

In this case I would suggest theses names:

  • center macro: center for git and Jira
  • button macro: button for git and Jira
  • clickable macro: clickable for git and Jira

So let’s see the point of view from other committer.

The three macros seem sufficiently decoupled to have their dedicated repositories.

+1

Hello,

Thanks for your feedback. And about the naming, does everybody agree with this:

  • center: to center content into a page. Can be text but also div, image or something else.
  • button: to have a link which look like a button.
  • clickable: to have a group of element clickable, so we can have any kind of element a link.

If yes would it be possible to create theses 3 repository and also the corresponding jira project ?

Thank you.

Hello,

So after some discussion on the Matrix chat we end with this conclusion.

The naming like center or button is quite generic. But following the naming rulle we need to avoid to add sufix like xxx-macro.

And about the center macro, this could be at some point extended later to have a left, right, two-columns macros in addition to the center one.

Finally we also saw that button and clickable macros have the same idea: creating a link with a different style.

So following this the proposition would be to create 2 repository:

  • one named layout (or maybe alignment) with a macro named center.
  • on other one named format-link: with 2 macro named link-button (we renamed it because button is a bit too generic for a macro name) and clickable.

Sounds good, I was indeed considering “layout” too. This means that any future layout macro should go in this repo, right?

Re clickable, I’d name the macro link-click (or link-clickable) to be consistent with link-button.

Maybe format-link should be link-format? (so that it’s consistent with link-button and link-click(able)?

Thx!

Thank you @vmassol for your feedback,

Maybe we can also name it something like link-element, link-block or link-group to mean that the link is intentended for a group of elements.

Sound good for me, yes it’s more consistent.

Sounds good, pick the one you prefer.

Thx

My preference would be for link-group.

link-format

layout