Explore logs: remove exploreScrollableLogsContainer and track scroll to top (#84291)

* exploreScrollableLogsContainer: remove

* LogsNavigation: track scroll to top clicks

* Add missing dependency to the effect
This commit is contained in:
Matias Chomicki 2024-03-12 15:53:13 +01:00 committed by GitHub
parent f15aa2d30d
commit fb172b1b33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 8 additions and 16 deletions

View File

@ -136,7 +136,6 @@ Experimental features might be changed or removed without prior notice.
| `dashboardEmbed` | Allow embedding dashboard for external use in Code editors |
| `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) |
| `lokiFormatQuery` | Enables the ability to format Loki queries |
| `exploreScrollableLogsContainer` | Improves the scrolling behavior of logs in Explore |
| `pluginsDynamicAngularDetectionPatterns` | Enables fetching Angular detection patterns for plugins from GCOM and fallback to hardcoded ones |
| `vizAndWidgetSplit` | Split panels between visualizations and widgets |
| `prometheusIncrementalQueryInstrumentation` | Adds RudderStack events to incremental queries |

View File

@ -88,7 +88,6 @@ export interface FeatureToggles {
sqlDatasourceDatabaseSelection?: boolean;
lokiFormatQuery?: boolean;
cloudWatchLogsMonacoEditor?: boolean;
exploreScrollableLogsContainer?: boolean;
recordedQueriesMulti?: boolean;
pluginsDynamicAngularDetectionPatterns?: boolean;
vizAndWidgetSplit?: boolean;

View File

@ -523,13 +523,6 @@ var (
Owner: awsDatasourcesSquad,
AllowSelfServe: true,
},
{
Name: "exploreScrollableLogsContainer",
Description: "Improves the scrolling behavior of logs in Explore",
Stage: FeatureStageExperimental,
FrontendOnly: true,
Owner: grafanaObservabilityLogsSquad,
},
{
Name: "recordedQueriesMulti",
Description: "Enables writing multiple items from a single query within Recorded Queries",

View File

@ -69,7 +69,6 @@ frontendSandboxMonitorOnly,experimental,@grafana/plugins-platform-backend,false,
sqlDatasourceDatabaseSelection,preview,@grafana/dataviz-squad,false,false,true
lokiFormatQuery,experimental,@grafana/observability-logs,false,false,true
cloudWatchLogsMonacoEditor,GA,@grafana/aws-datasources,false,false,true
exploreScrollableLogsContainer,experimental,@grafana/observability-logs,false,false,true
recordedQueriesMulti,GA,@grafana/observability-metrics,false,false,false
pluginsDynamicAngularDetectionPatterns,experimental,@grafana/plugins-platform-backend,false,false,false
vizAndWidgetSplit,experimental,@grafana/dashboards-squad,false,false,true

1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
69 sqlDatasourceDatabaseSelection preview @grafana/dataviz-squad false false true
70 lokiFormatQuery experimental @grafana/observability-logs false false true
71 cloudWatchLogsMonacoEditor GA @grafana/aws-datasources false false true
exploreScrollableLogsContainer experimental @grafana/observability-logs false false true
72 recordedQueriesMulti GA @grafana/observability-metrics false false false
73 pluginsDynamicAngularDetectionPatterns experimental @grafana/plugins-platform-backend false false false
74 vizAndWidgetSplit experimental @grafana/dashboards-squad false false true

View File

@ -287,10 +287,6 @@ const (
// Enables the Monaco editor for CloudWatch Logs queries
FlagCloudWatchLogsMonacoEditor = "cloudWatchLogsMonacoEditor"
// FlagExploreScrollableLogsContainer
// Improves the scrolling behavior of logs in Explore
FlagExploreScrollableLogsContainer = "exploreScrollableLogsContainer"
// FlagRecordedQueriesMulti
// Enables writing multiple items from a single query within Recorded Queries
FlagRecordedQueriesMulti = "recordedQueriesMulti"

View File

@ -1420,7 +1420,8 @@
"metadata": {
"name": "exploreScrollableLogsContainer",
"resourceVersion": "1709648236447",
"creationTimestamp": "2024-03-05T14:17:16Z"
"creationTimestamp": "2024-03-05T14:17:16Z",
"deletionTimestamp": "2024-03-12T14:02:07Z"
},
"spec": {
"description": "Improves the scrolling behavior of logs in Explore",

View File

@ -173,6 +173,11 @@ function LogsNavigation({
[changeTime, scrollToTopLogs]
);
const onScrollToTopClick = useCallback(() => {
reportInteraction('grafana_explore_logs_scroll_top_clicked');
scrollToTopLogs();
}, [scrollToTopLogs]);
return (
<div className={styles.navContainer}>
{!config.featureToggles.logsInfiniteScrolling && (
@ -193,7 +198,7 @@ function LogsNavigation({
data-testid="scrollToTop"
className={styles.scrollToTopButton}
variant="secondary"
onClick={scrollToTopLogs}
onClick={onScrollToTopClick}
title="Scroll to top"
>
<Icon name="arrow-up" size="lg" />