On 10/06/2016 11:36 AM, Vincent Massol wrote:
> Hi Sergiu,
> 
>> On 06 Oct 2016, at 17:30, Sergiu Dumitriu <ser...@xwiki.org> wrote:
>>
>> The way I do this for another similar feature, using UIX objects, is to
>> add two new parameters, "enabled" and "order". When displaying the
>> extensions for a particular point, I request them ordered by the "order"
>> parameter, and then manually skip those for which the "enabled"
>> parameter is set to "false" -- if the parameter is missing, it's
>> considered enabled by default.
>>
>> We can define that the order should have a value between 0 and 100, and
>> each extension can choose it's own relative number, as an expected
>> percentage, with the actual order depending on which other extensions
>> are installed and enabled, and their requested order.
> 
> Yes but IMO this wouldn’t work here for this use case because the information 
> as to whether a given app is displayed or not should not come from the UIX 
> itself (the app doesn’t know that info and shouldn’t set this). It should 
> come from the admin or from the flavor for this case at hand.
> 
> Also I don’t think that modifying the UIX of an app by the Application Panel 
> admin UI is a good thing. The storage if this info should go in the App Panel 
> config page instead IMO.
> 
> WDYT?

True, I was just presenting another approach, which, by the way, also
has limitations that are making me look for improvements.

I don't agree that the application shouldn't know whether it's suitable
for being displayed or not. Who knows that an extension is too technical
to be displayed? Certainly not the Panels application, and flavors can't
know beforehand all the extensions that may be installed. I think that
the application developers are the ones that should decide if their
application is to be displayed by default or not.

And these are just initial hints, the admins can then choose to change
the default and manually hide/show/reorder applications.

Now, for the fact that the parameters are stored *only* in the
extension, that does indeed cause several problems:

- modifying them may cause extension upgrade conflicts
- only one global setting, no user or space settings
- flavors can't override these settings

How about this: we define a way of overriding extension parameters using
custom objects:

XWiki.UIExtensionParameterOverridesClass
- extensionPointId
- name
- parameters

extensionPointId and name must match an UIX, and parameters override the
extension's parameters.

Depending on where the object it placed, it can be valid for:
- the whole wiki if placed in XWiki.XWikiPreferences
- a space if placed in <Space>.WebPreferences
- a certain user if placed in XWiki.<UserProfile>
- any other page, and have a way of telling the uix manager that we want
to apply the parameter overrides in that page
- not sure what to do for flavors, is XWiki.XWikiPreferences good, or is
there a flavor-specific configuration page?

How does that sound?

> Thanks
> -Vincent
> 
>> As a more advanced feature, in PhenoTips we also have a wizard that
>> allows enabling/disabling and manually reordering extensions, by
>> modifying the extension parameters.
>>
>> I didn't have time for this yet, but in the future I'd like to add
>> support for ordering and enable/disable flags in the core UIX module, so
>> that extensions are automatically filtered and ordered.
>>
>> On 10/05/2016 05:37 AM, Vincent Massol wrote:
>>> Hi devs,
>>>
>>> With the recent introduction of the Applications Index (see 
>>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Application+Index+Application/)
>>>  we need to agree on a few things.
>>>
>>> In the past we had:
>>> * We wanted all new app that you installed to automatically be visible in 
>>> the Applications Panel
>>> * This is why the Applications Panel config had a blacklist (and not a 
>>> white list)
>>>
>>> What we’ve done:
>>> * We add the Applications Index
>>> * We removed some apps from the Applications Panel. Namely: Invitation, 
>>> Panels, Scheduler, User Directory and Tour applications. this was done 
>>> using hardcoded blacklist xobjects in 
>>> PanelsCode.ApplicationsPanelConfiguration.
>>>
>>> The need:
>>> * We need to remove this hack. It’s not normal for the Panels module to 
>>> know all the apps that shouldn’t be listed in it!
>>>
>>> Proposal:
>>> * Replace the blacklist configuration of the Applications Panel by a 
>>> whitelist one
>>> * When a new app is installed, list it in the Applications Index but don’t 
>>> add it to the Applications Panel
>>> * If an admin wants to add this new for his users, he’ll need to add it in 
>>> the Admin UI for the Applications Panel.
>>>
>>> WDYT?
>>>
>>> Thanks
>>> -Vincent
>>>
>>

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu
_______________________________________________
devs mailing list
devs@xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to