ace-han

ace-han

Member Since 10 years ago

Experience Points
37
follower
Lessons Completed
5
follow
Lessons Completed
195
stars
Best Reply Awards
46
repos

178 contributions in the last year

Pinned
⚡ Make deployment done by a single click.
Activity
Nov
11
3 weeks ago
Nov
6
1 month ago
pull request

ace-han pull request mallfoundry/taroify

ace-han
ace-han

bundle size reduction for demo package in development mode

Highlight

Total bundle size in development mode 3.5MB -> 1.78MB (almost 50% off)

based on a few commits after 0.0.17-alpha.1, commit: 9ef31ef280b247c232ac7990f22c690b59b2bb8d

There is NO NEED to turn on terser plugin for the demo package taking belows into account:

  • enable remote debugging in various mini-program devtools with full source map support under bundle size limit of 2MB
  • we configure the terser plugin to minimize the SELECTED BUNDLES ONLY

Comparison

image

Code

首页见

Nov
5
1 month ago
push

ace-han push ace-han/taroify

ace-han
ace-han
ace-han
ace-han

extract lodash, taroify to standalone bundles

ace-han
ace-han

extract lodash, taroify to standalone bundles in dev mode only

ace-han
ace-han

terser plugin for bundle size reduction in dev mode only

commit sha: ab0d7f81fdff278bac2255f23eed1a62c05ee063

push time in 1 month ago
Activity icon
fork

ace-han forked mallfoundry/taroify

⚡ Taroify 是移动端组件库 Vant 的 Taro 版本,两者基于相同的视觉规范,提供一致的 API 接口,助力开发者快速搭建小程序应用。
ace-han MIT License Updated
fork time in 1 month ago
Nov
2
1 month ago
started
started time in 1 month ago
Oct
24
1 month ago
Activity icon
issue

ace-han issue saleor/react-storefront

ace-han
ace-han

Maybe is not generated via npm run generate

When I pull down this project from github, I was following the instructions in README.md to setup this project. *

pnpm i
  • Did exactly NOTHING after dependencies installed successfully

npm run generate

I got saleor/api.tsx with some changed and this's not what I expected (nothing should be changed in git repository)

Coule you please tell me what have I done wrong, thx in advance?

And belows are some information about my environment

# git commit that I pulled down
$ git log -1
commit 673f447cd1af414f1c76da55dbdd243a2e9809df (HEAD -> main, origin/main, origin/HEAD)
Author: Irgen Kini <[email protected]>
Date:   Wed Oct 20 10:53:48 2021 +0200

    Orderlist and details views - responsible
$ git status

Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   saleor/api.tsx

no changes added to commit (use "git add" and/or "git commit -a")
$
$ git diff saleor/api.tsx

