Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Dark Themes does not work with React Admin Enterprise

Đang mở
#596 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu trong AdminGuesser.tsx và tái tạo ví dụ với React Admin Enterprise, HydraAdmin cùng các prop lightTheme và darkTheme tùy chỉnh. Truy vết nơi giá trị darkTheme bị ghi đè bởi theme mặc định của API Platform; hoàn tất khi các tham số theme được cung cấp vẫn có hiệu lực trong ứng dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

API Platform version(s) affected: @api-platform/admin 3.4.9

Description

It is not possible to configure the light and dark themes when using React Admin Enterprise, the Dark Theme parameters are lost in the process and we only get a broken standard dark theme on most parts of the application.

How to reproduce

import {HydraAdmin} from "@api-platform/admin"
import {houseDarkTheme, houseLightTheme} from "react-admin"
import {Admin} from "@react-admin/ra-enterprise"
import {SolarLayout} from "@react-admin/ra-navigation";

const GyroscopsLoader = ({ entrypoint, ...rest }: DashboardLoaderProps) => {
  return (
    <HydraAdmin
      admin={Admin}
      dataProvider={dataProvider}
      entrypoint={entrypoint}
      layout={SolarLayout}
      lightTheme={houseLightTheme}
      darkTheme={houseDarkTheme}
      defaultTheme="light"
      {{...rest}}
    >
   // Resources here
   </HydraAdmin>
  )
}

Possible Solution

In the AdminGuesser.tsx file, the AdminGuesser component does override anything we could set inside the darkTheme prop with the default APIP dark theme. It may be fixed by fixing this forced override.

Additional Context
#403

Ngôn ngữ chính
TypeScript
Star
516
Fork
134
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của api-platform/admin

Tất cả issue của api-platform/admin

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.