Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Add documentation, Fixes #30 #240

Merged
merged 18 commits into from
May 18, 2017
Merged

Add documentation, Fixes #30 #240

merged 18 commits into from
May 18, 2017

Conversation

reyraa
Copy link
Contributor

@reyraa reyraa commented May 18, 2017

This PR:

  • Fixes a few minor issues in JS syntax
  • Splits some of the arguments of some of the methods in order to have a clear parameter definitions in JSDocs
  • Adds comments based on JSDocs recommendations.

@reyraa reyraa changed the title 30 add documentation Add documentation, Fixes #30 May 18, 2017
@reyraa reyraa requested a review from slaweet May 18, 2017 10:10
@slaweet slaweet added the docs label May 18, 2017
* Fetches a list of delegates based on the given search phrase
*
* @method loadDelegates
* @param {Number} offset - The strating index of for the results
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strating - typo?

@@ -1,5 +1,11 @@
import './delegateRegistration.less';

/**
* @description The directive performing as the form to register the client as delegate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'client' -> 'account'

q: search,
}).then((data) => {
this.addDelegates(data, replace);
});
this.lastSearch = search;
}

/**
* Fiils the list of delegates, sets their voted and changed status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Fiils

@@ -146,6 +211,13 @@ app.component('delegates', {
this.checkPendingVotes();
}

/**
* Fetches the lisy of delegates we've voted for (voted delegates),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: lisy

clearSearch() {
this.$scope.search = '';
}

/**
* Adds deelgates to vote delegates list
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: deelgates

app.factory('dialog', ($mdDialog, $mdToast, $mdMedia) => ({

/**
* Uses mdDialog to show a toast with error theme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Uses mdDialog' -> 'Uses $mdToast'

@@ -47,12 +65,26 @@ app.factory('Passphrase', function ($rootScope) {
return 1;
};

/**
* Resets previous setting s and creates a step with a random length between 1.5% to 3.2%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'setting s' -> 'settings'
'1.5%' -> '1.6%'

this.init = () => {
this.reset();
byte = emptyBytes();
this.progress.step = (160 + Math.floor(Math.random() * 160)) / 100;
};

/**
* - From a zero byte:
* - Removes the all the 1s and replaces all the 1s with their index
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'the all the' -> 'all the'

});
};

/**
* We're calling this in framerate. call broadcast every config.updateInterval and
* sends a numeric factor for ease of use as a multiples of updateInterval.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'as a multiples' -> 'as multiples'


/**
* Starts the first frame by calling requestAnimationFrame.
* Tis will be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Tis

@reyraa reyraa merged commit e1f9d62 into development May 18, 2017
@reyraa reyraa deleted the 30-add-documentation branch May 18, 2017 14:09
@karmacoma karmacoma removed the bug label Aug 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants