Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] global menu contributions?

The page.link is for static links -- which do not change based on the active model object/selection -- and page.link.related is for ones that do respond to selection (using validationProperties, etc) and produce a link to something "related" to the selection. Both kinds of links can apply to an icon/category in the nav menu. (For example, the "Shell" link is a related link that changes based on the active folder in the file explorer.)


In the Orion 7.0/8.0 UI, the nav menu is only real use for orion.page.link and orion.page.link.related. Previous releases had dedicated areas of the hamburger or banner for both kinds of links, but this was deemed unhelpful, and the nav menu now replaces those.

As you can probably tell, this stuff has been heavily iterated on in the last few releases. I'll look at the wiki docs and make sure they reflect the current UI behavior.

Mark

On Mon, Dec 8, 2014 at 12:36 PM, Rafael Chaves <rafael@xxxxxxxxxxxx> wrote:
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).

Inline image 1



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


Back to the top