[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] global menu contributions?
|
Seeing this conversation makes me think we should have a porting guide for each release (like we do with Eclipse) that explains what to do for these kinds of (effectively) breaking changes. Do we produce something like this?
McQ.
Rafael Chaves ---2014/12/08 12:37:10---Hi Mark, I managed to get it working more or less in the way you suggested (using
From: Rafael Chaves <rafael@xxxxxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 2014/12/08 12:37
Subject: Re: [orion-dev] global menu contributions?
Sent by: orion-dev-bounces@xxxxxxxxxxx
Hi Mark,
I managed to get it working more or less in the way you suggested (using page.link.related though - what is the difference between page.link and page.link.related, seems to have the same behavior you described for page.link, although I couldn't get page.link to work yet).
I did prefer having submenus instead of separate (I think in the past multiple contributions to the same category would produce submenus automatically, thanks for explaining they are now gone), as I'd like to have all product-specific links hanging from the same menu (documentation, support, examples etc). I guess then orion.navigate.command is the way to go for that now, will try that later, thanks for that tip!
Rafael
On Mon, Dec 8, 2014 at 3:03 PM, Mark Macdonald <mamacdon@xxxxxxxxx> wrote:
The hamburger from 4.0 has been replaced with the navigation menu that appears on the left-hand side of all pages. You can register an additional category (icon) with the menu using this extension: https://wiki.eclipse.org/Orion/Documentation/Developer_Guide/Plugging_into_Orion_pages#orion.page.link.category.
For example, here's the code that defines the settings (gear) category:
provider.registerService("orion.page.link.category", null, {
id: "settings", // category id
name: "Settings",
imageClass: "core-sprite-gear", // imageDataURI can be used instead
order: 60
});
Existing orion.page.link and orion.page.link.related extensions can be assigned to a category by adding a category field. For example this assigns a static link to settings.html to the "settings" category:
provider.registerService("orion.page.link", null, {
id: "orion.settings",
name: "Settings",
category: "settings", // category id
uriTemplate: "{+OrionHome}/settings/settings.html"
});
In the current design, a category can only contain 1 link. Clicking on the category icon takes you to that link. We experimented with submenus in the past, but they were clumsy, so now each icon leads to a separate page dealing with a broad area of features: Editing, Git, Settings, etc. If this meshes OK with your product, you can just add an additional category/icon/link there.
Otherwise, you can show multiple links by converting them into orion.navigate.command extensions. The signature for this API is pretty much identical to orion.page.link.related, the only real difference is that navigate commands appear in the menubar under View > Open Related. To make them appear regardless of selection, just omit the validationProperties field entirely.
Mark
On Mon, Dec 8, 2014 at 10:01 AM, Rafael Chaves <rafael@xxxxxxxxxxxx> wrote:
Hi all,
In Orion 4.0, it was possible for a plugin to contribute items to the "hamburger" menu as orion.page.link.related contributions (image below/attached).
Is there a similar mechanism in Orion 7 (even if less prominent)? I am trying to port my existing plugin contributions to the new syntax of the page.link.related service, but they don't show anywhere. I may have not understood the validation properties attribute, which may be new as well. I want my links to show no matter the current selection. It would be fine if they only appeared in the Edit/Navigator page.
Any help appreciated. Thanks,
Rafael
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev