This pull request introduces several changes to the filter functionality in the navigation bar, including the addition of a new tags filter, refactoring of existing code, and updates to the device filtering logic.
app/utils.ts: Enhanced the getFilteredDevices function to filter devices based on tags, in addition to the existing filters for status, exposure, and phenomenon.
Miscellaneous:
package.json: Updated the Node.js version requirement from 20 to 22.
This pull request introduces several changes to the filter functionality in the navigation bar, including the addition of a new tags filter, refactoring of existing code, and updates to the device filtering logic.
Filter Functionality Enhancements:
app/components/header/nav-bar/filter-options/filter-options.tsx
: Refactored to useNavbarContext
and added logic to close the filter options when changes are applied. Removed the display of the total number of filtered devices. [1] [2] [3]app/components/header/nav-bar/filter-options/filter-tags.tsx
: Added a new component for managing tags in the filter options, allowing users to add and remove tags.app/components/header/nav-bar/nav-bar-handler.tsx
: Updated the navigation bar handler to include the new tags filter and reorganized the filter sections. [1] [2]Device Filtering Logic:
app/models/device.server.ts
: Updated the device model to include tags in the data fetched from the server.app/utils.ts
: Enhanced thegetFilteredDevices
function to filter devices based on tags, in addition to the existing filters for status, exposure, and phenomenon.Miscellaneous:
package.json
: Updated the Node.js version requirement from 20 to 22.