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

pre-pwa: refactor naming convention for react components #1395

Closed
hulkish opened this issue Jul 7, 2017 · 10 comments
Closed

pre-pwa: refactor naming convention for react components #1395

hulkish opened this issue Jul 7, 2017 · 10 comments

Comments

@hulkish
Copy link
Collaborator

hulkish commented Jul 7, 2017

So, I've been talking to @TheLarkInn regarding converting webpack.js.org to be a PWA. So, this is the first of a few tasks I'm creating to lay out a plan towards that direction.

Measuring by the current usage of react; I'd like to refactor the naming convention of the components to use Pascal case.

For example, this is the current convention:

  • components/dropdown/dropdown.jsx
  • components/dropdown/dropdown-style.scss

With the proposed convention this would like:

  • components/Dropdown/Dropdown.jsx
  • components/Dropdown/Dropdown.scss
@skipjack
Copy link
Collaborator

skipjack commented Jul 8, 2017

@hulkish saw your slack message, but didn't get a chance to reply as I've been sick the last few days -- would you mind merging these four issues to one meta issue with a checklist with the four points? We can then link PRs within the checklist and mark things done as they are completed. Also, as mentioned on #1380, I would really like the issues to be mostly content-related.

Re the proposed naming convention, I'm fine with that change. How is that related to making the site a PWA though?

@skipjack
Copy link
Collaborator

skipjack commented Jul 8, 2017

Also we should make sure we stay in sync as we port the site -- I'm not sure if switching to gatsby or phenomic tackles or conflicts with certain parts of this.

@hulkish
Copy link
Collaborator Author

hulkish commented Jul 8, 2017

@skipjack i dont think switching to gatsy or phenomic will conflict with what i have in mind - since i am primarily focused on the react + webpack.config.js areas of the app.

Regarding the naming convention pwa dependency question.. It doesn't necessarily need to be so in order to convert to a PWA - but I figure it's a change made much easier before the actual conversion.

@Dean-Coakley
Copy link

Dean-Coakley commented Jul 8, 2017

I'd like to PR this but I'm not so knowledgeable to be honest.

It should be very simple, right?
Just components, nothing else should be renamed.

@hulkish
Copy link
Collaborator Author

hulkish commented Jul 8, 2017

@Dean-Coakley Yea, it's pretty straight forward.. just be sure to update the import paths with the changes as well. Ex:

import Dropdown from './components/Dropdown/Dropdown';

@Dean-Coakley
Copy link

Dean-Coakley commented Jul 8, 2017

@hulkish notification-bar -> NotificationBar or Notification-Bar ?

@hulkish
Copy link
Collaborator Author

hulkish commented Jul 8, 2017

NavigationBar

@Dean-Coakley
Copy link

Dean-Coakley commented Jul 8, 2017

@hulkish Sorry for more questions but:
Would I be correct in saying:

import Sidebar from '../Sidebar/Sidebar'; will import the .jsx
and import '../Sidebar/Sidebar'; will import the .scss ?

Secondly, Organization/projects.json and Support/support-additional.json should not be renamed?

@hulkish
Copy link
Collaborator Author

hulkish commented Jul 8, 2017

yes for jsx (an assumed extension). No for scss (not an assumed extension)

For your second question: correct

@hulkish
Copy link
Collaborator Author

hulkish commented Jul 8, 2017

moving this to #1400

@hulkish hulkish closed this as completed Jul 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants