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
c55219ef
Unverified
Commit
c55219ef
authored
2 years ago
by
Eugen Rochko
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove volume number from hashtags in web UI (#19253)
parent
5cf056fd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/javascript/mastodon/components/hashtag.js
+3
-12
3 additions, 12 deletions
app/javascript/mastodon/components/hashtag.js
with
3 additions
and
12 deletions
app/javascript/mastodon/components/hashtag.js
+
3
−
12
View file @
c55219ef
// @ts-check
import
React
from
'
react
'
;
import
{
Sparklines
,
SparklinesCurve
}
from
'
react-sparklines
'
;
import
{
FormattedMessage
,
injectIntl
,
defineMessages
}
from
'
react-intl
'
;
import
{
FormattedMessage
}
from
'
react-intl
'
;
import
PropTypes
from
'
prop-types
'
;
import
ImmutablePropTypes
from
'
react-immutable-proptypes
'
;
import
Permalink
from
'
./permalink
'
;
...
...
@@ -9,10 +9,6 @@ import ShortNumber from 'mastodon/components/short_number';
import
Skeleton
from
'
mastodon/components/skeleton
'
;
import
classNames
from
'
classnames
'
;
const
messages
=
defineMessages
({
totalVolume
:
{
id
:
'
hashtag.total_volume
'
,
defaultMessage
:
'
Total volume in the last {days, plural, one {day} other {{days} days}}
'
},
});
class
SilentErrorBoundary
extends
React
.
Component
{
static
propTypes
=
{
...
...
@@ -69,7 +65,7 @@ ImmutableHashtag.propTypes = {
hashtag
:
ImmutablePropTypes
.
map
.
isRequired
,
};
const
Hashtag
=
injectIntl
(
({
name
,
href
,
to
,
people
,
uses
,
history
,
className
,
intl
})
=>
(
const
Hashtag
=
({
name
,
href
,
to
,
people
,
history
,
className
})
=>
(
<
div
className
=
{
classNames
(
'
trends__item
'
,
className
)}
>
<
div
className
=
'
trends__item__name
'
>
<
Permalink
href
=
{
href
}
to
=
{
to
}
>
...
...
@@ -79,11 +75,6 @@ const Hashtag = injectIntl(({ name, href, to, people, uses, history, className,
{
typeof
people
!==
'
undefined
'
?
<
ShortNumber
value
=
{
people
}
renderer
=
{
accountsCountRenderer
}
/> : <Skeleton width=
{100}
/
>
}
<
/div
>
<
abbr
className
=
'
trends__item__current
'
title
=
{
intl
.
formatMessage
(
messages
.
totalVolume
,
{
days
:
2
})}
>
{
typeof
uses
!==
'
undefined
'
?
<
ShortNumber
value
=
{
uses
}
/> : <Skeleton width=
{42}
height=
{36}
/
>
}
<
span
className
=
'
trends__item__current__asterisk
'
>*<
/span
>
<
/abbr
>
<
div
className
=
'
trends__item__sparkline
'
>
<
SilentErrorBoundary
>
<
Sparklines
width
=
{
50
}
height
=
{
28
}
data
=
{
history
?
history
:
Array
.
from
(
Array
(
7
)).
map
(()
=>
0
)}
>
...
...
@@ -92,7 +83,7 @@ const Hashtag = injectIntl(({ name, href, to, people, uses, history, className,
<
/SilentErrorBoundary
>
<
/div
>
<
/div
>
)
);
);
Hashtag
.
propTypes
=
{
name
:
PropTypes
.
string
,
...
...
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