Giter Site home page Giter Site logo

nandorojo / burnt Goto Github PK

View Code? Open in Web Editor NEW
1.1K 1.1K 34.0 1.43 MB

Crunchy toasts for React Native. ๐Ÿž

License: MIT License

JavaScript 3.81% Kotlin 3.36% TypeScript 24.07% Starlark 3.11% Java 28.02% CMake 0.44% C++ 11.74% Ruby 5.14% Objective-C 0.63% Objective-C++ 10.56% Swift 9.11%

burnt's Introduction

burnt's People

Contributors

alantoa avatar fangherk avatar filipstefansson avatar frankcalise avatar gijosso avatar ivanvorobei avatar kbrandwijk avatar kurucaner avatar nandorojo avatar wcastand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

burnt's Issues

Add Android Preview Video

Would be great to have demos for iOS and Android.
Would also be great to have updated iOS Videos (as the syntax changed). Maybe just show the notification without code.

ASN1Decoder pod install error

โš ๏ธ  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
โ””โ”€ Cause: Error installing ASN1Decoder
[!] /usr/local/bin/git clone https://github.com/filom/ASN1Decoder.git /var/folders/p4/429v7kqd02n3c2qhrt0n94y40000gn/T/d20230114-47934-qn4xhk --template= --single-branch --depth 1 --branch 1.8.0

Cloning into '/var/folders/p4/429v7kqd02n3c2qhrt0n94y40000gn/T/d20230114-47934-qn4xhk'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Used the solito instructions found here: https://github.com/nandorojo/burnt#solito
but instead of cd'ing into applications/app I went into apps/expo (i am using a tamagui starter project), and i also tried manually going in to the ios folder to pod install with no luck (same error above).

Library doesn't support plain react-native for iOS

This library doesn't support plain react-native, as root dependencies relies on expo module system, so it's impossible to use it with the plain react-native setup. Would be great if there will be possibility to install it to react-native project without expo

How can we trigger multiple toasts ?

Hi ! Thanks for the awesome library

Currently when triggering multiple toasts; one just stacks one of top of the other in the z-axis.
How could we trigger multiple to be stacked on the y-axis to stack vertically ?

thanks !

Custom shadow colors/configuration options for the toast

This is more of a feature request since I've found that the default shadow config applied by SPIndicator does not fit my use case. I don't know if SPIndicator exposes those parameters as configurable - if so, it would be nice to have the option to customize them, similar to how you can do so with regular react native View. This might be easier to do when Expo adds support for using SwiftUI views within the modules

Expo Fastlane Build Failure - SPAlert

Had these alerts hooked up and working which is why this is odd to me but getting fastlane build errors during my eas build phase for my expo app.

(ios/Pods/SPAlert/Sources/AlertKit/Views/AlertAppleMusic16View.swift:19:5)

  17 |         default: UIColor(red: 88 / 255, green: 87 / 255, blue: 88 / 255, alpha: 1)
  18 |         }
> 19 |     }
     |     ^ missing return in closure expected to return 'UIColor'
  20 |     
  21 |     fileprivate weak var viewForPresent: UIView?
  22 |     fileprivate var presentDismissDuration: TimeInterval = 0.2


โŒ  (ios/Pods/SPAlert/Sources/AlertKit/Views/AlertAppleMusic17View.swift:19:5)

  17 |         default: UIColor(red: 88 / 255, green: 87 / 255, blue: 88 / 255, alpha: 1)
  18 |         }
> 19 |     }
     |     ^ missing return in closure expected to return 'UIColor'
  20 |     
  21 |     fileprivate weak var viewForPresent: UIView?
  22 |     fileprivate var presentDismissDuration: TimeInterval = 0.2

To make sure it was this libray, i had to remove burnt. Once i did was able to build again successfully.

"burnt": "^0.11.7",
"expo": "^49.0.0",
"react-native": "0.72.5",

Followed the docs as well to get it working in Expo and like I said had it working and already made builds through EAS just fine.

I do have some code now that updates Appearance manually with Appearance.setColorScheme() -> I need this as my users can set their color mode to match the OS or be light & dark. If they select light or dark and the match os is toggled off, then native components did not update, so i added the Appearance.setColorScheme(light | dark | null) to match which works with things like Alert from RN, it also worked on development builds for your burnt alerts & toasts as well but been running into the error above trying to build new builds through EAS.

