Skip to content

Commit 43a03d1

Browse files
committed
Remove tab layout feature flag and unused code
The tab layout for TaskRun and PipelineRun details has been enabled for a number of releases now with no user-facing option to revert to the previous design. Remove the remaining feature flag and the code related to the old layout. Also restore the options in the individual log containers to view the raw logs in a new tab or to download them to a file. These are only enabled in the Dashboard application and are available on an opt-in basis to consumers of the UI components.
1 parent 998acb5 commit 43a03d1

39 files changed

Lines changed: 550 additions & 2512 deletions

packages/components/src/components/LogsToolbar/LogsToolbar.jsx

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2020-2025 The Tekton Authors
2+
Copyright 2020-2026 The Tekton Authors
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
55
You may obtain a copy of the License at
@@ -12,13 +12,7 @@ limitations under the License.
1212
*/
1313
/* istanbul ignore file */
1414
import { useIntl } from 'react-intl';
15-
import {
16-
Download,
17-
Launch,
18-
Maximize,
19-
Minimize,
20-
Settings
21-
} from '@carbon/react/icons';
15+
import { Maximize, Minimize, Settings } from '@carbon/react/icons';
2216
import {
2317
Checkbox,
2418
CheckboxGroup,
@@ -31,13 +25,11 @@ import { useState } from 'react';
3125
const LogsToolbar = ({
3226
id,
3327
isMaximized,
34-
name,
3528
logLevels,
3629
onToggleShowTimestamps,
3730
onToggleLogLevel,
3831
onToggleMaximized,
39-
showTimestamps,
40-
url
32+
showTimestamps
4133
}) => {
4234
const carbonPrefix = usePrefix();
4335
const intl = useIntl();
@@ -72,39 +64,6 @@ const LogsToolbar = ({
7264
)}
7365
</button>
7466
) : null}
75-
{url ? (
76-
<>
77-
<a
78-
className={`${carbonPrefix}--btn ${carbonPrefix}--btn--sm ${carbonPrefix}--layout--size-sm ${carbonPrefix}--btn--icon-only ${carbonPrefix}--copy-btn`}
79-
href={url}
80-
target="_blank"
81-
rel="noopener noreferrer"
82-
>
83-
<Launch>
84-
<title>
85-
{intl.formatMessage({
86-
id: 'dashboard.logs.launchButtonTooltip',
87-
defaultMessage: 'Open logs in a new window'
88-
})}
89-
</title>
90-
</Launch>
91-
</a>
92-
<a
93-
className={`${carbonPrefix}--btn ${carbonPrefix}--btn--sm ${carbonPrefix}--layout--size-sm ${carbonPrefix}--btn--icon-only ${carbonPrefix}--copy-btn`}
94-
download={name}
95-
href={url}
96-
>
97-
<Download>
98-
<title>
99-
{intl.formatMessage({
100-
id: 'dashboard.logs.downloadButtonTooltip',
101-
defaultMessage: 'Download logs'
102-
})}
103-
</title>
104-
</Download>
105-
</a>
106-
</>
107-
) : null}
10867
<Popover
10968
align="bottom-end"
11069
autoAlign

packages/components/src/components/LogsToolbar/LogsToolbar.stories.jsx

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2019-2025 The Tekton Authors
2+
Copyright 2019-2026 The Tekton Authors
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
55
You may obtain a copy of the License at
@@ -97,27 +97,3 @@ export const WithMaximize = {
9797
);
9898
}
9999
};
100-
101-
export const WithURL = {
102-
args: {
103-
...WithMaximize.args,
104-
name: 'some_filename.txt',
105-
url: '/some/logs/url'
106-
},
107-
render: args => {
108-
const [, updateArgs] = useArgs();
109-
110-
return (
111-
<LogsToolbar
112-
{...args}
113-
onToggleLogLevel={logLevel =>
114-
updateArgs({ logLevels: { ...args.logLevels, ...logLevel } })
115-
}
116-
onToggleMaximized={() => updateArgs({ isMaximized: !args.isMaximized })}
117-
onToggleShowTimestamps={showTimestamps =>
118-
updateArgs({ showTimestamps })
119-
}
120-
/>
121-
);
122-
}
123-
};

0 commit comments

Comments
 (0)