- Enable the new navigation sidebar
- Adding items to the sidebar
- Adding page-specific Vue content
- Snowplow Tracking
Follow these guidelines when contributing additions or changes to the redesigned navigation sidebar.
These guidelines reflect the current state of the navigation sidebar. However, the sidebar is a work in progress, and so is this documentation.
To enable the new navigation sidebar, select your avatar, then turn on the New navigation toggle.
Before adding an item to the sidebar, ensure you follow this process.
Pages can render arbitrary content into the sidebar using the
component. Content passed to its default slot is rendered below that
page’s navigation items in the sidebar.
::Sidebars::Panel. If you must use Vue to render nav items (for example, if you need to use Vue Router) you can make an exception. However, in the corresponding
panel.rbfile, you must add a comment that explains how the nav items are rendered.
SidebarPortalTargetcomponent. It is internal to the sidebar.
All clicks on the nav items should be automatically tracked in Snowplow, but may require additional input.
data-tracking attributes on all the elements in the nav to send the data up to Snowplow.
You can test that they’re working by setting up snowplow on your GDK.
|Category||The page that the user was on when the item was clicked.|
|Action||The action taken. In most cases this is |
|Label||A descriptor for what was clicked on. This is inferred by the ID of the item in most cases, but falls back to |
|Property||This describes where in the nav the link was clicked. If it’s in the main nav panel, then it needs to describe which panel.|