Skip to content

Commit abb79b2

Browse files
authored
Merge pull request #1581 from epam/release/2.5
Release/2.5
2 parents be0ccff + 7c55033 commit abb79b2

File tree

10 files changed

+24
-17
lines changed

10 files changed

+24
-17
lines changed

packages/ketcher-react/src/script/ui/action/functionalGroups.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const functionalGroupsLib = {
2121
shortcut: 'Shift+f',
2222
// TODO Update HELP about current tools
2323
title: 'Functional Groups',
24-
action: { dialog: 'fGroups' },
24+
action: { dialog: 'templates', prop: { tab: 1 } },
2525
selected: (editor) => editor._tool.mode === 'fg',
2626
disabled: (_, __, options) => {
2727
return !options.app.functionalGroups

packages/ketcher-react/src/script/ui/dialog/template/TemplateDialog.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ interface TemplateLibProps {
7373
lib: Array<Template>
7474
selected: Template
7575
mode: string
76+
initialTab: number
7677
}
7778

7879
interface TemplateLibCallProps {
@@ -140,12 +141,13 @@ const TemplateDialog: FC<Props> = (props) => {
140141
onFilter,
141142
onChangeGroup,
142143
mode,
144+
initialTab,
143145
functionalGroups,
144146
lib: templateLib,
145147
...rest
146148
} = props
147149

148-
const [tab, setTab] = useState(TemplateTabs.TemplateLibrary)
150+
const [tab, setTab] = useState(initialTab ?? TemplateTabs.TemplateLibrary)
149151
const [expandedAccordions, setExpandedAccordions] = useState<string[]>([
150152
props.group
151153
])
@@ -306,6 +308,7 @@ const TemplateDialog: FC<Props> = (props) => {
306308
export default connect(
307309
(store) => ({
308310
...omit(['attach'], (store as any).templates),
311+
initialTab: (store as any).modal?.prop?.tab,
309312
functionalGroups: functionalGroupsSelector(store).map((template) => {
310313
const struct = template.struct.clone()
311314
struct.sgroups.delete(0)

packages/ketcher-react/src/script/ui/dialog/template/template-attach.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ const LeftColumn = styled('div')`
7676

7777
const RightColumn = styled('div')`
7878
width: 40%;
79+
min-width: 200px;
80+
box-sizing: border-box;
7981
padding: 12px;
8082
display: flex;
8183
flex-direction: column;

packages/ketcher-react/src/script/ui/dialog/template/template-lib.module.less

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
@import '../../../../style/mixins';
1818
@import '../../../../style/variables';
1919

20-
@shadow-color: #DEE1E4;
21-
2220
.warning {
2321
color: @error-color;
2422

@@ -59,7 +57,7 @@
5957
}
6058

6159
& > footer {
62-
box-shadow: 0 -6px 6px 0 @shadow-color;
60+
box-shadow: 0 -6px 6px 0 @color-accordion-shadow;
6361
z-index: 10;
6462

6563
& > input {
@@ -141,7 +139,7 @@
141139

142140
:global(.MuiAccordionDetails-root) {
143141
background-color: @color-primary-light;
144-
box-shadow: inset 0 -2px 8px 0 @shadow-color;
142+
box-shadow: inset 0 -2px 8px 0 @color-accordion-shadow;
145143
width: 424px;
146144
padding: 12px 14px 4px;
147145
}
@@ -183,7 +181,7 @@
183181
}
184182

185183
.tabs {
186-
box-shadow: 0 6px 6px 0 @shadow-color;
184+
box-shadow: 0 6px 6px 0 @color-accordion-shadow;
187185
z-index: 10;
188186
}
189187

packages/ketcher-react/src/script/ui/dialog/toolbox/sgroup.module.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
margin-bottom: 0;
100100
}
101101

102-
& > textarea {
102+
textarea {
103103
margin-top: 4px;
104104
resize: vertical;
105105
max-height: 240px;

packages/ketcher-react/src/script/ui/state/shared.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function onAction(action) {
3030
if (action && action.dialog) {
3131
return {
3232
type: 'MODAL_OPEN',
33-
data: { name: action.dialog }
33+
data: { name: action.dialog, prop: action.prop }
3434
}
3535
}
3636
if (action && action.thunk) {

packages/ketcher-react/src/script/ui/views/components/StructEditor/StructEditor.module.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@
107107
position: relative;
108108

109109
.scrollbar();
110+
111+
&::-webkit-scrollbar {
112+
background-color: @color-background-primary;
113+
}
110114
}
111115
// stylelint-disable-next-line selector-pseudo-class-no-unknown
112116
:global(.smallEditor) .canvas {

packages/ketcher-react/src/script/ui/views/modal/components/meta/Settings/Settings.module.less

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
@import '../../../../../../../style/variables.less';
1818

19-
@shadow-color: #DEE1E4;
20-
2119
.button {
2220
background-color: transparent;
2321
border: none;
@@ -102,11 +100,12 @@
102100

103101
> header{
104102
flex-shrink: 0;
105-
box-shadow: 0 2px 4px 0 @shadow-color;
106-
z-index: 10;
103+
box-shadow: 0 2px 4px 0 @color-accordion-shadow;
104+
z-index: 10;
107105
}
108106

109107
> footer {
110-
box-shadow: 0 -2px 4px 0 @shadow-color;
108+
box-shadow: 0 -2px 4px 0 @color-accordion-shadow;
109+
z-index: 10;
111110
}
112111
}

packages/ketcher-react/src/script/ui/views/modal/components/toolbox/Atom/Atom.module.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
@import '../../../../../../../style/variables.less';
2020
@import '../../../../../../../style/mixins.less';
2121

22-
@shadow-color: #DEE1E4;
2322
@padding-container: 11.5px;
2423

2524
.atomProps {
@@ -35,7 +34,7 @@
3534

3635
> header {
3736
flex-shrink: 0;
38-
box-shadow: 0 2px 4px 0 @shadow-color;
37+
box-shadow: 0 2px 4px 0 @color-accordion-shadow;
3938
z-index: 10;
4039
}
4140

@@ -46,7 +45,8 @@
4645
}
4746

4847
> footer {
49-
box-shadow: 0 -2px 4px 0 @shadow-color;
48+
box-shadow: 0 -2px 4px 0 @color-accordion-shadow;
49+
z-index: 10;
5050
}
5151
}
5252

packages/ketcher-react/src/style/variables.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
// Shadows
108108
@color-dropcontainer-shadow: rgba(103, 104, 132, 0.18);
109109
@color-open-window-shadow: rgba(103, 104, 132, 0.25);
110+
@color-accordion-shadow: rgba(1, 1, 50, 0.1);
110111

111112
// Dropdown
112113
@color-dropdown-hover: #dddddd;

0 commit comments

Comments
 (0)