Coder Social home page Coder Social logo

woocommerce / woocommerce-shared Goto Github PK

View Code? Open in Web Editor NEW
3.0 15.0 2.0 968 KB

A React Native shared library for WooCommerce

License: Mozilla Public License 2.0

Ruby 3.69% Makefile 5.29% JavaScript 0.92% Swift 9.94% Objective-C 12.21% Shell 6.25% Java 3.32% Kotlin 12.27% TypeScript 46.13%

woocommerce-shared's People

Contributors

ecarrion avatar jkmassel avatar mokagio avatar oguzkocer avatar wzieba avatar

Stargazers

 avatar  avatar  avatar

Watchers

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

Forkers

derekblank

woocommerce-shared's Issues

Prepare unit tests setup

Description

We should explore the possibilities of writing unit tests that will cover the JavaScript/Typescript codebase.

This task doesn't include CI work (execution or GitHub checks).

Add dark mode support

Tasks

  • Support the correct color scheme when presenting a screen
  • Adjust the view colors when the user changes the color scheme while a screen is presented

Release: hide not used elements

Description

We should introduce a feature flag to hide elements that won't be part of the release:

  • Add button
  • Arrows on the list

Fix hardware back button behaviour on Android

Now, when use opens "New Zone" screen and tries to navigate back on Android, it'll close the whole "Shipping Zone" screen (they'll go back to "Settings" screen).

The expected behaviour is that they'll navigate back to the list of Shipping Zones

Store Tokens and Keys

Why

As we are passing tokens and keys from the main app. We need to store them somehow in the react environment so they can be accessed where needed.

Render new shipping method

Task

  • When a new shipping method is created the shipping zone screen should be updated to reflect the added method

Image

Find a way to send Tracks events from React Native

Description

This task is about adding the possibility to send analytics events from React Native.

Presently, we'll focus on a lambda/closure-based idea (lambda as a parameter for React Native).

If we fail on that, we can also experiment with:

  • native module (discouraged)
  • writing the equivalent of Tracks in JavaScript (big effort)

Fetch list of regions/countries

Description

In order to display a list of regions to assign during a process of creating Shipping Zone, we have to fetch this list beforehand.

Fetch data needed for presenting list of Shipping Zones

Description

This task is about fetching data needed for presenting contentful list of Shipping Zones.

Unfortunately, with the current REST API, we'll have to perform a significant number of HTTP requests, according to this formula: 1 + number of shipping zones * 2 for every pagination.

We will ask for API team support (or try to introduce a new endpoint ourselves) but for now, let's use the current API so we're not blocked with further progress.

Show error + retry button in case of HTTP failure

Description

If fetching list of zones fails, we should show some error message for the user and allow them to retry the fetching.

There's no design for this operation, let's aim for "a native feeling".

Encountered two children with the same key, `Everywhere`.

On recent trunk (c9da6c4) I've started to get following error:

ERROR  Warning: Encountered two children with the same key, `Everywhere`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

Probably we can't set key of the list as zone name.

Screenshot 2023-08-16 at 11 43 32

Add zone icons

Add icons as per the designs.

We are going to use 3 types of icons:

  • For the "Explanation" row
  • For the regular zones
  • For the “locations not covered by your other zones” zone

Image

Handle Empty Zones

Tasks

  • When a zone has no locations, the UI should read "Everywhere". The only exception is the "Locations not covered" zone.
  • When a zone has no methods, the UI should read "No shipping methods offered to this zone".

Problem when accessing RN libraries assets.

Issue

Recently I found a situation on iOS where a back button IS NOT being rendered when running the demo app against the compiled framework but it is rendered when running it against the metro server.

Metro Server Compiled Framework
local-0 transpiled

Possible Cause

After digging into it:

  • It seems that RN is using an asset called back-icon.png to render that button.
  • I can't find that asset in the WooCommerseShared.xcframework package.

Could it be that the assets from the RN libraries we use are not being properly included in the xcframework, hence not being rendered?

@jkmassel or @mokagio does this makes any sense? Or should I look at a different angle?

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.