Skip to content
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

[FEAT] Support Developer Options #87

Merged
merged 30 commits into from
Jan 11, 2024

Conversation

ahna92
Copy link
Contributor

@ahna92 ahna92 commented Dec 20, 2023

Changes

  • Show layout bounds
  • GPU Profiling
  • Overdraw

UI Changes

developer options

📦 Published PR as canary version: 3.0.1-canary.87.934.0

✨ Test out this PR locally via:

npm install @storybook/native-android-material-deep-link-example@3.0.1-canary.87.934.0
npm install @storybook/native-controls-example@3.0.1-canary.87.934.0
npm install @storybook/native-cross-platform-example@3.0.1-canary.87.934.0
npm install @storybook/native-flutter-example@3.0.1-canary.87.934.0
npm install @storybook/native-ios-example-deep-link@3.0.1-canary.87.934.0
npm install @storybook/native-addon@3.0.1-canary.87.934.0
npm install @storybook/native-controllers@3.0.1-canary.87.934.0
npm install @storybook/deep-link-logger@3.0.1-canary.87.934.0
npm install @storybook/native-dev-middleware@3.0.1-canary.87.934.0
npm install @storybook/native-devices@3.0.1-canary.87.934.0
npm install @storybook/native-components@3.0.1-canary.87.934.0
npm install @storybook/native@3.0.1-canary.87.934.0
npm install @storybook/native-types@3.0.1-canary.87.934.0
# or 
yarn add @storybook/native-android-material-deep-link-example@3.0.1-canary.87.934.0
yarn add @storybook/native-controls-example@3.0.1-canary.87.934.0
yarn add @storybook/native-cross-platform-example@3.0.1-canary.87.934.0
yarn add @storybook/native-flutter-example@3.0.1-canary.87.934.0
yarn add @storybook/native-ios-example-deep-link@3.0.1-canary.87.934.0
yarn add @storybook/native-addon@3.0.1-canary.87.934.0
yarn add @storybook/native-controllers@3.0.1-canary.87.934.0
yarn add @storybook/deep-link-logger@3.0.1-canary.87.934.0
yarn add @storybook/native-dev-middleware@3.0.1-canary.87.934.0
yarn add @storybook/native-devices@3.0.1-canary.87.934.0
yarn add @storybook/native-components@3.0.1-canary.87.934.0
yarn add @storybook/native@3.0.1-canary.87.934.0
yarn add @storybook/native-types@3.0.1-canary.87.934.0

@ahna92 ahna92 marked this pull request as draft December 20, 2023 10:05
Copy link

socket-security bot commented Dec 20, 2023

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@storybook/native-types 3.0.0 None +0 6.7 kB amalik2
@storybook/native-devices 3.0.0 None +0 19.5 kB amalik2
@storybook/deep-link-logger 3.0.0 None +0 18.3 kB amalik2
@storybook/native-components 3.0.0 None +0 34.3 kB amalik2
@storybook/native 3.0.0 None +0 32.5 kB amalik2
@storybook/native-controllers 3.0.0 None +0 50 kB amalik2
@storybook/native-addon 3.0.0 None +0 34.6 kB amalik2
@storybook/native-dev-middleware 3.0.0 None +0 20.8 kB amalik2
add 2.0.6 None +0 8.06 kB benng
yarn 1.22.21 filesystem +0 5.33 MB arcanis
@react-google-maps/api 2.19.2 environment +14 13.3 MB justfly1984
react-toastify 9.1.3 None +0 394 kB sniphpet

🚮 Removed packages: @storybook/core-events@7.6.7, @storybook/react@7.6.7

@ahna92 ahna92 marked this pull request as ready for review December 21, 2023 00:21
@ahna92
Copy link
Contributor Author

ahna92 commented Dec 21, 2023

Hi @amalik2

Need your help to review these PRs ,
I'm already using in 3 projects all good so far

The PRs are using multiple feature branches but all rebased form each other ,
And merging train is in order as follow

  1. [FEAT] Add Country Picker & Google map support  #80
  2. [FEAT] Support home button, restart and stop app , shake device and enable/disable firebase analytics debug view #81
  3. [FEAT] Add Network Logs Panel #82
  4. [FEAT] Add Logs panel #83
  5. [FEAT] Support Font Selector Addon #84
  6. [FEAT] Add Theme Toggle addon #85
  7. [FEAT] Support Overview Action #86
  8. [FEAT] Support Developer Options #87

if you like all the features to be merged in one shot then #87 (3.0.1-canary.87.930.0) has it all

hey @chriskurzeja these might be useful,
ping if you tried them and faced any issues

@@ -60,6 +60,64 @@ export const getDefaultOsVersion = (platform: Platform): string => {
throw new Error(`No osVersion for platform: ${platform}`);
};

export const getFonts = (platform: Platform): Font[] => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can getFonts and getLocations be moved to separate files? It would be good to separate the location JSON data into individual files as well since there's so much data

ex:
getFonts.ts should contain all font related logic,
getLocations.ts should contain all location related logic, locations.json should contain location data

duration?: number;
}

// interface Gesture {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this since its not used?


const preview = {
globalTypes: {
// location: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include a note indicating that this is just an example of using google maps and that's why its commented out?

@@ -11,6 +11,7 @@
],
"scripts": {
"start": "yarn build:stories && storybook dev -p 53743",
"start:local": "STORYBOOK_NATIVE_LOCAL_EMULATOR=true yarn build:stories && STORYBOOK_NATIVE_LOCAL_EMULATOR=true storybook dev -p 53743",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STORYBOOK_NATIVE_LOCAL_EMULATOR=true only needs to be specified once -
this command should be

export STORYBOOK_NATIVE_LOCAL_EMULATOR=true && yarn build:stories && storybook dev -p 53743

@@ -77,6 +77,7 @@ const promises = components.map(async (component) => {
return generateStories({
category: pascalCase(component.name),
filePath: `./stories/${component.name}.stories.jsx`,
// applicationId: "com.example.app",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, can you provide a note about why this is commented out?

api.getChannel()?.emit(
ACTION_EVENT_NAME,
EmulatorActions.showLayoutBounds,
null, // location
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the // location comments in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emit accepts ordered arguments , the comments indicates the argument type and position

@ahna92
Copy link
Contributor Author

ahna92 commented Jan 3, 2024

@amalik2 pushed requested changes

@amalik2 amalik2 merged commit ebf0262 into storybookjs:master Jan 11, 2024
7 checks passed
@sumwatshade
Copy link
Contributor

🚀 PR was released in v3.0.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants