Skip to content

Conversation

@IanMayo
Copy link
Member

@IanMayo IanMayo commented Apr 3, 2025

Fixes #326

Copilot AI review requested due to automatic review settings April 3, 2025 13:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR replaces the graph button with a time filter toggle in the layers toolbar to support time-based filtering in the UI.

  • Introduces a new boolean state for time filtering in the Layers component.
  • Replaces the graph button in LayersToolbar with a toggle button that switches between two filter icons.
  • Removes the redundant color attribute from the ControlPanel's Button.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/components/Layers/index.tsx Adds time filter state and passes it as props to child components.
src/components/Layers/LayersToolbar.tsx Implements a toggle button for time filtering, replacing the graph button.
src/components/ControlPanel/index.tsx Removes the color attribute from the Button for design consistency.
Comments suppressed due to low confidence (2)

src/components/Layers/index.tsx:49

  • [nitpick] Consider renaming 'useTimeFilter' to 'isTimeFilterEnabled' for clearer semantic meaning.
const [useTimeFilter, setUseTimeFilter] = useState(false)

src/components/Layers/LayersToolbar.tsx:81

  • [nitpick] Consider renaming 'onFilterForTime' to 'toggleTimeFilter' to better reflect its purpose.
<Button size={'middle'} onClick={() => onFilterForTime(!hasTimeFilter)}>

@netlify
Copy link

netlify bot commented Apr 3, 2025

Deploy Preview for reactol ready!

Name Link
🔨 Latest commit 08b3032
🔍 Latest deploy log https://app.netlify.com/sites/reactol/deploys/67f00859e4fa50000839bc22
😎 Deploy Preview https://deploy-preview-327--reactol.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@IanMayo IanMayo changed the title 326 Replace graph button with time filter toggle in layers toolbar 326 Allow layers to be filtered for visible featuers Apr 4, 2025
@IanMayo IanMayo changed the title 326 Allow layers to be filtered for visible featuers 326 Allow layers to be filtered for visible features Apr 4, 2025
@IanMayo IanMayo merged commit 18f3398 into main Apr 4, 2025
8 checks passed
@IanMayo IanMayo deleted the 326-layers-visible-toggle branch April 4, 2025 16:36
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.

Add "visible" toggle to Layers component

2 participants