Unable to resolve module `expo-modules-core` in bare React Native

Hi, I tried to use this library in a bare React Native (non-expo) project to no avail. I basically did:

  • yarn add burnt
  • (cd ios && bundle exec pod install)
  • yarn ios

Upon launch, a redbox appears, saying

Unable to resolve module expo-modules-core from /Users/myusername/Projects/myproject/node_modules/burnt/build/BurntModule.ios.js: expo-modules-core could not be found within the project or in these directories:
  node_modules/burnt/node_modules
  node_modules
> 1 | import { requireNativeModule } from 'expo-modules-core';
               ^
  2 | // It loads the native module object from the JSI or falls back to
  3 | // the bridge module (from NativeModulesProxy) if the remote debugger is on.

Stopped working on iOS

I just noticed in code return BurntModule.toastAsync({ duration, ...options }); it seems ok for the web, but BurntModule does not have a toastAsync method on iOS.

Upgrading to Version 0.12.2 - index.ts:21 [burnt] toast() error: You need to add the <Toaster /> component to the root of your app for toasts to display on Web. There was no <Toaster /> found.

Getting this error after upgrading to 0.12.2: index.ts:21 [burnt] toast() error: You need to add the <Toaster /> component to the root of your app for toasts to display on Web. There was no <Toaster /> found.

I flipped back to 0.12.1, and the error went away and toasts started working again. I definitely have a toaster in my root layout file app/layout.tsx (using app router in nextjs 14.0.3).

Find this really weird because #33 didn't change a whole lot.

Style toast individually in web?

I know the library uses sonner under the hood for web but it seems I can't configure toast individually.

I'm able to import the library as indicated here and able to see the toast working as expected.

However, it seems this is the only accessible place where you'd add props for styling.

Is there a way to configure toasts across the application without using the global toast?

Support 5x version.

For new version added more styles. Good to integrate it as well.
If need any help let me know I happy to assist.

iOS build issue on latest version - v0.10.0

Version 0.9.0 was working just fine, the issue appeared in the last one.

React Native: 0.68.0
I checked the Swift version used on the project's build settings and it is Swift 5

Screenshot 2023-03-07 at 5 20 13 PM

The last two lines disappeared after I remove the node modules and pods, then reinstall them and clean the build folder using Xcode, but the Cannot find type 'Enumerable' in scope it's still there.

Screenshot 2023-03-07 at 5 20 05 PM

Possibility to modify width?

Is it possible to modify width? I'm trying to show a message but is being cut off before finishing, not sure if it's something that can be done natively within the library? If so I can open a PR for it, thanks!

image

Text Alignment

I would like to have the functionality to set the text alignment, we could add this as a property in the layout object, if we think its a good idea i am happy to contribute the code

Multiline message

Hello. Thanks for this awesome library. Is it possible for the toast message to be multiline instead of truncated text?

Do work when alert is dismissed/finished

Would you be open to integrate (PR or just issue feature request) a feature to trigger code to be run once the alert or toast is dismissed or timed out?

When it comes to helping out with a PR, would exposing the promise from BurntModule's async methods be enough, or would you prefer some onDismissed callback?

Cannot find native module 'Burnt'

Tried installing this in an Expo Managed project, already using multiple packages that need pre building, without luck. Seems like it can't find the native module for some reason.

I tried the following:

  • Deleting node_modules
  • "yarn cache clean"
  • Deleting the iOS folder
  • Clearing the derived data for the project in xcode
  • "npx expo prebuild --clean"
  • "npx expo run:ios"

Am I missing something?

[Suggestion] IOS Alert Style for Android

Hey, I just wanted to put a suggestion out there: Could you implement the IOS Alert style for Android instead of using toast styles that come from the button? The suggestion has been implemented for Ting.

Unable to resolve "sonner"

Hmm, I'm getting

Unable to resolve "sonner" from "node_modules/burnt/build/web.js"

I have installed sonner, even tried an older version of it.

I'm running an Expo 49 project.

Readme app.json docs cause linting warning, breaking build

export default {
  plugins: [
    [
      "expo-build-properties",
      {
        ios: {
          deploymentTarget: "13.0",
        },
      },
    ],
  ],
};

I'm using app.json and have expo tools vscode extension running

Getting a warning of Incorrect type. Expected one of string.

Currently running expo 48 with create tamagui

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.