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
72550803
Unverified
Commit
72550803
authored
Oct 09, 2023
by
Igor Stuev
Committed by
GitHub
Oct 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add contract name to the label (#1248)
parent
a1442247
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
3 deletions
+23
-3
AddressEntity.pw.tsx
ui/shared/entities/address/AddressEntity.pw.tsx
+14
-1
AddressEntity.tsx
ui/shared/entities/address/AddressEntity.tsx
+9
-2
AddressEntity.pw.tsx_default_contract-unverified-1.png
...__/AddressEntity.pw.tsx_default_contract-unverified-1.png
+0
-0
AddressEntity.pw.tsx_default_hover-1.png
.../__screenshots__/AddressEntity.pw.tsx_default_hover-1.png
+0
-0
No files found.
ui/shared/entities/address/AddressEntity.pw.tsx
View file @
72550803
...
@@ -8,7 +8,7 @@ import AddressEntity from './AddressEntity';
...
@@ -8,7 +8,7 @@ import AddressEntity from './AddressEntity';
const
iconSizes
=
[
'
md
'
,
'
lg
'
];
const
iconSizes
=
[
'
md
'
,
'
lg
'
];
test
.
use
({
viewport
:
{
width
:
180
,
height
:
1
0
0
}
});
test
.
use
({
viewport
:
{
width
:
180
,
height
:
1
4
0
}
});
test
.
describe
(
'
icon size
'
,
()
=>
{
test
.
describe
(
'
icon size
'
,
()
=>
{
iconSizes
.
forEach
((
size
)
=>
{
iconSizes
.
forEach
((
size
)
=>
{
...
@@ -123,3 +123,16 @@ test('customization', async({ mount }) => {
...
@@ -123,3 +123,16 @@ test('customization', async({ mount }) => {
await
expect
(
component
).
toHaveScreenshot
();
await
expect
(
component
).
toHaveScreenshot
();
});
});
test
(
'
hover
'
,
async
({
page
,
mount
})
=>
{
const
component
=
await
mount
(
<
TestApp
>
<
AddressEntity
address=
{
addressMock
.
withoutName
}
/>
</
TestApp
>,
);
await
component
.
getByText
(
addressMock
.
hash
.
slice
(
0
,
4
)).
hover
();
await
expect
(
page
).
toHaveScreenshot
();
});
ui/shared/entities/address/AddressEntity.tsx
View file @
72550803
import
type
{
As
}
from
'
@chakra-ui/react
'
;
import
type
{
As
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Skeleton
,
Tooltip
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Skeleton
,
Tooltip
,
chakra
,
VStack
}
from
'
@chakra-ui/react
'
;
import
_omit
from
'
lodash/omit
'
;
import
_omit
from
'
lodash/omit
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -102,8 +102,15 @@ type ContentProps = Omit<EntityBase.ContentBaseProps, 'text'> & Pick<EntityProps
...
@@ -102,8 +102,15 @@ type ContentProps = Omit<EntityBase.ContentBaseProps, 'text'> & Pick<EntityProps
const
Content
=
chakra
((
props
:
ContentProps
)
=>
{
const
Content
=
chakra
((
props
:
ContentProps
)
=>
{
if
(
props
.
address
.
name
)
{
if
(
props
.
address
.
name
)
{
const
label
=
(
<
VStack
gap=
{
0
}
py=
{
1
}
color=
"inherit"
>
<
Box
fontWeight=
{
600
}
whiteSpace=
"pre-wrap"
wordBreak=
"break-word"
>
{
props
.
address
.
name
}
</
Box
>
<
Box
whiteSpace=
"pre-wrap"
wordBreak=
"break-word"
>
{
props
.
address
.
hash
}
</
Box
>
</
VStack
>
);
return
(
return
(
<
Tooltip
label=
{
props
.
address
.
hash
}
maxW=
"100vw"
>
<
Tooltip
label=
{
label
}
maxW=
"100vw"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
as=
"span"
>
<
Skeleton
isLoaded=
{
!
props
.
isLoading
}
overflow=
"hidden"
textOverflow=
"ellipsis"
whiteSpace=
"nowrap"
as=
"span"
>
{
props
.
address
.
name
}
{
props
.
address
.
name
}
</
Skeleton
>
</
Skeleton
>
...
...
ui/shared/entities/address/__screenshots__/AddressEntity.pw.tsx_default_contract-unverified-1.png
View replaced file @
a1442247
View file @
72550803
7.67 KB
|
W:
|
H:
9.95 KB
|
W:
|
H:
2-up
Swipe
Onion skin
ui/shared/entities/address/__screenshots__/AddressEntity.pw.tsx_default_hover-1.png
0 → 100644
View file @
72550803
8.46 KB
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