feat: Migrate Portfolio & Maps screens + perbaiki bug auto-scroll keyboard
Phase 3 - Portfolio Screens (6 files):
- [id]/index.tsx: ViewWrapper → OS_Wrapper (detail dengan pull-to-refresh)
- [id]/edit.tsx: NewWrapper → OS_Wrapper (form + keyboard handling)
- [id]/edit-logo.tsx: ViewWrapper → OS_Wrapper (upload logo)
- [id]/edit-social-media.tsx: ViewWrapper → OS_Wrapper (form + keyboard handling)
- ViewListPortofolio.tsx: NewWrapper → OS_Wrapper (pagination list)
- ScreenPortofolioCreate.tsx: NewWrapper → OS_Wrapper (form + keyboard handling)
Phase 4 - Maps Screens (2 files):
- ScreenMapsCreate.tsx: NewWrapper → OS_Wrapper (form + keyboard handling)
- ScreenMapsEdit.tsx: ViewWrapper → OS_Wrapper (form + keyboard handling)
Bug Fixes:
- Perbaiki auto-scroll keyboard yang membuat input paling atas 'terlempar' keluar layar
- Gunakan UIManager.measure untuk mendapatkan posisi absolut input (pageY) secara akurat
- Logika conditional scroll:
* Jika input terlihat (di atas keyboard) → TIDAK SCROLL
* Jika input tertutup keyboard → Scroll secukupnya
- Helper cloneChildrenWithFocusHandler sekarang aktif menyuntikan onFocus handler ke semua TextInput/TextArea/PhoneInput/Select
- Hapus KeyboardAvoidingView dari AndroidWrapper static mode (tidak diperlukan lagi)
Pattern yang diterapkan:
- List screens: contentPaddingBottom=100 (default)
- Form screens: contentPaddingBottom={250} + enableKeyboardHandling
- NO PADDING_INLINE (sesuai preferensi user - mencegah box menyempit)
Dokumentasi:
- Update TASK-005 dengan status lengkap Phase 1-4 (27 files migrated)
- Tambahkan urutan phase baru: Event (Phase 5), Voting (Phase 6), Forum (Phase 7), Donation (Phase 8)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
||||
import {
|
||||
BoxButtonOnFooter,
|
||||
ButtonCustom,
|
||||
@@ -8,6 +7,7 @@ import {
|
||||
TextInputCustom,
|
||||
LandscapeFrameUploaded,
|
||||
ButtonCenteredOnly,
|
||||
OS_Wrapper,
|
||||
} from "@/components";
|
||||
import { MapSelectedPlatform } from "@/components/Map/MapSelectedPlatform";
|
||||
import DIRECTORY_ID from "@/constants/directory-id";
|
||||
@@ -142,10 +142,14 @@ export function Maps_ScreenMapsCreate() {
|
||||
);
|
||||
|
||||
/**
|
||||
* Render screen dengan NewWrapper
|
||||
* Render screen dengan OS_Wrapper
|
||||
*/
|
||||
return (
|
||||
<NewWrapper footerComponent={buttonFooter}>
|
||||
<OS_Wrapper
|
||||
enableKeyboardHandling
|
||||
contentPaddingBottom={250}
|
||||
footerComponent={buttonFooter}
|
||||
>
|
||||
<InformationBox text="Tentukan lokasi pin map dengan menekan pada map." />
|
||||
|
||||
<BaseBox>
|
||||
@@ -179,7 +183,7 @@ export function Maps_ScreenMapsCreate() {
|
||||
</ButtonCenteredOnly>
|
||||
|
||||
<Spacing height={50} />
|
||||
</NewWrapper>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
LandscapeFrameUploaded,
|
||||
Spacing,
|
||||
TextInputCustom,
|
||||
ViewWrapper,
|
||||
OS_Wrapper,
|
||||
} from "@/components";
|
||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
||||
import { MapSelectedPlatform } from "@/components/Map/MapSelectedPlatform";
|
||||
@@ -166,7 +166,11 @@ export function Maps_ScreenMapsEdit() {
|
||||
: defaultRegion;
|
||||
|
||||
return (
|
||||
<ViewWrapper footerComponent={buttonFooter}>
|
||||
<OS_Wrapper
|
||||
enableKeyboardHandling
|
||||
contentPaddingBottom={250}
|
||||
footerComponent={buttonFooter}
|
||||
>
|
||||
<InformationBox text="Tentukan lokasi pin map dengan menekan pada map." />
|
||||
|
||||
{/* <MapSelectedPlatform
|
||||
@@ -223,6 +227,6 @@ export function Maps_ScreenMapsEdit() {
|
||||
Upload
|
||||
</ButtonCenteredOnly>
|
||||
<Spacing height={50} />
|
||||
</ViewWrapper>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ButtonCenteredOnly,
|
||||
CenterCustom,
|
||||
InformationBox,
|
||||
NewWrapper,
|
||||
OS_Wrapper,
|
||||
PhoneInputCustom,
|
||||
SelectCustom,
|
||||
Spacing,
|
||||
@@ -142,7 +142,9 @@ export function ScreenPortofolioCreate() {
|
||||
};
|
||||
|
||||
return (
|
||||
<NewWrapper
|
||||
<OS_Wrapper
|
||||
enableKeyboardHandling
|
||||
contentPaddingBottom={250}
|
||||
footerComponent={
|
||||
<Portofolio_ButtonCreate
|
||||
id={id as string}
|
||||
@@ -362,6 +364,6 @@ export function ScreenPortofolioCreate() {
|
||||
}
|
||||
/>
|
||||
</StackCustom>
|
||||
</NewWrapper>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NewWrapper, TextCustom } from "@/components";
|
||||
import { OS_Wrapper, TextCustom } from "@/components";
|
||||
import CustomSkeleton from "@/components/_ShareComponent/SkeletonCustom";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { usePagination } from "@/hooks/use-pagination";
|
||||
@@ -52,7 +52,7 @@ export default function ViewListPortofolio() {
|
||||
});
|
||||
|
||||
return (
|
||||
<NewWrapper
|
||||
<OS_Wrapper
|
||||
listData={pagination.listData}
|
||||
renderItem={renderItem}
|
||||
refreshControl={
|
||||
|
||||
Reference in New Issue
Block a user