Skip to content

Commit

Permalink
Merge pull request #383 from Codeminer42/fix/projects-load-time
Browse files Browse the repository at this point in the history
Fix the load speed of projects after choosing a team
  • Loading branch information
andrerpbts authored Sep 26, 2018
2 parents 365e970 + 2936aba commit cd5a18e
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 41 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Removed
- Remove Velocity / Volatility from ProjectCard to optimize performance

## [1.20.0] 2018-09-14
### Added
Expand Down
10 changes: 0 additions & 10 deletions app/assets/javascripts/components/projects/ProjectCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@ export default class ProjectCard extends React.Component {
if (joined) {
return(
<div className="panel-body">
<div className="col-md-6 col-xs-6 counter">
<span className="counter-description">{ I18n.t('velocity') }</span>
<span className="counter-value">{ project.get('velocity') }</span>
</div>

<div className="col-md-6 col-xs-6 counter">
<span className="counter-description">{ I18n.t('volatility') }</span>
<span className="counter-value">{ project.get('volatility') }</span>
</div>

<div className="col-md-12 members">
<ul className="member-list">
{ this.renderUsersAvatar() }
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/_members.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.members {
display: table;
margin: 0 auto;
margin-top: 15px;
text-align: center;

.member-list {
Expand Down
2 changes: 0 additions & 2 deletions app/serializers/project_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class ProjectSerializer

def initialize(attrs = {})
self.name = attrs.truncate_name
self.velocity = attrs.velocity
self.volatility = attrs.volatility
self.slug = attrs.slug
self.path_to = attrs.path_to
self.archived_at = attrs.archived_date
Expand Down
20 changes: 0 additions & 20 deletions spec/javascripts/components/projects/project_card_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,6 @@ describe('<ProjectCard />', () => {

describe('#panelBody', () => {
describe('not archived', () => {
it('should contain velocity information', () => {
const wrapper = shallow(<ProjectCard {...defaultProps} />);
expect(wrapper.contains(
<div className="col-md-6 col-xs-6 counter">
<span className="counter-description">{ I18n.t('velocity') }</span>
<span className="counter-value">10</span>
</div>
)).toBe(true);
});

it('should contain volatility information', () => {
const wrapper = shallow(<ProjectCard {...defaultProps} />);
expect(wrapper.contains(
<div className="col-md-6 col-xs-6 counter">
<span className="counter-description">{ I18n.t('volatility') }</span>
<span className="counter-value">0%</span>
</div>
)).toBe(true);
});

it('should contain users avatar', () => {
const wrapper = shallow(<ProjectCard {...defaultProps} />);
expect(wrapper.contains(
Expand Down
8 changes: 0 additions & 8 deletions spec/serializers/project_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
expect(project.truncate_name).to eq(serialized_project.name)
end

it 'should have a velocity that matches' do
expect(project.velocity).to eq(serialized_project.velocity)
end

it 'should have a volatility that matches' do
expect(project.volatility).to eq(serialized_project.volatility)
end

it 'should have a slug that matches' do
expect(project.slug).to eq(serialized_project.slug)
end
Expand Down

0 comments on commit cd5a18e

Please sign in to comment.