-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor/configurations #15
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
Conversation
- Add @madrasah/eslint-config with base, next, and react-internal configs - Add @madrasah/typescript-config with base, nextjs, and react-library configs - Centralize configuration management across monorepo
- Add resolutions and overrides to ensure consistent React 19.0.0 across monorepo - Update root tsconfig to reference new base configuration - Ensure all packages use same React version for compatibility
- Update @madrasah/hooks, @madrasah/types, @madrasah/utils packages - Use new @madrasah/typescript-config and @madrasah/eslint-config - Standardize package.json and tsconfig.json across shared packages
- Restructure @madrasah/ui to use new component structure (moved from ui/ to components/) - Add comprehensive README documentation for UI library - Add new components: Badge, Checkbox, Input, Select - Update Alert and Button components with improved variants - Add PostCSS and Tailwind configurations - Add ESLint configuration for UI package - Add TypeScript declarations and build outputs - Update design tokens CSS structure
- Update package.json to use shared @madrasah configurations - Update Tailwind, PostCSS, and Next.js configurations - Update TypeScript configuration to use shared base - Update global styles to use design tokens - Update layout and pages to use new UI components - Add test page for UI component development - Update Keycloak logout component - Update API auth route configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hocam öncelikle emeğine sağlık. Çok ufak bir önerim olacak. shared/ui/src/components klasörünün altındaki componentleri ayrı klasörler içerisine toplasak daha uygun olabilir. Örneğin shared/ui/src/components/button/.... ya da shared/ui/src/components/select.
Öneri için teşekkürler hocam. Klasör olarak tutmanın avantajları nedir? Düşünelim. Ben burada shadcn'nin kendi pratiğini takip ettim. Çoğunlukla UI componentlerini İkinci olarak core componentlerin çoğu stateless olarak çalışıyor, çoğunlukla radix-ui componentlerini extend ediyor. Component-specific hooks veya utils fonksiyonları muhtemelen bulunmayacak, yani karmaşık bi structure olmaz diye düşünüyorum. Component dizini tarafında da aynı sadeliği koruyabiliriz. |
İlerleyen zamanlarda shared ui components yapılarının artmayacağını ön görebiliyorsak pek sorun olmayacaktır. Fakat ilerleyen zamanlarda datagrid, autocomplete input, modals, switch, datepicker vb. componenler de bu geliştirmelere dahil olduğunda klasörde geliştirme yapmayı biraz zorlaştırabilir. Ek olarak her component için ayrı test dosyaları ya da storybook tanımladığımızda dikeyde klasörün boyutu bir hayli fazla olacaktır. Flat File Structure ile de devam edebiliriz ilerleyen zamanlarda karmaşıklık arttığı durumda ihtiyaca göre Modular Folder Structure ile değiştirebiliriz 👍 |
This pull request introduces significant updates to the
tedris
app and shared workspace configurations, focusing on improving modularity, aligning dependencies, and enhancing ESLint and TypeScript configurations. The changes include migrating to shared configurations, updating imports, and introducing new shared ESLint and TypeScript configurations.Updates to
tedris
app:Dependency and import updates:
apps/tedris/app/api/auth/[...nextauth]/route.ts
to useauthOptions
fromweb/lib/auth_options
instead ofapps/tedris/lib/auth_options
. (apps/tedris/app/api/auth/[...nextauth]/route.tsL1-R1)@madrasah/ui
imports with more specific paths (e.g.,@madrasah/ui/components/button
) in multiple files for better modularity. [1] [2] [3]apps/tedris/app/layout.tsx
to use a shared global stylesheet from@madrasah/ui/globals.css
.Configuration updates:
@madrasah/ui
. [1] [2] [3]tsconfig.json
to include more comprehensive TypeScript options, such asmoduleResolution: bundler
and additional libraries.New components:
Test
page inapps/tedris/app/test/page.tsx
showcasing usage ofButton
andAlert
components from@madrasah/ui
.Shared workspace enhancements:
ESLint configuration:
@madrasah/eslint-config
) with base, Next.js, and React-specific configurations. These configurations include plugins likeeslint-plugin-react
,eslint-plugin-react-hooks
, andeslint-plugin-turbo
. [1] [2] [3] [4] [5]TypeScript configuration:
shared/hooks/tsconfig.json
to extend from the new shared TypeScript configuration (@madrasah/typescript-config/base.json
) for consistency across the workspace.Package updates:
@radix-ui/react-slot
,class-variance-authority
,lucide-react
) toapps/tedris/package.json
and introduced resolutions for React 19.0.0 to ensure compatibility. [1] [2]shared/hooks/package.json
to fix themodule
field, aligning it with the main entry point.