Commit Graph

40 Commits

Author SHA1 Message Date
e7e843fee0 feat(ai-optimized-editor): Add AIDisplayButton and store to add feature to view last AI generated optimized code
- 添加 AIDisplayButton组件,用于切换 AI 优化代码和原始代码
- 修改 AIOptimizeButton 组件,仅在非 AI 编辑模式下显示
- 在代码工具栏中集成 AIDisplayButton
- 更新 problem-editor store,添加 AIgenerate 和 LastOptimizedCode 状态
-优化 AIEditorWrapper 组件,支持生成优化代码和回退功能
2025-06-21 19:03:53 +08:00
ac67ad26a1 feat(problem-editor): optimize ai-optimized-editor button and store
-将 AIEditorWrapper 组件集成到 ProblemEditor 中
- 添加 AIOptimizeButton 组件到代码工具栏
- 更新 problem-editor store,增加 useAIEditor 和 loading 状态
- 调整 ProblemEditor 组件,根据 useAIEditor状态切换编辑器
2025-06-21 17:30:04 +08:00
ab598459a2 feat: add code analysisi 2025-06-21 13:52:34 +08:00
b34acf37b9 feat(panel-layout): add scrollable content support with isScroll prop
- Add ScrollArea and ScrollBar components from ui/scroll-area
- Introduce optional isScroll prop (defaults to true) to control scrolling
- Maintain backward compatibility with existing usage
2025-06-21 13:26:27 +08:00
9b231cc5e5 refactor(creater): wrap Panel with PanelLayout and ScrollArea 2025-06-21 00:34:21 +08:00
f4b6b43c16 refactor: extract panel layout and simplify bot content structure 2025-06-20 23:03:23 +08:00
56618fd335 refactor: flexlayout 2025-06-20 17:37:00 +08:00
941f1a74fa feat: replace dockview with flexlayout-react 2025-06-13 14:03:17 +08:00
1c031ce24e refactor(judge-button): migrate run code button to standalone component
- Replace RunCodeButton with new JudgeButton component
- Use problem-specific stores instead of playground stores
- Implement new judge toast notification system
- Simplify authentication check logic
- Utilize new TooltipButton component
2025-05-14 17:04:03 +08:00
4ca6840bbd refactor(problems): consolidate judge status toast
- Migrate status toast from shared hooks to problems feature
- Remove deprecated show-status-toast.tsx and status.ts
- Implement self-contained JudgeToast component with built-in status mapping
2025-05-14 16:09:13 +08:00
49419654a0 feat(problemset): enhance header component with back button and className prop
- Replace problem-header.tsx with new header.tsx implementation
- Add BackButton functionality to navigate to home page
- Make className prop configurable using cn utility
- Maintain existing user avatar functionality
2025-05-13 16:47:11 +08:00
9766dea138 refactor(back-button): relocate and rename back button component
- Move from features/problems/components to shared components directory
- Rename NavigateBackButton to simpler BackButton
- Update component interface naming to BackButtonProps
- Keep all existing functionality intact
2025-05-13 16:43:01 +08:00
ad8a3e646e feat(code-panel): add code editor panel components
- Add CodePanel component as container for editor interface
- Add CodeContent component with Prisma data fetching
- Include CodeContentSkeleton for loading state
- Implement ProblemEditor integration with templates
2025-05-13 16:37:35 +08:00
aec8393d2d feat(dockview): export Dockview component and create ProblemDockview wrapper
- Export Dockview component from src/components/dockview.tsx to make it reusable
- Create new ProblemDockview component in src/features/problems/components/dockview.tsx that:
  - Integrates with next-intl for locale handling
  - Connects to problem-dockview store
  - Wraps Dockview with problem-specific configuration
  - Adds locale-based key for proper re-rendering
- Maintain existing Dockview functionality including:
  - Layout persistence
  - Panel management
  - API handling
