Skip to content

Commit

Permalink
removed extra dependency and used reactstrap progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh3341 committed Mar 24, 2023
1 parent 60cde49 commit b423bbb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 912 deletions.
1 change: 0 additions & 1 deletion plugins/plugin-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"@sentry/browser": "7.7.0",
"@sentry/node": "7.7.0",
"algoliasearch": "4.15.0",
"antd": "^5.3.2",
"chart.js": "3.8.0",
"cheerio": "1.0.0-rc.12",
"classnames": "2.3.2",
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin-site/src/components/Plugin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Developers.propTypes = PluginDevelopers.propTypes;
function Plugin({plugin: {name, title, stats, labels, excerpt, developers, buildDate, releaseTimestamp}}) {
let progress = 0;
let color =
progress > 80 ? '#87d068' : progress > 60 ? '#e5e512' : '#fe3535';
progress > 80 ? 'success' : progress > 60 ? 'warning' : 'danger';

const graphqlData = useStaticQuery(graphql`
query {
Expand All @@ -49,7 +49,7 @@ function Plugin({plugin: {name, title, stats, labels, excerpt, developers, build
if (health) {
progress = health.node.value;
color =
progress > 80 ? '#87d068' : progress > 60 ? '#e5e512' : '#fe3535';
progress > 80 ? 'success' : progress > 60 ? 'warning' : 'danger';
}

return (
Expand Down
12 changes: 9 additions & 3 deletions plugins/plugin-site/src/components/PluginHealthScore.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import React from 'react';
import PropTypes from 'prop-types';
import {Progress} from 'antd';
import {Progress} from 'reactstrap';

function PluginHealthScore({healthScore, color}) {
return (
<>
<h6>Health Score</h6>
<Progress percent={healthScore} strokeColor={color} />
<div>
Health Score
<spam>
{healthScore}
/100
</spam>
</div>
<Progress value={healthScore} color={color} style={{height: '10px'}} striped/>
</>
);
}
Expand Down
11 changes: 8 additions & 3 deletions plugins/plugin-site/src/components/SearchResults.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,17 @@
}

.Plugin--HealthScoreContainer{
bottom: -0.75rem;
bottom: 0rem;
position: absolute;
width: 100%;
& h6{
margin-bottom: 0px;
& div{
display: flex;
justify-content: space-between;
font-size: 1rem;
font-weight: bold;
row-gap: 0.5rem;
}

}
.SearchResults--List {
& .SearchResults--ItemBox {
Expand Down
Loading

0 comments on commit b423bbb

Please sign in to comment.