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
1822bf68
Commit
1822bf68
authored
Feb 20, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix skeleton for dynamicaly truncated strings
parent
b51bbe4a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
decs.d.ts
decs.d.ts
+2
-1
skeleton.recipe.ts
toolkit/theme/recipes/skeleton.recipe.ts
+3
-1
HashStringShortenDynamic.tsx
ui/shared/HashStringShortenDynamic.tsx
+0
-1
Menu.tsx
ui/showcases/Menu.tsx
+1
-1
No files found.
decs.d.ts
View file @
1822bf68
declare
module
'
react-identicons
'
declare
module
'
react-identicons
'
;
declare
module
'
use-font-face-observer
'
;
toolkit/theme/recipes/skeleton.recipe.ts
View file @
1822bf68
...
...
@@ -13,7 +13,9 @@ export const recipe = defineRecipe({
color
:
'
transparent
'
,
pointerEvents
:
'
none
'
,
userSelect
:
'
none
'
,
flexShrink
:
'
0
'
,
// we have to override the property set by chakra in order to make the skeleton shrink
// when the text is too long
flexShrink
:
'
initial
'
,
'
&::before, &::after, *
'
:
{
visibility
:
'
hidden
'
,
},
...
...
ui/shared/HashStringShortenDynamic.tsx
View file @
1822bf68
...
...
@@ -28,7 +28,6 @@ interface Props {
as
?:
React
.
ElementType
;
}
// TODO @tom2drum fix truncation when loading
const
HashStringShortenDynamic
=
({
hash
,
fontWeight
=
'
400
'
,
isTooltipDisabled
,
tailLength
=
TAIL_LENGTH
,
as
=
'
span
'
}:
Props
)
=>
{
const
elementRef
=
useRef
<
HTMLSpanElement
>
(
null
);
const
[
displayedString
,
setDisplayedString
]
=
React
.
useState
(
hash
);
...
...
ui/showcases/Menu.tsx
View file @
1822bf68
...
...
@@ -30,7 +30,7 @@ const MenuShowcase = () => {
<
MenuRoot
>
<
MenuTrigger
asChild
>
<
IconButton
variant=
"dropdown"
size=
"sm"
loading
>
<
IconButton
variant=
"dropdown"
size=
"sm"
loading
Skeleton
>
<
IconSvg
name=
"dots"
boxSize=
"18px"
/>
</
IconButton
>
</
MenuTrigger
>
...
...
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