diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 3bffcb3..0000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: 'bug: ' -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Device Information (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Discord Version [e.g. 222111] - - Bunny Version [e.g e19e89c-main] - -**Checklists** -- [ ] I understand that this is a bug report and not a place to request new features or plugins -- [ ] I understand that this is no place to report bugs produced by a plugin -- [ ] I can reproduce this bug in Bunny's safe mode AND unable to reproduce it in vanilla/unmodded Discord diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..cb92112 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,191 @@ +name: Bug report +description: Create a bug report to help us improve +title: "[bug]: " +labels: [bug] +body: + - type: markdown + attributes: + value: | + > [!IMPORTANT] + > ## Before you submit this issue... + > We might reject any issues that can't be solved within the repository, or reports that are too general. For example: + > + >
+ > "Bunny crashes upon starting..." + > > There are lots of different things that could be causing this, but it's probably not related to this repository. + >
+ >
+ > "Bunny freezes on splash screen..." + > > The issue is too general and should be reported only when it occurs after an update to a specific Discord version or after a specific action or configuration has been made within Bunny. + >
+ >
+ > "Bunny refuses to install/stuck on downloading..." + > > This is an external issue (sideloading) that does not have a place in this repository. If it's a problem with Bunny Manager, report it to the appropriate repository. + >
+ > + > If you think that your problem belongs to one of these, you should avoid submitting this report unless you are told to do so. + > + > Please report the problem or ask for help in the appropriate place. For example, if the problem occurs in BunnyManager, report it in the BunnyManager repository. If an error occurs when trying to sideload the prepatched IPA, reach out support for the sideloader you're using. + + - type: checkboxes + id: checklist + attributes: + label: Checklist + description: You should ensure the completion of the task before proceeding to check it off the checklist. Neglecting to do so may impede the efficiency of the issue resolution process. The developer has the right to delete the issue directly if you check the list blindly. + options: + - label: I am able to reproduce the bug with the latest version of Bunny and Discord. + required: true + - label: I've checked that there is no open or closed issue about this bug. + required: true + - label: The title of this issue accurately describes the bug. + required: true + - label: This is not a feature request or a general question. + required: true + - label: This bug can be reproduced consistently and is not caused by a plugin. + required: true + - label: I have read the notes above and ensured that my issue is clear and within this repository. + required: true + + - type: textarea + id: reproduce-steps + attributes: + label: Steps to reproduce the bug + description: What did you do for the bug to show up? + placeholder: | + Example: + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + placeholder: | + Example: + "This should happen..." + validations: + required: true + + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + placeholder: | + Example: + "This happened instead..." + validations: + required: true + + - type: textarea + id: sreen-media + attributes: + label: Screenshots/Screen recordings + description: | + A picture or video helps us understand the bug more. + + You can upload them directly in the text box. + + - type: textarea + id: logs + attributes: + label: Logs + description: | + Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + + - type: dropdown + id: platform + attributes: + label: What platform did you produce this issue on? + options: + - Android + - iOS + validations: + required: true + + - type: input + id: discord-version + attributes: + label: Discord version + description: | + The version of Discord you are using. You can find this in the settings. You may leave both the version number and the build number. + placeholder: | + Example: + "253.2 (66074)" + validations: + required: true + + - type: input + id: version + attributes: + label: Version + description: | + The version of Bunny the issue is occuring on. You can find this in the settings. Bunny version is in formatted like the following: `beaf689-main` and NOT like this: `0.2.3`. + placeholder: | + Example: + "beaf689-main" + + - type: input + id: loader-version + attributes: + label: Loader version + description: | + The version of the loader you are using. You can find this in the settings. + placeholder: | + Example: + "BunnyTweak (0.3.2)" + validations: + required: true + + - type: input + id: device + attributes: + label: Device + description: | + The device model you are using. + placeholder: | + Example: + "iPhone 13 Pro Max" + validations: + required: true + + - type: input + id: os-version + attributes: + label: OS version + description: | + The version of the operating system you are using. + placeholder: | + Example: + "iOS 15.0.1" + validations: + required: true + + - type: textarea + id: debug-info + attributes: + label: Debug information + description: | + Debug information is important for the developer to understand the environment in which the bug occurred. You can get this information by sending `/debug` in the chat. + placeholder: | + Example: + Bunny: beaf689-main (BunnyXposed 0.2.4) + Discord: 255.2 (255202) + React: 18.3.1 (RN 0.74.5-discord-11) + Hermes: for RN 0.74.5-discord-11 (bcv96) + System: Android 13 (SDK 33) + Device: M2101K7BG (secret) + + - type: textarea + id: additional-information + attributes: + label: Additional information + placeholder: | + Example: + "I have tried to do this..." + "This only happens in this situation..." + "This could be related to..." \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..80d4b33 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,41 @@ +name: Feature request +description: Suggest an idea for Bunny +title: "[feature]: " +labels: [enhancement] +body: + - type: checkboxes + id: checklist + attributes: + label: Checklist + description: You should ensure the completion of the task before proceeding to check it off the checklist. Neglecting to do so may impede the efficiency of the issue resolution process. The developer has the right to delete the issue directly if you check the list blindly. + options: + - label: I've checked that there is no other issue about this feature request. + required: true + - label: This issue contains only one feature request. + required: true + - label: The title of this issue accurately describes the feature request. + required: true + + - type: textarea + id: feature-description + attributes: + label: Feature description + description: What feature you want Bunny to have? Provide detailed description about what it should look like or where it should be added. + validations: + required: true + + - type: textarea + id: why-is-the-feature-requested + attributes: + label: Why do you want this feature? + description: Describe the problem or limitation that motivates you to want this feature to be added. + validations: + required: true + + - type: textarea + id: additional-information + attributes: + label: Additional information + description: Add any other context or screenshots about the feature request here. + placeholder: | + Additional details and attachments. \ No newline at end of file diff --git a/src/core/ui/components/AddonPage.tsx b/src/core/ui/components/AddonPage.tsx index 84956ec..6d66b32 100644 --- a/src/core/ui/components/AddonPage.tsx +++ b/src/core/ui/components/AddonPage.tsx @@ -7,7 +7,7 @@ import isValidHttpUrl from "@lib/utils/isValidHttpUrl"; import { lazyDestructure } from "@lib/utils/lazy"; import { findByProps } from "@metro"; import { clipboard, NavigationNative } from "@metro/common"; -import { AlertActionButton, AlertModal, Button, FlashList, FloatingActionButton, HelpMessage, IconButton, Stack, Text, TextInput } from "@metro/common/components"; +import { AlertActionButton, AlertModal, Button, FlashList, FloatingActionButton, HelpMessage, IconButton, Stack, Text, TextInput, useSafeAreaInsets } from "@metro/common/components"; import { ErrorBoundary, Search } from "@ui/components"; import { isNotNil } from "es-toolkit"; import fuzzysort from "fuzzysort"; @@ -112,6 +112,7 @@ function InputAlert(props: { label: string, fetchFn: (url: string) => Promise({ CardComponent, ...props }: AddonPageProps) { const [search, setSearch] = React.useState(""); const [sortFn, setSortFn] = React.useState<((a: T, b: T) => number) | null>(() => null); + const { bottom: bottomInset } = useSafeAreaInsets(); const navigation = NavigationNative.useNavigation(); useEffect(() => { @@ -213,6 +214,7 @@ export default function AddonPage({ CardComponent, ...props }: renderItem={({ item }: any) => } /> {props.installAction && } diff --git a/src/lib/addons/plugins/types.ts b/src/lib/addons/plugins/types.ts index c6e2d22..c490a23 100644 --- a/src/lib/addons/plugins/types.ts +++ b/src/lib/addons/plugins/types.ts @@ -1,5 +1,5 @@ -import { createStorage } from "@core/vendetta/storage"; import { BunnyManifest } from "@lib/addons/types"; +import { createStorage } from "@lib/api/storage"; import { Logger } from "@lib/utils/logger"; export type PluginRepo = Record(): ReturnType>; + createStorage(): ReturnType>; } export type BunnyPluginObject = typeof window.bunny & { diff --git a/src/lib/api/native/modules/index.ts b/src/lib/api/native/modules/index.ts index c0736ed..a31dead 100644 --- a/src/lib/api/native/modules/index.ts +++ b/src/lib/api/native/modules/index.ts @@ -2,7 +2,7 @@ import { RNModules } from "./types"; const nmp = window.nativeModuleProxy; -export const MMKVManager = nmp.MMKVManager as RNModules.MMKVManager; +export const MMKVManager = (nmp.NativeCacheModule ?? nmp.MMKVManager) as RNModules.MMKVManager; export const FileManager = (nmp.NativeFileModule ?? nmp.RTNFileManager ?? nmp.DCDFileManager) as RNModules.FileManager; export const ClientInfoManager = nmp.NativeClientInfoModule ?? nmp.RTNClientInfoManager ?? nmp.InfoDictionaryManager; export const DeviceManager = nmp.NativeDeviceModule ?? nmp.RTNDeviceManager ?? nmp.DCDDeviceManager; diff --git a/src/metro/common/components.ts b/src/metro/common/components.ts index 3cafdd0..d0af59c 100644 --- a/src/metro/common/components.ts +++ b/src/metro/common/components.ts @@ -20,7 +20,7 @@ export const CompatButton = findByPropsLazy("Looks", "Colors", "Sizes"); export const HelpMessage = findByNameLazy("HelpMessage"); // React Native's included SafeAreaView only adds padding on iOS. -export const { SafeAreaView, SafeAreaProvider } = lazyDestructure(() => findByProps("useSafeAreaInsets")); +export const { SafeAreaView, SafeAreaProvider, useSafeAreaInsets } = lazyDestructure(() => findByProps("useSafeAreaInsets")); // ActionSheet export const ActionSheetRow = findProp("ActionSheetRow"); diff --git a/src/metro/common/types/components.ts b/src/metro/common/types/components.ts index 52657f5..42ac3b3 100644 --- a/src/metro/common/types/components.ts +++ b/src/metro/common/types/components.ts @@ -140,6 +140,7 @@ interface FABProps { icon: ImageSourcePropType | ReactNode; style?: Style; onPress: () => void; + positionBottom?: number; } export type FloatingActionButton = React.FC;