Skip to content

Commit c703883

Browse files
Merge pull request #198 from pneumaticapp/frontend/refactoring/8830__Layout_errors_on_the_template_creation_page
8830 refactoring(styles): Layout errors on the template creation page
2 parents da2f07b + 853a445 commit c703883

13 files changed

Lines changed: 27 additions & 81 deletions

File tree

frontend/src/public/components/RichEditor/plugins/DebugListSelectionPlugin/DebugListSelectionPlugin.tsx

Lines changed: 0 additions & 49 deletions
This file was deleted.

frontend/src/public/components/RichEditor/plugins/DebugListSelectionPlugin/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/src/public/components/TemplateEdit/ExtraFields/Checkbox/ExtraFieldCheckbox.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
}
2121

2222
.kickoff-create-field-name-input {
23-
padding: 0 4px 0 0;
24-
max-width: calc(100% - 5px);
23+
padding: 0;
2524
line-height: 20px;
2625
border: none;
2726

frontend/src/public/components/TemplateEdit/ExtraFields/Creatable/ExtraFieldCreatable.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696

9797
.kickoff-create-field-options {
9898
margin: 0;
99+
margin-top: 0.8rem;
99100
padding: 0;
100101
list-style: none;
101102
}
@@ -166,10 +167,6 @@
166167
align-items: center;
167168
}
168169

169-
.kickoff-dropdown-field {
170-
margin-bottom: 8px;
171-
}
172-
173170
.kickoff-create-field__error-text {
174171
margin-top: 4px;
175172
margin-bottom: 0;

frontend/src/public/components/TemplateEdit/ExtraFields/Creatable/ExtraFieldCreatable.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ export function ExtraFieldCreatable({
170170

171171
const renderKickoffField = () => (
172172
<FieldWithName
173-
inputClassName={inputStyles['kickoff-dropdown-field']}
174173
labelBackgroundColor={labelBackgroundColor}
175174
field={field}
176175
descriptionPlaceholder={descriptionPlaceholder}

frontend/src/public/components/TemplateEdit/ExtraFields/User/ExtraFieldUser.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@
9595
}
9696
}
9797

98-
.kickoff-dropdown-field {
99-
margin-bottom: 8px;
100-
}
101-
10298
.kickoff-create-field__error-text {
10399
margin-top: 4px;
104100
margin-bottom: 0;

frontend/src/public/components/TemplateEdit/ExtraFields/User/ExtraFieldUser.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export function ExtraFieldUser({
6262

6363
const renderKickoffField = () => (
6464
<FieldWithName
65-
inputClassName={inputStyles['kickoff-dropdown-field']}
6665
labelBackgroundColor={labelBackgroundColor}
6766
field={field}
6867
descriptionPlaceholder={descriptionPlaceholder}

frontend/src/public/components/TemplateEdit/ExtraFields/utils/FieldWithName.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ export const FieldWithName = forwardRef<HTMLInputElement, IKickoffFormFieldWithN
130130
classnames(
131131
getInputNameBackground(labelBackgroundColor),
132132
styles['kick-off-input__name'],
133+
isKickoffEditorMode && styles['kick-off-input__name_kickoff-edit'],
133134
fieldNameError && styles['kick-off-input__name_error'],
134135
),
135-
[labelBackgroundColor, fieldNameError],
136+
[labelBackgroundColor, fieldNameError, isKickoffEditorMode],
136137
);
137138

138139
const labelReplacementClassName = useMemo(

frontend/src/public/components/TemplateEdit/KickoffRedux/KickoffRedux.css

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696
}
9797

9898
svg {
99-
margin-bottom: 0.2rem;
99+
position: relative;
100+
top: -0.2rem;
100101
}
101102

102103
&:hover {
@@ -114,6 +115,7 @@
114115
position: relative;
115116
z-index: 1;
116117
margin: 0 1.2rem -1rem;
118+
padding: 0 1.2rem;
117119
display: inline-flex;
118120
box-sizing: border-box;
119121
min-width: 0;
@@ -125,7 +127,6 @@
125127

126128
input,
127129
.kick-off-input__name-textarea {
128-
padding: 0 1.2rem;
129130
overflow: hidden;
130131
box-sizing: border-box;
131132
font-family: Nunito, sans-serif;
@@ -152,6 +153,7 @@
152153
}
153154

154155
.kick-off-input__name-textarea {
156+
padding: 0;
155157
box-sizing: border-box;
156158
flex: 1 1 auto;
157159
min-width: 0;
@@ -195,6 +197,18 @@
195197
}
196198
}
197199

200+
.kick-off-input__name_kickoff-edit {
201+
width: fit-content;
202+
max-width: calc(100% - 2.4rem);
203+
align-self: flex-start;
204+
205+
.kick-off-input__name-textarea {
206+
flex: 0 1 auto;
207+
width: auto;
208+
max-width: 100%;
209+
}
210+
}
211+
198212
.kick-off-input__name_error {
199213
& input::placeholder,
200214
& .kick-off-input__name-textarea::placeholder {
@@ -421,11 +435,8 @@
421435
color: var(--pneumatic-color-warning);
422436
}
423437

438+
.without-label,
424439
.with-label {
425-
margin-top: 2.3rem;
426-
}
427-
428-
.without-label {
429440
margin-top: 1.6rem;
430441
}
431442

@@ -526,7 +537,7 @@
526537
.kick-off-edit-name {
527538
all: unset;
528539
flex-shrink: 0;
529-
padding-right: 0.4rem;
540+
margin-left: 0.4rem;
530541
color: var(--pneumatic-color-link);
531542
background-color: var(--pneumatic-color-white);
532543
transition: color 0.1s ease-in-out;
@@ -537,8 +548,6 @@
537548
}
538549

539550
.kick-off-required-sign {
540-
position: relative;
541-
left: -0.3rem;
542551
flex-shrink: 0;
543552
display: inline-block;
544553
width: 0.68rem;
@@ -557,11 +566,6 @@
557566
}
558567
}
559568

560-
.kick-off-required-sign + .kick-off-edit-name {
561-
position: relative;
562-
left: -0.3rem;
563-
}
564-
565569
.workflow-name-field-container {
566570
margin-top: 3.2rem;
567571
}

frontend/src/public/components/TemplateEdit/TaskForm/TaskDescriptionEditor.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export function TaskDescriptionEditor({
7676
return (
7777
<RichEditor
7878
ref={editorRef}
79-
title={formatMessage({ id: 'tasks.task-description-field' })}
8079
placeholder={formatMessage({ id: 'template.task-description-placeholder' })}
8180
defaultValue={value}
8281
handleChange={wrappedHandleChange}

0 commit comments

Comments
 (0)