Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit f03e7de

Browse files
committed
fix(plugins/plugin-client-default): don't show ? icon in default client
it doesn't really offer help, and now with the sidebar, we have a much richer way to access what the user might want, as opposed to a single fixed page Also avoid tab-focusing on the MastheadBrand. Also improve the consistency of focus/active outlining. We had some ancient rules that resulted in either no outline or outlines with different colors than the rest of the standard patternfly stylings.
1 parent 9f11850 commit f03e7de

File tree

6 files changed

+7
-32
lines changed

6 files changed

+7
-32
lines changed

plugins/plugin-client-common/src/components/Client/TopTabStripe/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default class TopTabStripe extends React.PureComponent<Props> {
192192
<Masthead className="kui--top-tab-stripe-header">
193193
{this.sidebarToggle()}
194194
<MastheadMain className="kui--top-tab-stripe-header--main">
195-
<MastheadBrand component="span" className="kui--top-tab-stripe-header--brand">
195+
<MastheadBrand component="span" className="kui--top-tab-stripe-header--brand" tabIndex={-1}>
196196
{this.headerName()}
197197
</MastheadBrand>
198198
<MastheadContent className="kui--top-tab-stripe-header--content">{this.tabs()}</MastheadContent>

plugins/plugin-client-common/web/css/static/carbon-overrides-common.css

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,6 @@ body td {
2323
transition-timing-function: var(--transition-timing-function);
2424
}
2525

26-
a.bx--tabs__nav-link:focus,
27-
a.bx--tabs__nav-link:active {
28-
outline-color: var(--color-brand-01);
29-
}
30-
31-
/* mimic bx--tabs__navlink:focus */
32-
.kui-tab.left-tab-stripe-button:focus,
33-
a.kui--tab-navigatable:focus {
34-
outline: 2px solid var(--color-brand-03);
35-
outline-offset: -2px;
36-
}
37-
38-
a.kui-new-tab__plus:focus,
39-
a.kui-new-tab__plus:active,
40-
.kui--sidecar a.graphical-icon:focus,
41-
.kui--sidecar a.graphical-icon:active,
42-
.sidecar-bottom-stripe-toolbar a.kui--tab-navigatable:focus,
43-
.sidecar-bottom-stripe-toolbar a.kui--tab-navigatable:active {
44-
outline: 2px solid var(--color-brand-03);
45-
outline-offset: -2px;
46-
}
47-
4826
body[kui-theme-style] .bx--link {
4927
pointer-events: unset;
5028
touch-action: unset;

plugins/plugin-client-common/web/scss/components/DropDown/PatternFly.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ body[kui-theme-style] {
4949
color: inherit;
5050
}
5151

52-
.pf-c-dropdown__toggle {
53-
&:focus {
54-
outline: none;
55-
}
56-
}
57-
5852
.pf-c-dropdown__menu {
5953
max-height: 30rem;
6054
overflow-y: auto;

plugins/plugin-client-default/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default function renderMain(props: KuiProps) {
7979

8080
return (
8181
<Kui
82+
noHelp
8283
version={version}
8384
productName={productName}
8485
lightweightTables

plugins/plugin-core-support/src/test/core-support2/tab-navigation.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('tab navigation', function(this: Common.ISuite) {
130130
testSelector(TAB_BUTTON_N(1), undefined, undefined, true)
131131
testSelector(TAB_BUTTON_N(2))
132132
testSelector(tabButtonSelector)
133-
testSelector('#help-button', false, undefined, true)
133+
// testSelector('#help-button', false, undefined, true)
134134
testPromptIsSelected(true) // <-- true means we hit tab first
135135
it('should be the end of the full cycle', promptBetterBeFocused)
136136
}
@@ -154,7 +154,8 @@ describe('tab navigation', function(this: Common.ISuite) {
154154
/* testSelector(TAB_BUTTON_N(1))
155155
testSelector(TAB_BUTTON_N(2))
156156
testSelector(tabButtonSelector) */
157+
/* removing about button
157158
testSelector('#help-button', true, undefined, true)
158159
it('should have a new About Kui top tab', () =>
159-
this.app.client.$(Selectors.TOP_TAB_WITH_TITLE('Welcome to Kui')).then(_ => _.waitForDisplayed({ timeout: 5000 })))
160+
this.app.client.$(Selectors.TOP_TAB_WITH_TITLE('Welcome to Kui')).then(_ => _.waitForDisplayed({ timeout: 5000 }))) */
160161
})

plugins/plugin-core-support/src/test/core/about.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
*/
1616
import { Common, CLI, ReplExpect, Selectors, Util } from '@kui-shell/test'
1717

18-
describe(`about command ${process.env.MOCHA_RUN_TARGET || ''}`, function(this: Common.ISuite) {
18+
/** xdescribe because the default client does show the <?> icon (`noHelp`) */
19+
xdescribe(`about command ${process.env.MOCHA_RUN_TARGET || ''}`, function(this: Common.ISuite) {
1920
before(Common.before(this))
2021
after(Common.after(this))
2122
Util.closeAllExceptFirstTab.bind(this)()

0 commit comments

Comments
 (0)