-
Notifications
You must be signed in to change notification settings - Fork 29
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
Improve docs #12543
base: main
Are you sure you want to change the base?
Improve docs #12543
Conversation
|
||
> If you use nvm, you might find | ||
> [this gist](https://gist.github.com/sndrs/5940e9e8a3f506b287233ed65365befb) helpful. | ||
We recommend using [fnm](https://github.com/Schniz/fnm) to help manage multiple versions of Node.js on on machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not recommend asdf or nvm
@@ -39,7 +27,6 @@ $ make dev | |||
``` | |||
|
|||
`make dev` will start the development server on port 3030: [http://localhost:3030](http://localhost:3030). | |||
`make build && make start` will start the production server on port 9000: [http://localhost:9000](http://localhost:9000). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We very rarely need to do this
| `DISABLE_LOGGING_AND_METRICS` | Boolean. Toggle for enabling Log4js | | ||
|
||
Most of these variables are set by our make scripts and you don't need to worry about setting them. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to detailed setup
@@ -84,9 +59,6 @@ If you're new to JavaScript projects, if you're trying to integrate with other a | |||
|
|||
[Source](https://theguardian.design) is the Guardian's design system. For detailed and up-to-date information on how to use it, see the [Source guide](https://github.com/guardian/csnx/blob/main/docs/source/README.md). | |||
|
|||
For a high-level overview of some of the key ideas behind the design of the Dotcom website, see [design.theguardian.com](https://design.theguardian.com/). | |||
This resource was made in 2018 and is not maintained so it <strong>should not be taken as authoritative</strong> on details, but most of it still applies and it gives a very quick and visual overview. It also provides an explanation of some journalism- or Guardian-specific terms that you might see in the codebase, like 'kicker' and 'standfirst'. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is stale and will never be updated
|
||
After completing this setup guide, we would greatly appreciate it if you could complete our [dotcom-rendering setup | ||
questionnaire](https://docs.google.com/forms/d/e/1FAIpQLSdwFc05qejwW_Gtl3pyW4N22KqmY5zXoDKAUAjrkOwb2uXNcQ/viewform?vc=0&c=0&w=1). It should only take 3 minutes and will help us improve this documentation and the setup process in the future. Thank you! 🙏 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nobody has completed this form in over 4 years
|
||
- `pnpm prettier:check` → Checks for prettier issues | ||
- `pnpm prettier:write` → Checks and fixes prettier issues | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just the way DCR works. Deal.
If you prefer not to use an editor like VSCode then you can use the following commands to manage formatting and (try to fix) linting errors: | ||
|
||
- `make fix` → Checks and fixes prettier and linting issues | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mentioned elsewhere
Size Change: 0 B Total Size: 898 kB ℹ️ View Unchanged
|
|
||
<a href="https://www.chromaticqa.com/"><img src="https://cdn-images-1.medium.com/letterbox/147/36/50/50/1*oHHjTjInDOBxIuYHDY2gFA.png?source=logoAvatar-d7276495b101---37816ec27d7a" width="120"/></a> | ||
|
||
Thanks to [Chromatic](https://www.chromaticqa.com/) for providing the visual testing platform that helps us catch unexpected changes on time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chromatic used to offer us a free service if we called them out in our README. Since we now pay Chromatic handsomely, we no longer need to do this.
<a className={cx({ [activeLink]: isActive }, link)}>Click Me</a> | ||
); | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use cx
very much, certainly not enough to call it our code style
@@ -32,5 +32,3 @@ In DCR we support these conventions using [enhance-images.ts](/dotcom-rendering/ | |||
## How remove these enhancement functions | |||
|
|||
The construction of these functions has been done with the goal of removing them in mind. Where changes to elements have been needed they have been done in such a way as to be generic. For example, the special image titles used in photo essays are available for all images, on all article types. By doing this we create a design language that is more flexible so that if we later improve Composer to support, say, adding drop caps to any paragraph, or adding a title string to an image, then this will just work. | |||
|
|||
For more information on how and why we'd like to improve cleaners see: https://docs.google.com/document/d/1ESuP7jEOEdbqbJ3mwuBXJxt6wXuGv9_klP3e2JXfSQY/edit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc no longer exists
What does this change?
Why?
Screenshots