Rename behavior related to the interactive learning plugin (#112752)

This commit is contained in:
Jack Baldry
2025-10-22 09:06:21 +01:00
committed by GitHub
parent b3d9fd677b
commit 1abb5aa0f9
12 changed files with 53 additions and 38 deletions
@@ -109,7 +109,7 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
| `azureMonitorLogsBuilderEditor` | Enables the logs builder mode for the Azure Monitor data source |
| `localeFormatPreference` | Specifies the locale so the correct format for numbers and dates can be shown |
| `logsPanelControls` | Enables a control component for the logs panel in Explore |
| `grafanaPathfinder` | Enables Pathfinder app |
| `interactiveLearning` | Enables the interactive learning app |
| `azureResourcePickerUpdates` | Enables the updated Azure Monitor resource picker |
| `preventPanelChromeOverflow` | Restrict PanelChrome contents with overflow: hidden; |
@@ -1178,9 +1178,9 @@ export interface FeatureToggles {
*/
teamFolders?: boolean;
/**
* Enables Pathfinder app
* Enables the interactive learning app
*/
grafanaPathfinder?: boolean;
interactiveLearning?: boolean;
/**
* Enables the alerting triage feature
* @default false
+2 -2
View File
@@ -2047,8 +2047,8 @@ var (
Expression: "false",
},
{
Name: "grafanaPathfinder",
Description: "Enables Pathfinder app",
Name: "interactiveLearning",
Description: "Enables the interactive learning app",
Stage: FeatureStagePublicPreview,
Owner: grafanaPathfinderSquad,
},
+1 -1
View File
@@ -263,7 +263,7 @@ favoriteDatasources,experimental,@grafana/plugins-platform-backend,false,false,t
newLogContext,experimental,@grafana/observability-logs,false,false,true
newClickhouseConfigPageDesign,privatePreview,@grafana/partner-datasources,false,false,false
teamFolders,experimental,@grafana/grafana-search-navigate-organise,false,false,false
grafanaPathfinder,preview,@grafana/pathfinder,false,false,false
interactiveLearning,preview,@grafana/pathfinder,false,false,false
alertingTriage,experimental,@grafana/alerting-squad,false,false,true
graphiteBackendMode,privatePreview,@grafana/partner-datasources,false,false,false
azureResourcePickerUpdates,preview,@grafana/partner-datasources,false,false,true
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
263 newLogContext experimental @grafana/observability-logs false false true
264 newClickhouseConfigPageDesign privatePreview @grafana/partner-datasources false false false
265 teamFolders experimental @grafana/grafana-search-navigate-organise false false false
266 grafanaPathfinder interactiveLearning preview @grafana/pathfinder false false false
267 alertingTriage experimental @grafana/alerting-squad false false true
268 graphiteBackendMode privatePreview @grafana/partner-datasources false false false
269 azureResourcePickerUpdates preview @grafana/partner-datasources false false true
+3 -3
View File
@@ -1062,9 +1062,9 @@ const (
// Enables team folders functionality
FlagTeamFolders = "teamFolders"
// FlagGrafanaPathfinder
// Enables Pathfinder app
FlagGrafanaPathfinder = "grafanaPathfinder"
// FlagInteractiveLearning
// Enables the interactive learning app
FlagInteractiveLearning = "interactiveLearning"
// FlagAlertingTriage
// Enables the alerting triage feature
+19 -3
View File
@@ -1824,6 +1824,7 @@
"name": "grafanaPathfinder",
"resourceVersion": "1760434668782",
"creationTimestamp": "2025-08-20T12:30:29Z",
"deletionTimestamp": "2025-10-21T16:10:16Z",
"annotations": {
"grafana.app/updatedTimestamp": "2025-10-14 09:37:48.782577 +0000 UTC"
}
@@ -2008,6 +2009,18 @@
"codeowner": "@grafana/partner-datasources"
}
},
{
"metadata": {
"name": "interactiveLearning",
"resourceVersion": "1761063016739",
"creationTimestamp": "2025-10-21T16:10:16Z"
},
"spec": {
"description": "Enables the interactive learning app",
"stage": "preview",
"codeowner": "@grafana/pathfinder"
}
},
{
"metadata": {
"name": "investigationsBackend",
@@ -4177,11 +4190,14 @@
{
"metadata": {
"name": "zanzanaNoLegacyClient",
"resourceVersion": "1760953975541",
"creationTimestamp": "2025-10-20T09:52:55Z"
"resourceVersion": "1761063016739",
"creationTimestamp": "2025-10-20T09:52:55Z",
"annotations": {
"grafana.app/updatedTimestamp": "2025-10-21 16:10:16.739546 +0000 UTC"
}
},
"spec": {
"description": "Use openFGA as main authorization engine and disable legacy RBAC client.",
"description": "Use openFGA as main authorization engine and disable legacy RBAC clietn.",
"stage": "experimental",
"codeowner": "@grafana/identity-access-team",
"hideFromAdminPage": true,
+5 -6
View File
@@ -246,7 +246,6 @@ func isSupportBundlesEnabled(s *ServiceImpl) bool {
}
// addHelpLinks adds a help menu item to the navigation bar.
// If the Grafana Pathfinder plugin is installed, it will handle enriching the help menu.
func (s *ServiceImpl) addHelpLinks(treeRoot *navtree.NavTreeRoot, c *contextmodel.ReqContext) {
if s.cfg.HelpEnabled {
helpNode := &navtree.NavLink{
@@ -261,12 +260,12 @@ func (s *ServiceImpl) addHelpLinks(treeRoot *navtree.NavTreeRoot, c *contextmode
treeRoot.AddSection(helpNode)
ctx := c.Req.Context()
// The docs plugin ID is going to transition from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// The interactive learning plugin ID is transitioning from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// Support both until that migration is complete.
_, oldPathfinderInstalled := s.pluginStore.Plugin(ctx, "grafana-grafanadocsplugin-app")
_, newPathfinderInstalled := s.pluginStore.Plugin(ctx, "grafana-pathfinder-app")
if oldPathfinderInstalled || newPathfinderInstalled {
// Add a custom property to indicate this should open Grafana Pathfinder.
_, oldInteractiveLearningPluginInstalled := s.pluginStore.Plugin(ctx, "grafana-grafanadocsplugin-app")
_, newInteractiveLearningPluginInstalled := s.pluginStore.Plugin(ctx, "grafana-pathfinder-app")
if oldInteractiveLearningPluginInstalled || newInteractiveLearningPluginInstalled {
// Add a custom property to indicate this should open the interactive learning plugin if available.
helpNode.HideFromTabs = true
}
+1 -1
View File
@@ -153,7 +153,7 @@ func (cfg *Cfg) readPluginSettings(iniFile *ini.File) error {
if cfg.IsFeatureToggleEnabled("grafanaAdvisor") { // Use literal string to avoid circular dependency
preinstallPluginsAsync["grafana-advisor-app"] = InstallPlugin{"grafana-advisor-app", "", ""}
}
if cfg.IsFeatureToggleEnabled("grafanaPathfinder") { // Use literal string to avoid circular dependency
if cfg.IsFeatureToggleEnabled("interactiveLearning") { // Use literal string to avoid circular dependency
preinstallPluginsAsync["grafana-pathfinder-app"] = InstallPlugin{"grafana-pathfinder-app", "", ""}
}
cfg.processPreinstallPlugins(rawInstallPluginsAsync, preinstallPluginsAsync)
@@ -14,7 +14,7 @@ const PERMITTED_EXTENSION_SIDEBAR_PLUGINS = [
'grafana-investigations-app',
'grafana-assistant-app',
'grafana-dash-app',
// The docs plugin ID is going to transition from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// The docs plugin ID is transitioning from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// Support both until that migration is complete.
'grafana-grafanadocsplugin-app',
'grafana-pathfinder-app',
@@ -268,10 +268,10 @@ export function getComponentMetaFromComponentId(
}
}
// The docs plugin ID is going to transition from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// The interactive learning plugin ID is transitioning from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// Support both until that migration is complete.
// Prioritize the new plugin ID (grafana-pathfinder-app).
export function getPathfinderPluginId(availableComponents: ExtensionPointPluginMeta): string | undefined {
export function getInteractiveLearningPluginId(availableComponents: ExtensionPointPluginMeta): string | undefined {
if (availableComponents.has('grafana-pathfinder-app')) {
return 'grafana-pathfinder-app';
}
@@ -17,26 +17,26 @@ type Props = {
};
const compactAllowedComponents = ['grafana-assistant-app'];
const pathfinderPluginIds = ['grafana-pathfinder-app', 'grafana-grafanadocsplugin-app'];
const interactiveLearningPluginIds = ['grafana-pathfinder-app', 'grafana-grafanadocsplugin-app'];
export function ExtensionToolbarItem({ compact }: Props) {
const { availableComponents, dockedComponentId, setDockedComponentId } = useExtensionSidebarContext();
// Don't render the toolbar if the only available plugins are Grafana Pathfinder.
// It's opened by the help menu.
const nonPathfinderPlugins = Array.from(availableComponents.keys()).filter(
(pluginId) => !pathfinderPluginIds.includes(pluginId)
// Don't render the toolbar if the only available plugins are interactive learning plugins.
// They're opened by the interactive learning menu.
const nonInteractiveLearningPlugins = Array.from(availableComponents.keys()).filter(
(pluginId) => !interactiveLearningPluginIds.includes(pluginId)
);
if (nonPathfinderPlugins.length === 0) {
if (nonInteractiveLearningPlugins.length === 0) {
return null;
}
const dockedMeta = dockedComponentId ? getComponentMetaFromComponentId(dockedComponentId) : null;
const renderPluginButton = (pluginId: string, components: ComponentWithPluginId[]) => {
// Don't render the Grafana Pathfinder button.
// It's opened by the help menu button.
if (pathfinderPluginIds.includes(pluginId)) {
// Don't render any button for the interactive learning plugins.
// They're opened by the interactive learning button.
if (interactiveLearningPluginIds.includes(pluginId)) {
return null;
}
@@ -14,7 +14,7 @@ interface ToolbarItemButtonProps {
function getPluginIcon(pluginId?: string): string {
switch (pluginId) {
// The docs plugin ID is going to transition from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// The docs plugin ID is transitioning from grafana-grafanadocsplugin-app to grafana-pathfinder-app.
// Support both until that migration is complete.
case 'grafana-grafanadocsplugin-app':
case 'grafana-pathfinder-app':
@@ -10,7 +10,7 @@ import { OpenExtensionSidebarEvent } from 'app/types/events';
import {
useExtensionSidebarContext,
getComponentIdFromComponentMeta,
getPathfinderPluginId,
getInteractiveLearningPluginId,
} from '../ExtensionSidebar/ExtensionSidebarProvider';
import { TopNavBarMenu } from './TopNavBarMenu';
@@ -29,9 +29,9 @@ export const HelpTopBarButton = memo(function HelpTopBarButton({ isSmallScreen }
return null;
}
const pathfinderPluginId = getPathfinderPluginId(availableComponents);
const interactiveLearningPluginId = getInteractiveLearningPluginId(availableComponents);
if (isSmallScreen || !enrichedHelpNode.hideFromTabs || pathfinderPluginId === undefined) {
if (isSmallScreen || !enrichedHelpNode.hideFromTabs || interactiveLearningPluginId === undefined) {
return (
<Dropdown overlay={() => <TopNavBarMenu node={enrichedHelpNode} />} placement="bottom-end">
<ToolbarButton iconOnly icon="question-circle" aria-label={t('navigation.help.aria-label', 'Help')} />
@@ -39,7 +39,7 @@ export const HelpTopBarButton = memo(function HelpTopBarButton({ isSmallScreen }
);
}
const componentId = getComponentIdFromComponentMeta(pathfinderPluginId, 'Grafana Pathfinder');
const componentId = getComponentIdFromComponentMeta(interactiveLearningPluginId, 'Interactive learning');
const isOpen = dockedComponentId === componentId;
return (
@@ -55,8 +55,8 @@ export const HelpTopBarButton = memo(function HelpTopBarButton({ isSmallScreen }
const appEvents = getAppEvents();
appEvents.publish(
new OpenExtensionSidebarEvent({
pluginId: pathfinderPluginId,
componentTitle: 'Grafana Pathfinder',
pluginId: interactiveLearningPluginId,
componentTitle: 'Interactive learning',
})
);
}