-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ondevice actions #6594
Ondevice actions #6594
Conversation
This adds an ondevice actions addon that shows a logger for the actions on device.
The "API" passed to react native addons is not the same kind of API passed to web addons, so the previous code failed.
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-forbeslindesay-ondevice-actions.storybook.now.sh |
@ForbesLindesay awesome awesome awesome 💯 this is really exciting! |
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"types": ["webpack-env"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may not be needed
addons/ondevice-actions/package.json
Outdated
}, | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"jsnext:main": "src/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this package is typescript only you shouldn't need this.
addons/ondevice-actions/package.json
Outdated
"core-js": "^2.5.7", | ||
"fast-deep-equal": "^2.0.1", | ||
"global": "^4.3.2", | ||
"lodash": "^4.17.11", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are all these dependencies used by your addon?
addons/ondevice-actions/package.json
Outdated
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "fbd7ee4c80df437fed4bdc6e11140733fd450080" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be required
hey @ForbesLindesay, this is awesome! A few minor comments but looks really good overall. Do you mind adding a story in the crna-kitchen-sink app to showcase usages of this new addon? |
Codecov Report
@@ Coverage Diff @@
## next #6594 +/- ##
==========================================
- Coverage 40.65% 40.42% -0.24%
==========================================
Files 633 621 -12
Lines 8672 8603 -69
Branches 620 618 -2
==========================================
- Hits 3526 3478 -48
+ Misses 5057 5033 -24
- Partials 89 92 +3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## next #6594 +/- ##
==========================================
- Coverage 40.26% 39.92% -0.34%
==========================================
Files 640 645 +5
Lines 8810 8884 +74
Branches 643 666 +23
==========================================
Hits 3547 3547
- Misses 5164 5238 +74
Partials 99 99
Continue to review full report at Codecov.
|
@benoitdion Thanks for the feedback. I've hopefully resolved all of it now. I had committed but forgotten to push the update to crna-kitchen-sink. It doesn't actually need a new example as the existing examples already have actions, so simply adding the new ondevice-actions addon does the trick. |
Thanks for taking the time to address the feedback @ForbesLindesay! It looks like your build is failing, you may need to run yarn. I took it out for a spin and it's working great but the ui looks a bit different for me: do you know what might be going on with the expand/collapse buttons? I wonder if we could decrease the margin added to indent to decrease horizontal scrolling. After expanding a couple actions the clear button disappears. It may need to be part of the ScrollView or sticky at the bottom. What do you think? |
WOW awesome contribution @ForbesLindesay @benoitdion looks like RN is really getting the attention it deserves, are you able to handle this as well? |
I'll fix the yarn lock situation |
# Conflicts: # examples-native/crna-kitchen-sink/package.json
It's in a scroll view, so this works fine for me. I only tested on iOS though
I only tested on iOS, I think probably the |
Issue:
What I did
How to test
If your answer is yes to any of these, please make sure to include it in your PR.
It looks like this: