Skip to content

Conversation

@aslan-es
Copy link
Collaborator

No description provided.

@@ -0,0 +1,24 @@
.layout {
display: grid;
grid-template-columns: 100px 1fr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

use rem instead of px

selector: 'app-aside',
imports: [],
templateUrl: './aside.html',
styleUrl: './aside.scss'
Copy link
Collaborator

Choose a reason for hiding this comment

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

اسم کامپوننت ها باید یکم دیسکریپتیور تر باشن این خوب نیست اسمش اصلا
من نمیدونم مربوط به کجاست
تازه همپوشانی هم با اسم تگ های خود html داره که بدتر میکنه اسمش رو

flex-direction: column;
margin: 1rem;
border: 1.5px solid var(--color-border);
border-radius: 1rem;
Copy link
Collaborator

Choose a reason for hiding this comment

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

از px استفاده نشه

export class Book implements OnInit {
books: books[] = [];

constructor(private http: HttpClient) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

access modifier

padding: 1.5rem;
text-align: center;
font-size: 1rem;
font-weight: 600;
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't use px


* {
margin: 0;
padding: 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

این خیلییی خطرناکه
در مورد css reset بخونیدد

templateUrl: './book.html',
styleUrl: './book.scss'
})
export class Book implements OnInit {
Copy link
Collaborator

Choose a reason for hiding this comment

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

اسم کامپوننت اصلا خوب نیست
این چیه ؟
کتاب ؟

Copy link
Collaborator

Choose a reason for hiding this comment

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

یدونه کتاب‌‌؟
لیست کتاب هاتون ‌؟
اصلا نمیفهمم از اسمش که چه کاری داره میکنه

@@ -0,0 +1,8 @@
<div class="books-info" *ngFor="let book of books">
Copy link
Collaborator

Choose a reason for hiding this comment

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

از سینتکس جدید اسفاده کنین
@for

@masih-developer
Copy link

ساختار صفحه بندی و کامپوننت ها خیلی مشخص نیست برای مثال book-detail صفحه جزئیات محصول هست
ولی نه جای مشخصی داره که مثلا داخل دایرکتوری /pages باشه نه صراحتا اشاره شده پیج هست مثل: book-detail-page

و همین مورد برای کامپوننت های layout مثل footer و header هم صدق میکنه، بهتره مثلا داخل /components یا /ui باشن

و مثلا برای book.model.ts و کلا مدل های کل اپ بهتره داخل دایرکتوری /models باشه و مستقیما توی root پروژه نباشه

const input = event.target as HTMLInputElement;
if (input.files && input.files.length > 0) {
this.selectedFile = input.files[0];
console.log('File selected:', this.selectedFile);
Copy link

@masih-developer masih-developer Aug 3, 2025

Choose a reason for hiding this comment

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

بودن لاگ توی پروژه بعد از تست و توسعه روی پروداکشن اشتباهه

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

اینا رو واسه تست گذاشتم بودم که ببینم مشکل از کجاست و متاسفانه یادم رفت پاک کنم.ممنون که گفتی🙏🙏

@amirbarari
Copy link

خیلی از جاها از px unit استفاده کردید. بهتره از rem استفاده کنید.

<span class="price"> ${{ book.price }}</span>
</div>

<button class="details-button" (click)="onViewDetails(book.id)">

Choose a reason for hiding this comment

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

اگه به جای دکمه یه همچین لینکی میزاشتی بهتر بود، و دیگه نیاز به بایند کردن متد و هندل کردنش با navigate توی کلاس نبود:

    <a class="details-button" [routerLink]="['/books', book.id]">
      View Details
    </a>

@aslan-es
Copy link
Collaborator Author

aslan-es commented Aug 3, 2025

ساختار صفحه بندی و کامپوننت ها خیلی مشخص نیست برای مثال book-detail صفحه جزئیات محصول هست ولی نه جای مشخصی داره که مثلا داخل دایرکتوری /pages باشه نه صراحتا اشاره شده پیج هست مثل: book-detail-page

و همین مورد برای کامپوننت های layout مثل footer و header هم صدق میکنه، بهتره مثلا داخل /components یا /ui باشن

و مثلا برای book.model.ts و کلا مدل های کل اپ بهتره داخل دایرکتوری /models باشه و مستقیما توی root پروژه نباشه

ممنون میشم در این مورد یکم بیشتر راهنمایی کنید.مثلا ساختار به این صورت زیر باشه چطور؟

src/
└── app/
├── core/
│ ├── models/
│ │ └── book.model.ts
│ └── services/
│ └── book.service.ts

│─── UI/
│ ├── layout/
│ │ ├── header/
│ │ └── footer/
│ └── book-form/

├── pages/
│ ├── book-list-page/
│ │ ├── book-list-page.component.ts
│ │ ├── book-list-page.component.html
│ │ └── book-list-page.component.scss
│ ├── book-detail-page/
│ ├── add-book-page/
│ └── edit-book-page/

├── app.component.ts
├── app.routes.ts
└── route-animations.ts

@aslan-es
Copy link
Collaborator Author

aslan-es commented Aug 3, 2025

خیلی از جاها از px unit استفاده کردید. بهتره از rem استفاده کنید.

سعی شده توی موارد زیر از px استفاده بشه:
border
border-radius
box-shadow
outline
text-shadow
اگه جایی غیر از اینا استفاده شده اصلاح میشه.ممنون🙏🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants