Update on KnackSteem Development
Repository
https://github.com/knacksteem/knacksteem.org
Pull Request
https://github.com/knacksteem/knacksteem.org/pull/63
This PR add a new tagging feature for the knacksteem editor, which uses tag validation on the first tag to be apart of the knacksteem category. Also with this PR the following issues were fixed.
https://github.com/knacksteem/knacksteem.org/issues/55
https://github.com/knacksteem/knacksteem.org/issues/59
https://github.com/knacksteem/knacksteem.org/issues/57
A simple validation for the tags below
/**
* @method checkTags -- method to validate tags for any error
*
* @param {Array} rule -- all rules to validate
*
* @param {Array} value -- all values from tag selection
*
* @param {Function} callback -- callback funtion
*/
checkTags = (rule, value, callback) => {
if (!value || value.length < 1 || value.length > 4) {
callback('You have to add 1 to 4 tags');
};
if (value){
const {isComment} = this.props;
const {categories} = this.props.articles;
if (!isComment && categories.map(elem => elem.key).indexOf(value[0]) === -1) {
callback('first tag must be any of the following; graphics, art, vlog, knack, techtrends ');
}
}
value
.map(tag => ({ tag, valid: /^[a-z0-9]+(-[a-z0-9]+)*$/.test(tag) }))
.filter(tag => !tag.valid)
.map(tag => callback(`Tag ${tag.tag} is invalid`));
callback();
};
If there are no values, or the values in the array are less than for, we initiate a callback. that informs the user.Next we also check if the tag is a valid tag with the regex matching.
What's next?
Integration of Voting Slider and fixing some bugs on the repo.
Commits
Github Account
Leave Update on KnackSteem Development to:
Read more #utopian-io posts
Best Posts From SirFreeman
We have not curated any of sirfreeman's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From SirFreeman
- Fashlogue Frontend development: Building a reuseable Modal component using React Portals.
- Fashlogue API update: Development of post feature for the Api
- error due to phishing link on post
- error
- Fashlogue-api development update
- Fashlogue development update: Landing page development with React.
- Knacksteem.org: development Update ( Fixed Bugs and Factors)
- Fashlogue Api Development: Building an API for designers and user Ecosystem (Catalog System on and Off the Steem Blockchain).
- Update on KnackSteem Development
- Update on KnackSteem Development
- KnackSteem update Overall Layout of Home, Editor, Preview and view for a particular post
- Update--- KnackSteem Editor and Refactor of the sidebar component across the Application
- Knacksteem.org - Update - responsive layout on Home and User profile page.
- Knacksteem.org - Header, Footer and Editor (Responsive Layout).
- Adonis Hexa - Development Update- Cli tool for installation and Generation of project.
- Building a cli tool for cryptocurrency coin checking with Nodejs
- Error
- error
- Building A food Order system Part 12
- Building A food Order system Part 11