Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
51c99be8
Commit
51c99be8
authored
May 15, 2024
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unnecessary styles
parent
15539ccb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
28 deletions
+2
-28
PublicTagsSubmitFieldTag.tsx
ui/publicTags/submit/fields/PublicTagsSubmitFieldTag.tsx
+0
-10
PublicTagsSubmitFieldTagColor.tsx
...ublicTags/submit/fields/PublicTagsSubmitFieldTagColor.tsx
+0
-6
PublicTagsSubmitFieldTagType.tsx
ui/publicTags/submit/fields/PublicTagsSubmitFieldTagType.tsx
+2
-9
FancySelect.tsx
ui/shared/FancySelect/FancySelect.tsx
+0
-3
No files found.
ui/publicTags/submit/fields/PublicTagsSubmitFieldTag.tsx
View file @
51c99be8
...
...
@@ -31,10 +31,6 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, register, errors, onAddCl
const
bgColorDefault
=
useColorModeValue
(
'
blackAlpha.50
'
,
'
whiteAlpha.100
'
);
const
bgColorError
=
useColorModeValue
(
'
red.50
'
,
'
red.900
'
);
// TODO @tom2drum remove these custom colors after #1903 is done
const
inputBgColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
inputBgColorDisabled
=
useColorModeValue
(
'
#ececec
'
,
'
#232425
'
);
const
handleAddClick
=
React
.
useCallback
(()
=>
{
onAddClick
?.(
index
);
},
[
index
,
onAddClick
]);
...
...
@@ -58,8 +54,6 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, register, errors, onAddCl
isInvalid=
{
Boolean
(
errors
?.
name
)
}
isDisabled=
{
isDisabled
}
autoComplete=
"off"
bgColor=
{
inputBgColor
}
_disabled=
{
{
bgColor
:
inputBgColorDisabled
}
}
/>
<
InputPlaceholder
text=
"Tag (max 35 characters)"
error=
{
errors
?.
name
}
/>
</
FormControl
>
...
...
@@ -74,8 +68,6 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, register, errors, onAddCl
isInvalid=
{
Boolean
(
errors
?.
url
)
}
isDisabled=
{
isDisabled
}
autoComplete=
"off"
bgColor=
{
inputBgColor
}
_disabled=
{
{
bgColor
:
inputBgColorDisabled
}
}
/>
<
InputPlaceholder
text=
"Label URL"
error=
{
errors
?.
url
}
/>
</
FormControl
>
...
...
@@ -105,9 +97,7 @@ const PublicTagsSubmitFieldTag = ({ index, isDisabled, register, errors, onAddCl
isInvalid=
{
Boolean
(
errors
?.
tooltipDescription
)
}
isDisabled=
{
isDisabled
}
autoComplete=
"off"
bgColor=
{
inputBgColor
}
maxH=
"160px"
_disabled=
{
{
bgColor
:
inputBgColorDisabled
}
}
/>
<
InputPlaceholder
text=
"Label description - any text to be shown on label hover (max 80 characters)"
...
...
ui/publicTags/submit/fields/PublicTagsSubmitFieldTagColor.tsx
View file @
51c99be8
...
...
@@ -23,10 +23,6 @@ interface Props<Type extends ColorFieldTypes> {
const
PublicTagsSubmitFieldTagColor
=
<
Type
extends
ColorFieldTypes
>
(
{
isDisabled
,
error
,
fieldName
,
placeholder
,
fieldType
}
: Props
<
Type
>
) =
>
{
const
{
getValues
,
register
}
=
useFormContext
<
FormFields
>
();
// TODO @tom2drum remove these custom colors after #1903 is done
const
inputBgColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
inputBgColorDisabled
=
useColorModeValue
(
'
#ececec
'
,
'
#232425
'
);
const
circleBgColorDefault
=
{
bgColor
:
useColorModeValue
(
'
gray.100
'
,
'
gray.700
'
),
textColor
:
useColorModeValue
(
'
blackAlpha.800
'
,
'
whiteAlpha.800
'
),
...
...
@@ -43,9 +39,7 @@ const PublicTagsSubmitFieldTagColor = <Type extends ColorFieldTypes>({ isDisable
isInvalid=
{
Boolean
(
error
)
}
isDisabled=
{
isDisabled
}
autoComplete=
"off"
bgColor=
{
inputBgColor
}
maxLength=
{
6
}
_disabled=
{
{
bgColor
:
inputBgColorDisabled
}
}
/>
<
InputPlaceholder
text=
{
placeholder
}
error=
{
error
}
/>
<
InputRightElement
w=
"30px"
right=
{
4
}
zIndex=
{
10
}
>
...
...
ui/publicTags/submit/fields/PublicTagsSubmitFieldTagType.tsx
View file @
51c99be8
import
{
chakra
,
Flex
,
FormControl
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
chakra
,
Flex
,
FormControl
}
from
'
@chakra-ui/react
'
;
import
type
{
GroupBase
,
SelectComponentsConfig
,
SingleValueProps
}
from
'
chakra-react-select
'
;
import
{
chakraComponents
}
from
'
chakra-react-select
'
;
import
_capitalize
from
'
lodash/capitalize
'
;
...
...
@@ -24,9 +24,6 @@ const PublicTagsSubmitFieldTagType = ({ index, tagTypes, isDisabled }: Props) =>
const
isMobile
=
useIsMobile
();
const
{
control
,
watch
}
=
useFormContext
<
FormFields
>
();
// TODO @tom2drum remove these custom colors after #1903 is done
const
inputBgColor
=
useColorModeValue
(
'
white
'
,
'
black
'
);
const
typeOptions
=
React
.
useMemo
(()
=>
tagTypes
?.
map
((
type
)
=>
({
value
:
type
.
type
,
label
:
_capitalize
(
type
.
type
),
...
...
@@ -79,14 +76,10 @@ const PublicTagsSubmitFieldTagType = ({ index, tagTypes, isDisabled }: Props) =>
isAsync=
{
false
}
isSearchable=
{
false
}
components=
{
selectComponents
}
formControlStyles=
{
{
bgColor
:
inputBgColor
,
borderRadius
:
'
base
'
,
}
}
/>
</
FormControl
>
);
},
[
i
nputBgColor
,
i
sDisabled
,
isMobile
,
selectComponents
,
typeOptions
]);
},
[
isDisabled
,
isMobile
,
selectComponents
,
typeOptions
]);
return
(
<
Controller
...
...
ui/shared/FancySelect/FancySelect.tsx
View file @
51c99be8
import
type
{
ChakraProps
}
from
'
@chakra-ui/react
'
;
import
{
FormControl
,
useToken
,
useColorMode
}
from
'
@chakra-ui/react
'
;
import
type
{
CSSObjectWithLabel
,
GroupBase
,
SingleValue
,
MultiValue
,
AsyncProps
,
Props
as
SelectProps
}
from
'
chakra-react-select
'
;
import
{
Select
,
AsyncSelect
}
from
'
chakra-react-select
'
;
...
...
@@ -13,7 +12,6 @@ import InputPlaceholder from 'ui/shared/InputPlaceholder';
interface
CommonProps
{
error
?:
Merge
<
FieldError
,
FieldErrorsImpl
<
Option
>>
|
undefined
;
placeholderIcon
?:
React
.
ReactNode
;
formControlStyles
?:
ChakraProps
;
}
interface
RegularSelectProps
extends
SelectProps
<
Option
,
boolean
,
GroupBase
<
Option
>>
,
CommonProps
{
...
...
@@ -49,7 +47,6 @@ const FancySelect = (props: Props, ref: React.LegacyRef<HTMLDivElement>) => {
{
...
(
props
.
error
?
{
'
aria
-
invalid
':
true
}
:
{})
}
{
...
(
props
.
isDisabled
?
{
'
aria
-
disabled
':
true
}
:
{})
}
{
...
(
props
.
value
?
{
'
data
-
active
':
true
}
:
{})
}
{
...
props
.
formControlStyles
}
>
<
SelectComponent
{
...
props
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment