Skip to content

add toggleCardVisibility action

Michiya requested to merge hiddenHidden into master

Feature Merge Request

Related Issue

resolves #280 (closed)

either THIS or !230 (merged) is to be merged

Description of Feature

  • insert if condition in AssessmentList component to route "Available" cards to new component (see next point)
  • create new stateful component (within AssessmentFilterView folder), AssessmentListTabbed, with activeTab property in its own component state -- clicking hidden or unhidden makes that the activeTab.
  • AssessmentListTabbed filters assessments according to hidden property (true = 'hidden', false = 'unhidden') and renders only those assessment cards, according to activeTab
  • create toggleCardVisibility function in actions/assessmentActions to update card's hidden boolean property in Redux store -- by dispatching UPDATE_ASSESSMENT_VARIABLE action type -- and to toggle UI button text (on assessment card) between 'hide' and 'unhide'
  • change AssessmentCard component into connected component -- mapDispatchToProps connects toggleCardVisibility function

What's Next?

  • decide if this implementation is ideal, flexible, scalable
  • modify assessment card UI according to AssessmentFilterView section? (e.g., 'Current' and 'Completed' assessment cards may not need the 'hide'-'unhide' button)

Edited by dju

Merge request reports