Commit Graph

26 Commits

Author SHA1 Message Date
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