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

Remove capital letters from filenames in agent-js PR #132 #205

Closed
gobengo opened this issue Feb 16, 2021 · 4 comments
Closed

Remove capital letters from filenames in agent-js PR #132 #205

gobengo opened this issue Feb 16, 2021 · 4 comments

Comments

@gobengo
Copy link
Contributor

gobengo commented Feb 16, 2021

Motivation: Hans request from review of #132 #132 (comment)

@gobengo
Copy link
Contributor Author

gobengo commented Feb 16, 2021

@hansl In my experience it's quite common to name React component files with capital letters. Doing otherwise will be unusual to React developers, afaict.

Example:

Filename: Use PascalCase for filenames. E.g., ReservationCard.jsx.

Also in 'next' branch, there are some capital letters:

~/dfinity/agent-js  identity-provider/2021-01-04 ✔                                                                                         17h57m  
▶ git checkout next
Switched to branch 'next'
Your branch is up to date with 'gitlab.dfinity/next'.

~/dfinity/agent-js  next ✗                                                                                                               73d15h ◒  
▶ find packages/*/src -name '*.ts*' | grep -E '[A-Z]'
packages/agent/src/utils/getCrc.ts

in idp branch:

~/dfinity/agent-js  identity-provider/2021-01-04 ✔                                                                                          18h0m  
▶ find packages/*/src -name '*.ts*' | grep -E '[A-Z]' | grep -v '*.d.ts'
packages/agent/src/utils/getCrc.d.ts
packages/agent/src/utils/getCrc.ts
packages/authentication-demo/src/authentication_demo_assets/public/publicKey.ts
packages/authentication/src/bootstrap-messages/BootstrapChangeIdentityCommand.ts
packages/authentication/src/authenticator/IdentitiesIterable.test.ts
packages/authentication/src/authenticator/IdentitiesIterable.ts
packages/authentication/src/authenticator/Authenticator.test.ts
packages/authentication/src/authenticator/Authenticator.ts
packages/authentication/src/id-dom-events/AuthenticationResponseUrlDetectedEvent.ts
packages/authentication/src/id-dom-events/CustomEventWithDetail.ts
packages/authentication/src/id-dom-events/SignerAvailableEvent.ts
packages/authentication/src/id-dom-events/IdentityChangedEvent.ts
packages/authentication/src/id-dom-events/IdentityRequestedEvent.ts
packages/bootstrap/src/actors/identity/BootstrapIdentities.ts
packages/bootstrap/src/actors/identity/IdentityActor.ts
packages/bootstrap/src/actors/identity/AuthenticationResponseIdentities.ts
packages/bootstrap/src/actors/identity/MutableIdentity.ts
packages/bootstrap/src/actors/identity/BootstrapIdentities.test.ts
packages/identity-provider/src/relying-party-demo/components/RPAuthenticationButton.tsx
packages/identity-provider/src/relying-party-demo/routes/AuthnRedirectUri.tsx
packages/identity-provider/src/relying-party-demo/routes/RPDemo.tsx
packages/identity-provider/src/testing/dom-nodejs-polyfills/PolyfillWebAuthnIdentity.ts
packages/identity-provider/src/components/Alert.tsx
packages/identity-provider/src/components/Mnemonic.tsx
packages/identity-provider/src/components/Button.tsx
packages/identity-provider/src/components/Modal.tsx
packages/identity-provider/src/routes/Home.tsx
packages/identity-provider/src/routes/NotFound.tsx
packages/identity-provider/src/ErrorBoundary.tsx
packages/identity-provider/src/design-phase-1/ui/layout/SimpleScreenLayout.tsx
packages/identity-provider/src/design-phase-1/ui/layout/AuthenticationScreenLayout.tsx
packages/identity-provider/src/design-phase-1/ui/screens/SessionConsentScreen.tsx
packages/identity-provider/src/design-phase-1/ui/screens/WelcomeScreen.test.tsx
packages/identity-provider/src/design-phase-1/ui/screens/WelcomeScreen.tsx
packages/identity-provider/src/design-phase-1/ui/screens/IdentityConfirmationScreen.tsx
packages/identity-provider/src/design-phase-1/ui/screens/AuthenticationResponseConfirmationScreen.tsx
packages/identity-provider/src/design-phase-1/state/reducers/rootIdentity.ts
packages/identity-provider/src/design-phase-1/AuthenticationController.ts

Will you clarify your new requirement?

@gobengo
Copy link
Contributor Author

gobengo commented Feb 16, 2021

@taylorham @krpeacock @stanleygjones Ever wrote react without capital letters in filenames?

Ever banned capitalizing filenames in React project because 10+ years ago Windows default filesystem wasn't case sensitive?

@hansl
Copy link
Contributor

hansl commented Feb 17, 2021

What I've seen is some people importing (or using IDEs that didn't do the right thing) all-lowercase names and breaking on Linux only, for example. I'm totally fine with saying this is a user error.

Let's put it in an unwritten rule; if the name refer to something that is not case sensitive (e.g. a package name or a route), use kebab, otherwise it's fine to have capital letters? WDYT?

@gobengo
Copy link
Contributor Author

gobengo commented Feb 17, 2021

Let's put it in an unwritten rule; if the name refer to something that is not case sensitive (e.g. a package name or a route), use kebab, otherwise it's fine to have capital letters? WDYT?

Insofar as I understand what you're saying as "When it's ambiguous what mixed-case means, use lowercase", I'm supportive. 'route' could mean a few different things, some of which are case-sensitive, e.g. URIs.

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