Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
7bdb2433
Unverified
Commit
7bdb2433
authored
2 years ago
by
Eugen Rochko
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change larger reblogs/favourites numbers to be shortened in web UI (#20303)
parent
16122761
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/javascript/mastodon/components/animated_number.js
+3
-3
3 additions, 3 deletions
app/javascript/mastodon/components/animated_number.js
app/javascript/styles/mastodon/components.scss
+1
-0
1 addition, 0 deletions
app/javascript/styles/mastodon/components.scss
with
4 additions
and
3 deletions
app/javascript/mastodon/components/animated_number.js
+
3
−
3
View file @
7bdb2433
import
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
Formatted
Number
}
from
'
react-intl
'
;
import
Short
Number
from
'
mastodon/components/short_number
'
;
import
TransitionMotion
from
'
react-motion/lib/TransitionMotion
'
;
import
spring
from
'
react-motion/lib/spring
'
;
import
{
reduceMotion
}
from
'
mastodon/initial_state
'
;
...
...
@@ -51,7 +51,7 @@ export default class AnimatedNumber extends React.PureComponent {
const
{
direction
}
=
this
.
state
;
if
(
reduceMotion
)
{
return
obfuscate
?
obfuscatedCount
(
value
)
:
<
Formatted
Number
value
=
{
value
}
/>
;
return
obfuscate
?
obfuscatedCount
(
value
)
:
<
Short
Number
value
=
{
value
}
/>
;
}
const
styles
=
[{
...
...
@@ -65,7 +65,7 @@ export default class AnimatedNumber extends React.PureComponent {
{
items
=>
(
<
span
className
=
'
animated-number
'
>
{
items
.
map
(({
key
,
data
,
style
})
=>
(
<
span
key
=
{
key
}
style
=
{{
position
:
(
direction
*
style
.
y
)
>
0
?
'
absolute
'
:
'
static
'
,
transform
:
`translateY(
${
style
.
y
*
100
}
%)`
}}
>
{
obfuscate
?
obfuscatedCount
(
data
)
:
<
Formatted
Number
value
=
{
data
}
/>}</
span
>
<
span
key
=
{
key
}
style
=
{{
position
:
(
direction
*
style
.
y
)
>
0
?
'
absolute
'
:
'
static
'
,
transform
:
`translateY(
${
style
.
y
*
100
}
%)`
}}
>
{
obfuscate
?
obfuscatedCount
(
data
)
:
<
Short
Number
value
=
{
data
}
/>}</
span
>
))}
<
/span
>
)}
...
...
This diff is collapsed.
Click to expand it.
app/javascript/styles/mastodon/components.scss
+
1
−
0
View file @
7bdb2433
...
...
@@ -1303,6 +1303,7 @@
display
:
inline-block
;
font-weight
:
500
;
font-size
:
12px
;
line-height
:
17px
;
margin-left
:
6px
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment