Skip to content

Commit

Permalink
✅ jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvo18103107 committed Sep 11, 2021
1 parent 53cb6c8 commit e297480
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/js/views/View.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import icons from 'url:../../img/icons.svg'; //parcel 2 style
export default class View {
_data;
/**
* Render the recieve object to the DOM
* @param {Object| object[]} data the data to be rendered(eg:recipe)
* @param {boolean} [render = true]if false create markup string insted of rendering to the DOM
* @returns {undefined | string} a markup string is returned if render = false
* @this {object} View instance
* @author Mohammad Ali Shuvo
*/

render(data, render = true) {
//object pass korar time e kono element fetch na hoile ei guard class trigger korbe
if (!data || (Array.isArray(data) && data.length === 0))
Expand Down
22 changes: 22 additions & 0 deletions src/js/views/futureUpdate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
user friendly ideas
1.Display number of pages between the pagination button
2.ability to sort search results by duration or number of ingredients
3.perform ingredient validation in view , before submitting the form
4.improve recipe ingredient input: sepearate in multiple fields and allow more than 6 ingredients
core additional feature :
1. shopping list feature: button on recipe to add ingredients to a list
2.weekly meal planning feature : assign recipe to the next 7 days and show on a weekly calender, can create a dropdown on each recipe then show it for the next 7 days
3.get nutrition data on each ingredients from spoonacular API(https://spponacular.com/food-api) and calculated total calories of recipe
*/

0 comments on commit e297480

Please sign in to comment.