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
+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
}