playground icon indicating copy to clipboard operation
playground copied to clipboard

chore: Code Improvements

Open pranshuchittora opened this issue 5 years ago • 16 comments

Description

The project is in its initial phase, and the code is written with an idea of move fast and break things. So there are many possible improvements. Mentioning some but not limited to these only :smile:

  • Inline styling to the stylesheet
  • Proper Scoping and Abstraction of composable components.
  • Improve folder structure, if any
  • Improve UI/UX

pranshuchittora avatar Nov 10 '20 19:11 pranshuchittora

Hey @pranshuchittora, I would like to work on this, just wanted to know, which should I work among the options. Just assign me the problem so that I can work accordingly

saideepesh000 avatar Nov 16 '20 15:11 saideepesh000

Thanks @saideepesh000 you can start by migrating the inline styling to style objects or css modules

pranshuchittora avatar Nov 16 '20 22:11 pranshuchittora

@pranshuchittora, it would be better if we add CSS modules, it looks clean and beginner-friendly, what do you think.

saideepesh000 avatar Nov 17 '20 13:11 saideepesh000

Ya sounds great :+1: Go ahead and feel free to ping me on slack for any help/discussion :)

pranshuchittora avatar Nov 17 '20 14:11 pranshuchittora

Hi @pranshuchittora, I am getting this error. It seems to the problem related to mdx, how can I tweak the node_modules or replace mdx. Sorry for this silly doubt. I am using windows(this might also be the problem). And according to this even though we are using react-app-rewired, it's not working for me. Please help me.

Screenshot (283)

saideepesh000 avatar Nov 18 '20 16:11 saideepesh000

No worries, let's connect on Slack to discuss and fix the issue.

https://react-native-elements-slack.herokuapp.com/

pranshuchittora avatar Nov 18 '20 16:11 pranshuchittora

Hi @pranshuchittora, I have gone through the issues mentioned above and i feel that i can start working on them.😋

ARJUN-SABU avatar Mar 10 '21 07:03 ARJUN-SABU

hey @pranshuchittora, I have started working on the issues mentioned above and will be contributing soon.😊

shivambalwani avatar Mar 10 '21 07:03 shivambalwani

Glad to hear that. It would be great if you

  • Open a draft PR while you are working
  • Make small PRs for fast review & merger

pranshuchittora avatar Mar 10 '21 07:03 pranshuchittora

I’ve started working on them and have made a PR for certain areas.. will fix the inline styling and stuff in the next PR

Devesh21700Kumar avatar Mar 10 '21 19:03 Devesh21700Kumar

Hi @pranshuchittora, I am getting this error. It seems to the problem related to mdx, how can I tweak the node_modules or replace mdx. Sorry for this silly doubt. I am using windows(this might also be the problem). And according to this even though we are using react-app-rewired, it's not working for me. Please help me.

Screenshot (283)

Hey @pranshuchittora @saideepesh000 I'm facing the exact issue, did you found the solution? I search the slack chats but couldn't find it. If any solution please tell me.

abhishekkumar08 avatar Mar 12 '21 06:03 abhishekkumar08

Hi @pranshuchittora, I am getting this error. It seems to the problem related to mdx, how can I tweak the node_modules or replace mdx. Sorry for this silly doubt. I am using windows(this might also be the problem). And according to this even though we are using react-app-rewired, it's not working for me. Please help me. Screenshot (283)

Hey @pranshuchittora @saideepesh000 I'm facing the exact issue, did you found the solution? I search the slack chats but couldn't find it. If any solution please tell me.

import importMDX from "mdx.macro"; use it to work locally

while pushing convert it back to
import {importMDX} from "mdx.macro"; to avoid build errors @pranshuchittora this is what i did.. and i think its the best solution right now unless tsc migration is made

Devesh21700Kumar avatar Mar 12 '21 06:03 Devesh21700Kumar

@Devesh21700Kumar yeah it did worked 🚀 , but had to change three instances of it to run.

 src/content/Avatar/index.jsx
 src/content/Badge/index.jsx 
 src/content/Button/index.jsx

abhishekkumar08 avatar Mar 12 '21 07:03 abhishekkumar08

Great.. yes i know. and before pushing revetr it back to import {importMDX} or it will give build error

@pranshuchittora the build error in my PR yesterday was due to this only.. so tweaked a bit to find a solution 🚀

Devesh21700Kumar avatar Mar 12 '21 07:03 Devesh21700Kumar

Hi @pranshuchittora, I am getting this error. It seems to the problem related to mdx, how can I tweak the node_modules or replace mdx. Sorry for this silly doubt. I am using windows(this might also be the problem). And according to this even though we are using react-app-rewired, it's not working for me. Please help me. Screenshot (283)

Hey @pranshuchittora @saideepesh000 I'm facing the exact issue, did you found the solution? I search the slack chats but couldn't find it. If any solution please tell me.

you should

  • delete node_modules and package.lock.json file
  • then run npm i twice(yes twice)
  • then delete node_modules once
  • then npm i
  • then npm start It should fix this error!!.

or wait for it https://github.com/react-native-elements/playground/pull/97 to be merged. Yes, I know it is weird,

jugshaurya avatar Apr 16 '21 16:04 jugshaurya

Hi @pranshuchittora I also wanted to be help in this can i?

vikasazad avatar Dec 06 '21 07:12 vikasazad