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

feat: enabled manual height adjustment for bounty description box #1299

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions frontend/app/src/components/form/bounty/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,9 @@ function Form(props: FormProps) {
.map((item: FormField) => (
<Input
{...item}
type={item.name === 'description' ? 'textarea' : item.type}
Copy link
Contributor

@kevkevinpal kevkevinpal Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of cheking item.name === 'description' twice lets define it as a boolean above and use it in the 3 places

key={item.name}
newDesign={true}
newDesign={item.name === 'description' ? false : true}
values={values}
setAssigneefunction={item.name === 'assignee' && setAssigneeName}
peopleList={peopleList}
Expand Down Expand Up @@ -486,7 +487,7 @@ function Form(props: FormProps) {
}
label={
item.name === 'description' && !values.ticket_url
? 'Description *'
? 'Description'
: item.label
}
placeholder={
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/components/form/inputs/TextAreaInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function TextAreaInput({
}}
className={active ? 'euiFormRow_active' : (value ?? '') === '' ? '' : 'euiFormRow_filed'}
border={borderType}
label={labeltext}
label={labeltext === 'Description' ? `${labeltext} *` : labeltext}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should try to keep logic that is not related to the common component out of here

height={StyleOnText[label].height}
width={StyleOnText[label].width}
>
Expand Down
1 change: 1 addition & 0 deletions frontend/app/src/components/form/inputs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const FieldTextArea = styled(EuiTextArea)<styledProps>`
background-color: ${(p: any) => p?.color && p.color.pureWhite} !important;
background: ${(p: any) => p?.color && p.color.pureWhite} !important;
max-width: 900px;
width: 292px;
color: ${(p: any) => p?.color && p.color.pureBlack} !important;
box-shadow: none !important;
line-height: 17.6px;
Expand Down
Loading