diff --git a/saleor/api.tsx b/saleor/api.tsx
index e1c0c8d..fcc5b99 100644
--- a/saleor/api.tsx
+++ b/saleor/api.tsx
@@ -12653,17 +12653,17 @@ export type _Service = {
 
 export type PriceFragment = { __typename?: 'Money', currency: string, amount: number, localizedAmount: string };
 
-export type ImageFragment = { __typename?: 'Image', url: string, alt?: Maybe<string> };
+export type ImageFragment = { __typename?: 'Image', url: string, alt?: string | null | undefined };
 
 export type ProductMediaFragment = { __typename?: 'ProductMedia', url: string, alt: string, type: ProductMediaType };
# ... many line are changed

The most obvious diff parts in common as below, just like ImageFragment.alt someField?: Maybe<T>
vs
someField?: T | null | undefined

and here is what looks like in my GUI SourceTree image

started
started time in 1 month ago
Oct
21
1 month ago
started
started time in 1 month ago
Oct
16
1 month ago
Activity icon
issue

ace-han issue comment saleor/saleor-sdk

ace-han
ace-han

Local Development

How to work on local development for the sdk and map it with saleor-storefront?

ace-han
ace-han

clone saleor-sdk switch into a stable branch like master Run these commands

$ npm i 
$ cd lib 
$ npm link

now, clone saleor-storefront

$ cd <your storefront path>

Remove, cut that saleor-sdk from package.json

$ npm i
$ npm link @saleor/sdk
Paste saleor-sdk that been cut previously in package.json

these are the steps I followed and it worked. Hope it'll work for you as well✌🏼

@jatinbharadwaj I tried as what you said. However, I could not find the lib folder, will you kindly help?

$ npm i 
$ cd lib  # <-- where is this folder?
$ npm link

image

Oct
11
1 month ago
pull request

ace-han merge to ace-han/cishe

ace-han
ace-han

Bump drf-flex-fields from 0.9.4 to 0.9.5

Bumps drf-flex-fields from 0.9.4 to 0.9.5.

Release notes

Sourced from drf-flex-fields's releases.

0.9.5

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Activity icon
issue

ace-han issue comment graphql-python/graphene-django

ace-han
ace-han

☂️Graphene-Django v3

This issue is to track v3 of Graphene-Django which will contain some breaking changes.

WIP branch: v3 (compare)

Breaking changes

TODO

ace-han
ace-han

As I checked it recently, the pending task in todo list

Check dependant libraries: https://github.com/tfoxy/graphene-django-optimizer and https://github.com/eamigo86/graphene-django-extras

graphene-django-optimizer has been done its part to support V3 both for graphene and graphene-django via this pull

https://github.com/tfoxy/graphene-django-optimizer/pull/72

Just graphene-django-extras alone now. Carry on! Go go goooo!

Sep
27
2 months ago
pull request

ace-han merge to ace-han/cishe

ace-han
ace-han

Bump drf-flex-fields from 0.9.3 to 0.9.4

Bumps drf-flex-fields from 0.9.3 to 0.9.4.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
pull request

ace-han merge to ace-han/cishe

ace-han
ace-han

Bump openpyxl from 3.0.8 to 3.0.9

Bumps openpyxl from 3.0.8 to 3.0.9.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Activity icon
issue

ace-han issue mirumee/saleor

ace-han
ace-han

GrahpQL note in checkout support

What I'm trying to achieve

There is no way to apply any note message to the checkout model.

This feature is so needed in saleor-storefront and saleor so that order detail view in saleor-bashboard won't always display an empty customerNote

Describe a proposed solution

  1. add a note field in CheckoutCreateInput
  2. add a new mutation like checkoutUpdateCustomerNote

Other solutions I've tried and won't work

Screenshots or mockups

image

image

Sep
26
2 months ago
Activity icon
issue

ace-han issue comment mirumee/saleor

ace-han
ace-han

Support more input types for attribute values

In the Attribute model we have the input_type field which determines how a value can be entered in the dashbaord and how it's rendered in the storefront. Now we have two types:

  • dropdown - to select one value from a list of predefined choices
  • multiselect - as above, but to select multiple values

We need to introduce more input types:

  • text field - for storing simple text values (think CharField in Django)
  • text area
  • datetime
  • boolean - for yes/no attributes
ace-han
ace-han

How is this feature going?

My use case: T-shirts with below attributes color: red, green, blue size: small, medium, large message: text field for a personalized message to print on the T-shirt, like option in django-oscar

How to implement this message attribute in current Saleor 3.0 or 3.1? Thanks in advanced.

Sep
15
2 months ago
Activity icon
issue

ace-han issue comment ace-han/social_auth

ace-han
ace-han

Publish a wheel in pypi

As title

ace-han
ace-han

refer to https://realpython.com/pypi-publish-python-package/#building-your-package


  • pip install twine
  • freq commands
python setup.py sdist bdist_wheel
twine check dist/*

# you'd better should try test.pypi.org first
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

# default is pypi
twine upload  dist/*

# check what's in the *.tar.gz
tar tzf dist/*.gz


push

ace-han push ace-han/social_auth

ace-han
ace-han

ref #7, enrich setup.py to be decent on pypi

commit sha: 3a61200bcf941a0a4180c39e1e5e8b59d9af34c5

push time in 2 months ago
Sep
13
2 months ago
pull request

ace-han merge to ace-han/cishe

ace-han
ace-han

Bump openpyxl from 3.0.7 to 3.0.8

Bumps openpyxl from 3.0.7 to 3.0.8.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sep
12
2 months ago
Sep
11
2 months ago
Activity icon
issue

ace-han issue ace-han/social_auth

ace-han
ace-han

Variable naming pattern

  • In graphene backend => UnderScoreCase
  • In any frontend => CamelCase

Take below for example

# for the time being,  should be data.get('refresh_token')
# refresh_token = data.get("refresh_token") or refresh_token
# this refresh_token_code comes from 
# saleor/graphql/account/mutations/authentication.py
class RefreshToken(BaseMutation):
     class Arguments:
         refresh_token = graphene.String(required=False, description="Refresh token.")
#  although in the frontend it's `refreshToken` graphene will transform to `refresh_token`
# saleor-dashboard/src/auth/hooks/useExternalAuthProvider.ts
const token = getTokens().refresh;
const input = JSON.stringify({
   refreshToken: token
});
return tokenRefresh({ variables: { input, pluginId: authPlugin } }).then(...)
push

ace-han push ace-han/social_auth

ace-han
ace-han

ref #6, refresh_token instead of refreshToken in plugin's external_refresh method

commit sha: 7ca351152f189784417c140929bc183f71dd2f03

push time in 2 months ago
Activity icon
issue

ace-han issue ace-han/social_auth

ace-han
ace-han

Variable naming pattern

  • In graphene backend => UnderScoreCase
  • In any frontend => CamelCase

Take below for example

# for the time being,  should be data.get('refresh_token')
# refresh_token = data.get("refresh_token") or refresh_token
# this refresh_token_code comes from 
# saleor/graphql/account/mutations/authentication.py
class RefreshToken(BaseMutation):
     class Arguments:
         refresh_token = graphene.String(required=False, description="Refresh token.")
#  although in the frontend it's `refreshToken` graphene will transform to `refresh_token`
# saleor-dashboard/src/auth/hooks/useExternalAuthProvider.ts
const token = getTokens().refresh;
const input = JSON.stringify({
   refreshToken: token
});
return tokenRefresh({ variables: { input, pluginId: authPlugin } }).then(...)