Skip to content

Conversation

@Konstiman
Copy link
Contributor

@Konstiman Konstiman commented Oct 27, 2020

This PR introduces the 2nd part of the List component refactoring: the refactored search/filter/sort subcomponent.

The new code can be tested by building the application with MODERN_FRONTEND=true.

Main features:

Redux:

  • Three new actions: SEARCH, FILTER and SORT. They are handled in the list reducer.

Components:

  • The components/ directory now contains only container components and the templates/ directory contains only presentational components, as it's described here.
  • New components for the search box, filter dropdown, sort dropdown and sort buttons have been created: each of the components consists of two files: a presentional component (template) and a logical component (that connects it to the store).
  • From these components, three templates for different data integrations are created: the standard filter sort, basic filter sort (no filter dropdown) and button filter sort (no filter dropdown and sort buttons instead of a dropdown).

Known bugs:

  • One test fails - the problem is in triggering an onChange event in the searchbox input. fixed
  • Dropdowns are bold when active (e.g. after user clicks them). This is caused by the different behavior of the react-bootstrap components. Also the structure is a bit different, so the space between the dropdowns is different. Both of these issues are probably solvable by additional CSS styling.
  • Not a bug: the first letter of the dropdown options is now capitalized in the refactored version.

@chreman chreman merged commit c92d69f into master Nov 10, 2020
@Konstiman Konstiman deleted the refactoring-list-filters branch December 21, 2020 11:51
chreman added a commit to chreman/Headstart that referenced this pull request Oct 13, 2021
…toring-list-filters

Refactoring (List): filter section

Former-commit-id: c92d69f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants