Page MenuHomePhabricator

Add VisualEditor support to Cronos templates
Closed, ResolvedPublic

Description

Actually we have a Cronos template for a daily event that really deserves VisualEditor support to simplify its use.

Event Timeline

valerio.bozzolan removed a subscriber: Aklapper.

Hello Valerio, in order to make events editable by Visual Editor I have started template data configuration on https://meta.wikimedia.org/wiki/Template:Cronos_event

@Nicolas_NALLET I noticed that, when creating a new day, the Visual Editor is not enabled as default even if it's enabled as default when editing a page.

Maybe we can discover how to eventually enable it as default also in creation mode. Having said that if it's an user settings maybe we have to do nothing and just respect the user choice.

In the the Chronos month view When you click on the day number + to create a new event in the url to load could you put

veaction=edit

instead of just

action=edit

?
Example of a full url for June 2 :

https://meta.wikimedia.org/wiki/Meta:Cronos/Events/2020-06-02?veaction=edit&preload=Template%3ACronos+day%2FExample&preloadparams%5B%5D=2020&preloadparams%5B%5D=06&preloadparams%5B%5D=02

@Nicolas_NALLET Yep!

I actually replaced it, in order to follow your example.

Now it works. Anyway, I see that VisualEditor clears the page content if I switch to source mode. Is it a bug in VisualEditor? Actually I do not have so much experience in it. If you think that it's a bug in VisualEditor, let's file a bug to their team.

Also @Nicolas_NALLET in your opinion does VisualEditor support this feature? Can VisualEditor suggest a template to be added at the bottom of the page?

My issue is when I go to this page:
I do not find a visual editor solution to add a new event to the day. Have I missed it, or is it possible to create it?
Thanks a lot!,

Flor

Apologies @Nicolas_NALLET also but not related, I just noticed that VisualEditor seems to do not support a new section mode.

Actual behavior when adding a new Event without VisualEditor (OK, simple to create a new section, with default example):

https://meta.wikimedia.org/wiki/Meta:Cronos/Events/2020-05-14?action=edit&section=new&preload=Template%3ACronos+event%2FExample&nosummary=1

Future behavior with VisualEditor (not OK, not simple to create a new section, without even the example):

https://meta.wikimedia.org/wiki/Meta:Cronos/Events/2020-05-14?veaction=edit&section=new&preload=Template%3ACronos+event%2FExample&nosummary=1

In your opinion is this another bug to be tracked into VisualEditor?

Thank you again

Hello Valerio, Yes Visual doest not support section : you will edit the whole page but it does not clear the content if any exists.

SO there is 2 ways to add a new event

  • from month calendar when clicking to the '+' (It's working n=only when the day has no event)
  • from a page of a day having already some event : for this case I'm currently trying to use InputBox extension on this test page : https://meta.wikimedia.org/wiki/Meta:Cronos/Events/2019-03-25 But I cannot get a good behaviour

The solution could be to have a dedicated subpage by event for example :

Hello Valerio, Yes Visual doest not support section : you will edit the whole page

Just as a side note maybe our issue is related to T50429: [Epic] Support editing parts of a page in VisualEditor-MediaWiki.

Well, let's workaround this, because they will not introduce this feature any time soon:

Is this task also about supporting action=edit&section=new in VisualEditor?

I don't think we have plans to add that, sorry.

Yes, what do you think about having a dedicated subpage by event ? for example :

https://meta.wikimedia.org/wiki/Meta:Cronos/Events/2019-03-25/Event1
Is it a lot of work for you to rewrite the code ?

I don't think there is any other solution to edit task with VE according to the few extensions available on meta.

(feel free to ping me if you need my help with something specific, I'll unsubscribe for now though)

valerio.bozzolan moved this task from Doing to Done on the WMCH-Cronos-Calendar board.

All the desired behaviors was implemented except those that it was not possible to do due to gaps in VisualEditor itself.

Considering this as resolved but feel free to re-open.