Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved focus indication in split button panel. #1992

Merged
merged 1 commit into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1982](https://github.com/microsoft/BotFramework-Emulator/pull/1982)
- [1983](https://github.com/microsoft/BotFramework-Emulator/pull/1983)
- [1990](https://github.com/microsoft/BotFramework-Emulator/pull/1990)
- [1991](https://github.com/microsoft/BotFramework-Emulator/pull/1991)

## Removed
- [main] Removed unused `VersionManager` class in PR [1991](https://github.com/microsoft/BotFramework-Emulator/pull/1991)
Expand Down
2 changes: 2 additions & 0 deletions packages/app/client/src/ui/styles/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ html {
--split-button-expanded-outline: transparent;
--split-button-separator-bg-color: #C8C8C8;
--split-button-panel-color: var(--neutral-16);
--split-button-panel-border: 0;
--split-button-panel-bg-color: var(--neutral-1);
--split-button-selected-item-bg-color: var(--neutral-3);
--split-button-selected-item-border: 1px solid #00BCF2;

/* Icons */
--cosmos-db-contrast: var(--neutral-1);
Expand Down
8 changes: 5 additions & 3 deletions packages/app/client/src/ui/styles/themes/high-contrast.css
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ html {
--split-button-selected-outline: 1px solid #F38518;
--split-button-expanded-outline: 1px solid #F38518;
--split-button-separator-bg-color: #C8C8C8;
--split-button-panel-color: var(--neutral-16);
--split-button-panel-bg-color: var(--neutral-1);
--split-button-selected-item-bg-color: var(--neutral-3);
--split-button-panel-color: var(--neutral-1);
--split-button-panel-border: 1px solid #00BCF2;
--split-button-panel-bg-color: var(--neutral-16);
--split-button-selected-item-bg-color: var(--neutral-16);
--split-button-selected-item-border: 1px dashed #F38518;

/* Icons */
--cosmos-db-contrast: var(--neutral-1);
Expand Down
2 changes: 2 additions & 0 deletions packages/app/client/src/ui/styles/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ html {
--split-button-expanded-outline: transparent;
--split-button-separator-bg-color: #C8C8C8;
--split-button-panel-color: var(--neutral-16);
--split-button-panel-border: 0;
--split-button-panel-bg-color: var(--neutral-1);
--split-button-selected-item-bg-color: var(--neutral-3);
--split-button-selected-item-border: 1px solid #00BCF2;

/* Icons */
--cosmos-db-contrast: var(--neutral-16);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
//

.panel {
box-sizing: border-box;
position: absolute;
background-color: var(--split-button-panel-bg-color);
background-color: var(--split-button-panel-bg-color);
border: var(--split-button-panel-border);
box-shadow: 1px 1px 3px 0 rgba(0,0,0,0.3);
list-style: none;
margin: 0;
padding: 0;

&:focus {
border: 0;
outline: 0;
}
}
Expand All @@ -50,10 +51,12 @@
padding: 3px 26px;
border: 0;
background: none;
border: 1px solid transparent;
color: var(--split-button-panel-color);
cursor: pointer;

&:hover, &.selected {
background-color: var(--split-button-selected-item-bg-color);
border: var(--split-button-selected-item-border);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class SplitButtonPanel extends React.Component<SplitButtonPanelProps> {
if (expanded) {
const caretClientRect = caretRef.getBoundingClientRect();
const inlineStyle = {
left: `${caretClientRect.left}px`,
left: `${caretClientRect.left - 1}px`,
top: `${caretClientRect.bottom}px`,
};

Expand Down