Open umonkey opened 5 months ago
[!IMPORTANT]
Review Skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The changes introduce a SpeciesSearchBar
component with associated storybook configurations, styling, and hooks for managing search functionality. Additionally, a HomeSideBar
component is created, incorporating the SpeciesSearchBar
and utilizing custom hooks for search handling. Updates also include modifications to the TreeSidePane
component, new input styling properties in the global stylesheet, and enhancements to the SAMPLE_TREE
object in the sample data.
File(s) | Change Summary |
---|---|
frontend/src/components/elements/SpeciesSearchBar/SpeciesSearchBar.stories.tsx |
Introduces storybook configurations for the SpeciesSearchBar component. |
frontend/src/components/elements/SpeciesSearchBar/SpeciesSearchBar.tsx |
Adds a simple text input component for searching trees with handlers for input changes, key presses, and search button clicks. |
frontend/src/components/elements/SpeciesSearchBar/hooks.ts |
Introduces the useSpeciesSearchBar hook for managing search functionality. |
frontend/src/components/elements/SpeciesSearchBar/index.ts |
Exports the SpeciesSearchBar component. |
frontend/src/components/elements/SpeciesSearchBar/styles.scss |
Adds styling rules for the SpeciesSearchBar component. |
frontend/src/components/elements/SpeciesSearchBar/types.ts |
Defines the IProps interface for the SpeciesSearchBar component. |
frontend/src/components/index.ts |
Exports SpeciesSearchBar from the elements directory. |
frontend/src/components/sidebar/HomeSideBar/HomeSideBar.stories.tsx |
Introduces a story for the HomeSideBar component. |
frontend/src/components/sidebar/HomeSideBar/HomeSideBar.tsx |
Adds the HomeSideBar component that includes the SpeciesSearchBar and uses custom hooks for search functionality. |
frontend/src/components/sidebar/HomeSideBar/hooks.ts |
Introduces the useHomeSideBar hook for managing search functionality and navigation. |
frontend/src/components/sidebar/TreeSidePane/TreeSidePane.stories.tsx |
Updates the storybook title for TreeSidePane from 'Dialogs/TreeSidePane' to 'Sidebar/TreeSidePane'. |
frontend/src/components/sidebar/TreeSidePane/hooks.ts |
Adds a call to setStatus with formatStatusLine in the useTreeSidePane function. |
frontend/src/index.css |
Introduces new custom properties for input styling. |
frontend/src/sample-data.ts |
Updates the SAMPLE_TREE object with additional properties: state , created_at , updated_at , and thumbnail_id . |
sequenceDiagram
participant User
participant SpeciesSearchBar
participant HomeSideBar
participant useHomeSideBar
participant useSpeciesSearchBar
User->>SpeciesSearchBar: Input search query
SpeciesSearchBar->>useSpeciesSearchBar: Handle input change
SpeciesSearchBar->>useSpeciesSearchBar: Handle key press
SpeciesSearchBar->>useSpeciesSearchBar: Handle search button click
useSpeciesSearchBar->>HomeSideBar: Trigger search action
HomeSideBar->>useHomeSideBar: Update search query
useHomeSideBar->>navigate: Navigate to search results
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
The new sidebar should provide better search function for desktop and mobile users.
Summary by CodeRabbit
New Features
SpeciesSearchBar
component for tree searches.HomeSideBar
component with integratedSpeciesSearchBar
.Enhancements
TreeSidePane
component with improved status line formatting.Bug Fixes
TreeSidePane
in Storybook for better organization.Documentation
SpeciesSearchBar
andHomeSideBar
components.Data Updates
SAMPLE_TREE
object with new properties for better data representation.