2025-05-13 16:08:33 +08:00
f9cbc5e085 refactor(code-toolbar): standardize component exports and simplify reset logic
- Changed all toolbar action components from named exports with curly braces to default exports
- Simplified ResetButton by moving template logic to useProblemEditorActions hook
- Updated useProblemEditorActions to handle template selection internally using store data
- Renamed problem-editor-store import to problem-editor for consistency
2025-05-13 15:56:28 +08:00
eea16a8224 feat(problems): add localization support for problem descriptions and solutions
- Replace cached problem data with direct Prisma queries for localized content
- Implement locale-based content selection for both descriptions and solutions
- Refactor skeleton loading components structure
- Change all exports from named to default exports
2025-05-13 15:36:07 +08:00
ad2aca2f67 refactor(language-selector): migrate to new location and implementation
- Remove old language selector from `src/components/features/playground/workspace/editor/components`
- Add new implementation in `src/features/problems/code/components/toolbar/controls`
- Update toolbar exports to include the new selector
2025-05-13 15:18:59 +08:00
b67b13d7bf refactor(route): rename [id] to [problemId] in problems route 2025-05-07 14:59:17 +08:00
3417d2ee49 refactor(editor): consolidate editor toolbar actions into unified structure
- Moved all editor action buttons (copy, format, undo, redo, reset) from `src/components/features/playground/workspace/editor/components/` to new location `src/features/problems/code/components/toolbar/actions/`
- Introduced shared `TooltipButton` component to reduce duplication
- Created centralized `useProblemEditorActions` hook for common editor operations
- Updated imports and exports through new index file
- Maintained all existing functionality while improving code organization
2025-05-07 13:42:08 +08:00
aed942e7e2 refactor(layouts): overhaul problem and problemset page structures
- Simplify ProblemLayout to use children prop and remove ProblemStoreProvider
- Replace PlaygroundHeader with dedicated ProblemHeader component
- Streamline ProblemsetLayout with new ProblemsetHeader
- Remove deprecated BackButton in favor of NavigateBackButton
- Delete unused ProblemStoreProvider and related dependencies
2025-05-06 21:22:13 +08:00
829370fafd chore(problems): move problem-dockview to components directory 2025-05-06 19:47:02 +08:00
5f3eb72d00 refactor(problems): migrate description and solution to feature-based structure
- Remove old parallel route implementations (@Description and @Solutions)
- Add new feature-based components for problem description and solution
  - Create content and panel components for both features
  - Implement skeleton loading states
  - Use cached data fetching
- Update MDX rendering and scroll area implementations
2025-05-06 19:38:50 +08:00
f464fb7636 feat(dockview): refactor dockview component and add problem-specific implementation
- Refactor Dockview component into more modular structure:
  - Extract layout persistence logic to custom hook
  - Extract component conversion logic to custom hook
  - Make storageKey optional
  - Improve type safety with PanelParams interface
  - Add better error handling and duplicate panel detection
- Add new ProblemDockview wrapper component:
  - Integrates with problem-dockview store
  - Adds locale awareness
  - Provides standardized storage key
- Update related type definitions and imports
2025-05-06 18:45:08 +08:00
d1188f5ea6 chore(components): move features to components/features 2025-03-16 12:05:59 +08:00
c6cba8f504 feat(playground-header): replace SettingsButton with AvatarButton 2025-03-12 21:17:50 +08:00
6d61e6e783 refactor(header): remove state management and add back button 2025-03-12 12:24:53 +08:00
4b0d238d37 fix(RunCode): update component with custom classes for background and hover states 2025-03-10 23:10:56 +08:00
84ac0a88dc feat(solution): add layout and page components for problem solution, including footer 2025-03-10 20:54:31 +08:00
28c10ad590 fix(style): removing shadow 2025-03-09 18:58:48 +08:00
a7506bed64 refactor(reset-button): remove unnecessary disabled state for button 2025-03-09 15:18:08 +08:00
b9ac439178 fix(header): improve layout and adjust z-index for settings button 2025-03-09 15:14:47 +08:00
163dc4b57c feat(problem-description): add dynamic title to footer and fetch problem title 2025-03-09 14:49:59 +08:00
e082aed9a1 feat(editor): add undo stack support for reset button 2025-03-09 12:13:29 +08:00
556fde6546 feat(editor): use problem templates in ResetButton and disable when empty 2025-03-09 11:18:36 +08:00
1766c4a632 feat(editor): add templates prop to WorkspaceEditorHeader and pass to ResetButton 2025-03-09 11:07:47 +08:00
2ffb366c7c feat(workspace): add editor layout with header and editor page 2025-03-08 21:33:13 +08:00
7f94f6a15b feat(playground): add workspace editor footer with cursor position display 2025-03-08 21:27:02 +08:00
a78431fb61 fix(playground): update file path 2025-03-08 21:17:31 +08:00
c6ffc41d2f fix(playground): update file path from workspace to playground 2025-03-08 21:15:24 +08:00
e0adfa3075 refactor(workspace): move ProblemDescriptionFooter to features 2025-03-08 19:41:03 +08:00