Why does TextInput disabled outline return transparent in Dark theme (getOutlinedOutlineInputColor) ?
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Bắt đầu bằng cách đọc getOutlinedOutlineInputColor trong Helper.tsx bên trong thư mục TextInput, sau đó so sánh các nhánh bị vô hiệu hóa của theme tối và theme sáng với hành vi được mong đợi đã báo cáo. Được xem là hoàn tất khi dự án có hành vi đã được quyết định và ghi lại tài liệu cho outline của theme tối, cùng một cách được chấp nhận để xác minh hoặc ghi đè hành vi đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Ask your Question
While using TextInput (mode="outlined") in React Native Paper with a custom dark theme, I noticed that disabled inputs don’t render an outline border.
After checking the source code, the reason seems to come from getOutlinedOutlineInputColor in Helper.tsx inside the TextInput directory :
const getOutlinedOutlineInputColor = ({
theme,
disabled,
customOutlineColor,
}: BaseProps & { customOutlineColor?: string }) => {
const isTransparent = color(customOutlineColor).alpha() === 0;
if (!disabled && customOutlineColor) {
return customOutlineColor;
}
if (theme.isV3) {
if (disabled) {
if (theme.dark) {
return 'transparent';
}
return theme.colors.surfaceDisabled;
}
return theme.colors.outline;
}
if (disabled) {
if (isTransparent) {
return customOutlineColor;
}
return theme.colors.disabled;
}
return theme.colors.placeholder;
};
My Expectation
In dark mode, I would expect the disabled border to use something like theme.colors.surfaceDisabled (similar to light mode), instead of transparent.
This way, the outline remains visible and consistent with Material guidelines.
Question
Is the transparent return for dark mode intentional?
If yes, what’s the recommended way to override it so that disabled inputs still have a visible outline in dark theme?
Would you accept a PR that aligns the behavior with light mode (surfaceDisabled)?
Environment
react-native-paper: 5.14.5
react-native: 0.79.5
Platform: Android & iOS
- Ngôn ngữ chính
- TypeScript
- Star
- 14.5k
- Fork
- 2.3k
- Merge trung bình
- 8 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/react-native-paper
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstack/react-native-paper#5146 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Menu ignores the keyboard when it mounts while the keyboard is already openCó thể đã có người làm @manchoudhary đã nhận 49 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
callstack/react-native-paper#5096 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Tooltip: onPress event object is not propagated to parent component on nativeCó thể đã có người làm @aliyilmaztech đã nhận 82 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
callstack/react-native-paper#5003 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Snackbar stays mounted after `visible=false` under new architecture (iOS + Android)Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstack/react-native-paper#4951 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
callstack/react-native-paper#4881 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của callstack/react-native-paper
Issue tương tự
-
mobile-app
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Open-Locker/Open-Locker#352 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
leanprover-community/lean4game#589 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Add: CS Action BGĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
unocss/unocss#5421 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày