GithubHelp home page GithubHelp logo

breeffy / react-native-monorepo Goto Github PK

View Code? Open in Web Editor NEW
183.0 4.0 8.0 16.61 MB

Monorepo with UI components.

License: Apache License 2.0

JavaScript 8.29% TypeScript 91.71%
react-native calendar reanimated2 picker wheel-picker android

react-native-monorepo's People

Contributors

breeffybot avatar dependabot[bot] avatar github-actions[bot] avatar likern 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

react-native-monorepo's Issues

Exception when using with styled-components css prop

When using styled-components css property, testID property is passed down to <Icon /> component, which leads to exception.

import 'styled-components/macro';
...
<Icon
 css={`
   margin-left: 14px;
 `}
  color={`${
    iconColor !== undefined ? iconColor : 'rgba(38, 47, 86, 1)'
  }`}
  icon={['far', iconName]}
  size={24}
/>

Allow to pass initial selected dates through properties

While it is possible to set initial selected dates using select method on ref, it requires rerendering component.
Using with animated bottomsheet this leads to calendar UI jitter as shown below.

Screenrecorder-2021-11-23-15-37-27-267.mp4

General questions

Hey this looks awesome! I came across it on a Reanimated issue (I believe about slow lists). I maintain Moti and a few other React Native libraries. I've also contributed to react-native-paper-dates.

The product I'm working on is very heavily calendar focused, so I'm intrigued by this library. I've only been using web so far, but I'm building my RN app for native, and I'm thinking of using this library to create a split Calendar/list view, similar to the iOS Calendar app.

Question: are you planning on adding callbacks for things like onMonthChanged, etc? I'd like to fetch data for a given month as the user swipes, and do other things like that. I'd also like to mark dates that have multiple events with docs, etc. Just wondering if that's something that's planned for the future (I know this is still new!)

Thanks for making this, excited to try it out.

Pickers: Add different rounding options

Now only usual rounding is performed, which works like Math.round(). While it's desirable to have different rounding options like Math.ceil() or Math.floor().

This is especially useful, when precision is set to 0. Related to #61.

Invalid interpolation

In development branch year interpolation looks like not correct in some situations.

<Calendar
  style={styles.calendar}
  ref={calendarRef}
  selectionMode="singleDay"
  scrollMode="anyOffset"
  scrollModeDeceleration="normal"
  monthsBefore={0}
  monthsAfter={10}
  renderFallbackMonth={renderFallbackMonth}
  onDaySelectionChange={onDaySelectionChange}
/>

For March, 2021 - January, 2022 on last month year header should be changed from 2021 to 2022.

bug.mp4

Regenerate FontAwesome npm auth token

With react-native-svg-icons package inclusion .yarnrc.yml with private npmAuthToken will be added.
Regenerate this token, before publishing into open-source repository.

Error: Cannot convert undefined value to object

I copy/paste'd the example in the README and I got the following error. I believe it's from reanimated.

Simulator Screen Shot - iPhone 12 - 2021-04-26 at 23 27 45

Environment:
react-native: 0.64.0
react-native-reanimated: ^2.1.0
react-native-gesture-handler: ^1.10.3

Can I help solving this or am I missing something obvious?

Allow to disable unselection of last selected date

If only one selected date in calendar remains, we can disable unselection of it, so calendar will always have at least one date selected.

In this mode pressing on this last selected date will do nothing (no unselection, no callbacks called).

Improve GitHub Actions publishing workflow

I accidentally published 0.6.3-alpha.0 and 1.0.0-alpha.0 versions because of bad DX experience of GitHub Actions for custom workflows.

Features:

  • Don't publish if no updated changelog with published version (for patch / minor / major releases)
  • After publishing to npm create GitHub Release with description taken from Changelog file

Allow dynamically-sized width

At the moment, the calendar uses a static windowWidth variable. This prevents you from making custom-width calendar sizes. Ideally you could pass in a width prop. The best-case-scenario would be to wrap the calendar in a View and use onLayout to stretch its size, although this would result in a flash of hiding it, so perhaps it should just be handled by the user if they want that.

Also, rather than Dimensions.get('window').width, it should use useWindowDimensions so that the state updates if the width changes, such as a phone rotation.

Event markers

I'd like to add some sort of event markers like this:

image

Would it be possible to expose an API for this? I'm happy to help with a PR. Even a renderDayMarker({ date }) function would suffice to avoid the lib having to build a whole UI. The only concern would be making sure it's still performant, but this is doable with the FlatList's extraData prop.

Add iOS support

iOS is not officially supported and is not tested against it's correctness (due to not having any iOS phone).

When main application will be ported to iOS, support that platform officially.

Gilroy dependency

It looks like this library is using a custom font. This should probably not be done under the hood, but rather with a style or theme option.

fontFamily "Gilroy-Medium" is not a system font and has not been loaded through Font.loadAsync.

- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.

Monorepo Setup

TODO:

CI:

Documentation Cleanup:

  • Update changelog
  • Remove Usage section - all examples should be shown in storybook playground. Closes #40
  • Remove Calendar properties description - this is already explained in TypeScript types and TSDoc
  • Update Copyright to 2022 year
  • Mention where to find example / usage code
  • Explain dependencies / peerDependencies policy
  • Add version matrix for every component
  • Explain iOS / MacOS / Windows / Web support

Update Scripts:

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.