Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactor settings page to use new sidebar and fix old bugs #4545

Merged
merged 9 commits into from
Nov 13, 2024

Conversation

lucaseduoli
Copy link
Collaborator

This pull request includes various changes to the frontend components, primarily focused on refactoring the sidebar components, improving layout styles, and updating the sidebar context. The most important changes are grouped into three themes: Sidebar Component Refactoring, Page Layout Updates, and Sidebar Context Enhancements.

Sidebar Component Refactoring:

  • Removed SideBarButtonsComponent from src/frontend/src/components/sidebarComponent/components/sideBarButtons/index.tsx and integrated its functionality into src/frontend/src/components/sidebarComponent/index.tsx. [1] [2]
  • Updated FolderSidebarNav and SettingsPage to use the new SideBarButtonsComponent structure. [1] [2]

Page Layout Updates:

  • Adjusted padding and overflow styles in PageLayout to improve layout consistency across different screen sizes. [1] [2]
  • Modified the GeneralPage component to handle overflow-x for better layout management.

Sidebar Context Enhancements:

  • Added defaultOpen property to the SidebarContext and updated related logic in sidebar.tsx to handle the sidebar's default state based on the collapsible property. [1] [2] [3]
  • Wrapped OldHomePage and SettingsPage components with SidebarProvider to manage sidebar state and behavior more effectively. [1] [2] [3]

@lucaseduoli lucaseduoli self-assigned this Nov 12, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. javascript Pull requests that update Javascript code labels Nov 12, 2024
Copy link
Collaborator

@Cristhianzl Cristhianzl left a comment

Choose a reason for hiding this comment

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

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 12, 2024
@github-actions github-actions bot added the bug Something isn't working label Nov 12, 2024
@Cristhianzl Cristhianzl enabled auto-merge (squash) November 12, 2024 19:47
Copy link

codspeed-hq bot commented Nov 13, 2024

CodSpeed Performance Report

Merging #4545 will degrade performances by 21.01%

Comparing fix/settings_page (5f77c89) with main (da833a5)

Summary

⚡ 2 improvements
❌ 2 regressions
✅ 11 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main fix/settings_page Change
test_invalid_run_with_input_type_chat 13.7 ms 17.4 ms -21.01%
test_successful_run_with_input_type_any 422.2 ms 532.4 ms -20.7%
test_successful_run_with_input_type_text 554.3 ms 456 ms +21.57%
test_successful_run_with_output_type_debug 455.5 ms 411.5 ms +10.7%

@ogabrielluiz ogabrielluiz merged commit e68c21a into main Nov 13, 2024
30 checks passed
@ogabrielluiz ogabrielluiz deleted the fix/settings_page branch November 13, 2024 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants