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

CamelCase naming convention? #47

Closed
qzchenwl opened this issue Sep 29, 2019 · 1 comment · Fixed by #963
Closed

CamelCase naming convention? #47

qzchenwl opened this issue Sep 29, 2019 · 1 comment · Fixed by #963
Milestone

Comments

@qzchenwl
Copy link

qzchenwl commented Sep 29, 2019

I see codes like:

  connect_completion() {
    // see https://github.com/jupyterlab/jupyterlab/blob/c0e9eb94668832d1208ad3b00a9791ef181eca4c/packages/completer-extension/src/index.ts#L198-L213
    const cell = this.widget.content.activeCell;
    this.set_completion_connector(cell);
    const handler = this.completion_manager.register({
      connector: this.current_completion_connector,
      editor: cell.editor,
      parent: this.widget
    });
    this.widget.content.activeCellChanged.connect((notebook, cell) => {
      this.set_completion_connector(cell);

      handler.editor = cell.editor;
      handler.connector = this.current_completion_connector;
    });
  }

The JupyterLab project's naming convention is CamelCase, eg.this.widget.content.activeCellChanged, it looks better if the extension code use the same naming convention.

@krassowski
Copy link
Member

Yes, it is planned, but this is low priority. I find the snake case easier to read and therefore used it for the extension at the prototyping phase; moreover, it allowed me to easily distinguish the code from the extension itself and classes extended by inheritance. As we are mostly past prototyping phase and most of the code is no longer inheriting from our dependencies I welcome the change, but I will postpone it to reduce merge conflicts.

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

Successfully merging a pull request may close this issue.

2 participants