Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ little bit helps, and credit will always be given.
- [Merging](#merging)
- [Post-merge Responsibility](#post-merge-responsibility)
- [Design Guidelines](#design-guidelines)
- [Capitalization guidelines](#capitalization-guidelines)
- [Sentence case](#sentence-case)
- [How to refer to UI elements](#how-to-refer-to-ui-elements)
- [\*\*Exceptions to sentence case:](#exceptions-to-sentence-case)
Copy link
Member Author

Choose a reason for hiding this comment

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

Updates from Markdown formatter

- [Managing Issues and PRs](#managing-issues-and-prs)
- [Reporting a Security Vulnerability](#reporting-a-security-vulnerability)
- [Revert Guidelines](#revert-guidelines)
Expand Down Expand Up @@ -76,6 +80,7 @@ little bit helps, and credit will always be given.
- [Translating](#translating)
- [Enabling language selection](#enabling-language-selection)
- [Extracting new strings for translation](#extracting-new-strings-for-translation)
- [Updating language files](#updating-language-files)
- [Creating a new language dictionary](#creating-a-new-language-dictionary)
- [Tips](#tips)
- [Adding a new datasource](#adding-a-new-datasource)
Expand Down Expand Up @@ -259,9 +264,11 @@ Finally, never submit a PR that will put master branch in broken state. If the P
### Capitalization guidelines

#### Sentence case
Use sentence-case capitalization for everything in the UI (except these **).

Use sentence-case capitalization for everything in the UI (except these \*\*).

Sentence case is predominantly lowercase. Capitalize only the initial character of the first word, and other words that require capitalization, like:

- **Proper nouns.** Objects in the product _are not_ considered proper nouns e.g. dashboards, charts, saved queries etc. Proprietary feature names eg. SQL Lab, Preset Manager _are_ considered proper nouns
- **Acronyms** (e.g. CSS, HTML)
- When referring to **UI labels that are themselves capitalized** from sentence case (e.g. page titles - Dashboards page, Charts page, Saved queries page, etc.)
Expand All @@ -272,10 +279,12 @@ Title case: "A Dog Takes a Walk in Paris"
Sentence case: "A dog takes a walk in Paris"

**Why sentence case?**

- It’s generally accepted as the quickest to read
- It’s the easiest form to distinguish between common and proper nouns

#### How to refer to UI elements

When writing about a UI element, use the same capitalization as used in the UI.

For example, if an input field is labeled “Name” then you refer to this as the “Name input field”. Similarly, if a button has the label “Save” in it, then it is correct to refer to the “Save button”.
Expand All @@ -293,7 +302,7 @@ Often a product page will have the same title as the objects it contains. In thi
- Queries that you save will appear on the Saved queries page
- Create custom queries in SQL Lab then create dashboards

#### **Exceptions to sentence case:
#### \*\*Exceptions to sentence case:

- Input labels, buttons and UI tabs are all caps
- User input values (e.g. column names, SQL Lab tab names) should be in their original case
Expand Down Expand Up @@ -464,7 +473,7 @@ Frontend assets (TypeScript, JavaScript, CSS, and images) must be compiled in or

##### nvm and node

First, be sure you are using recent versions of NodeJS and npm. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your node environment:
First, be sure you are using recent versions of Node.js and npm. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage your node environment:

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
Expand All @@ -476,6 +485,12 @@ nvm use

For those interested, you may also try out [avn](https://github.com/nvm-sh/nvm#deeper-shell-integration) to automatically switch to the node version that is required to run Superset frontend.

We have upgraded our `package-lock.json` to use `lockfileversion: 2` from npm 7, so please make sure you have installed npm 7, too:

```bash
npm install -g npm@7
```

#### Install dependencies

Install third-party dependencies listed in `package.json` via:
Expand Down Expand Up @@ -837,7 +852,7 @@ To convert all PO files to formatted JSON files you can use the `po2json.sh` scr
```

If you get errors running `po2json`, you might be running the Ubuntu package with the same
name, rather than the NodeJS package (they have a different format for the arguments). If
name, rather than the Node.js package (they have a different format for the arguments). If
there is a conflict, you may need to update your `PATH` environment variable or fully qualify
the executable path (e.g. `/usr/local/bin/po2json` instead of `po2json`).
If you get a lot of `[null,***]` in `messages.json`, just delete all the `null,`.
Expand Down Expand Up @@ -895,6 +910,9 @@ yarn build
Then use `npm link` to create symlinks of the plugins/superset-ui packages you want to edit in `superset-frontend/node_modules`:

```bash
# Since npm 7, you have to install plugin dependencies separately, too
cd ../../superset-ui/plugins/[PLUGIN NAME] && npm install --legacy-peer-deps

cd superset/superset-frontend
npm link ../../superset-ui/plugins/[PLUGIN NAME]

Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ RUN cd /app \
######################################################################
FROM node:12 AS superset-node

ARG NPM_VER=7
RUN npm install -g npm@${NPM_VER}

ARG NPM_BUILD_CMD="build"
ENV BUILD_CMD=${NPM_BUILD_CMD}

Expand Down
Loading