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

Migrate codebase to Typescript and CSS Modules #1106

Merged
merged 51 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
19ae153
Move blog's components under Blog namespace
psdcoder Apr 1, 2020
5edd0de
Restructure components
psdcoder Apr 1, 2020
421dae7
Allow to scroll smoothly in the scrollIntoLayout util function
psdcoder Apr 1, 2020
06ad93a
Replace styled-reset to reset-css. Merge global styles. Use local cla…
psdcoder Apr 1, 2020
f069e21
Refactor Home page components to TS
psdcoder Apr 2, 2020
c9922da
Remove duplicated component - TrySection and replace it with PromoSec…
psdcoder Apr 2, 2020
22da091
Refactor SubscribeSection to get rid of linter warning
psdcoder Apr 2, 2020
ab5712a
Extend scroll utils
psdcoder Apr 2, 2020
625cdc7
Create one common component for buttons with two rows: TwoRowButton. …
psdcoder Apr 2, 2020
dacaf66
Refactor Support page components to TS
psdcoder Apr 2, 2020
d05da29
Fix scroll for no-hash links
psdcoder Apr 3, 2020
b47d227
Disable trailing slash redirects for dev mode
psdcoder Apr 3, 2020
63e46e1
Refactor Features page components to TS
psdcoder Apr 3, 2020
da284d1
Refactor Community page components to TS
psdcoder Apr 3, 2020
4664a05
Refactor Documentation layout components to TS
psdcoder Apr 3, 2020
1bdb86a
Refactor remaining Documentation components to TS
psdcoder Apr 6, 2020
251514d
Refactor root html file to TS
psdcoder Apr 7, 2020
113bfba
Get rid of styled-components
psdcoder Apr 7, 2020
c826e3e
Add util for handling keyboard events to follow DRY
psdcoder Apr 7, 2020
87153d3
Remove hack from SearchForm to avoiding loading conflict with mailchi…
psdcoder Apr 7, 2020
b2ebdf5
Refactor front utils to TS
psdcoder Apr 7, 2020
86fcc63
Remove temporary rule from eslint config
psdcoder Apr 7, 2020
835cc51
Refactor Link component to use redirected urls as href
psdcoder Apr 7, 2020
e8a2492
Remove !important rules from ShowOnly styles
psdcoder Apr 7, 2020
7a30eb2
Split utils by using on front and shared
psdcoder Apr 7, 2020
ebc8216
Refactor gatsby-node to separate utils
psdcoder Apr 7, 2020
2ff0f2d
Update @react/portal package. Remove our custom Portal component
psdcoder Apr 7, 2020
7c5bfa1
Update linters and reformat code accordingly to new rules
psdcoder Apr 7, 2020
fa1147a
Update babel & webpack related packages
psdcoder Apr 7, 2020
e79c55f
Update react related packages
psdcoder Apr 7, 2020
1e41542
Update gatsby-related packages
psdcoder Apr 7, 2020
5c00c97
Update remaining packages
psdcoder Apr 7, 2020
f3a7892
Another try to fix hash navigation
psdcoder Apr 7, 2020
5c6107b
Make tsconfig more stricter. Remove wrong eslint rule and refactor al…
psdcoder Apr 8, 2020
0ae12ff
Toggle mobile menu only in mobile version
psdcoder Apr 8, 2020
d142b35
Fix Algolia's dropdown position
psdcoder Apr 8, 2020
f2c4326
Fix Get Started button for the mobile version of main page
psdcoder Apr 8, 2020
ffa3e21
Align buttons in PromoSection component for mobile view
psdcoder Apr 8, 2020
d4b941e
Fix comments blog rendering
psdcoder Apr 8, 2020
1b1e3c6
Fix share buttons overlapping
psdcoder Apr 8, 2020
1eb4d42
Fix line height for main page sections titles
psdcoder Apr 8, 2020
a96f30b
Fix some styles for the main page
psdcoder Apr 8, 2020
a4b2a58
Fix styles of RightPanel
psdcoder Apr 8, 2020
7e06bdc
Change styles of docs abbr tooltip a little bit
psdcoder Apr 8, 2020
368e7f4
Fix initial scrolling in the RightPanel
psdcoder Apr 8, 2020
37ab5b4
Fix wrong tagname
psdcoder Apr 8, 2020
724cb7e
Fix scroll in the left sidebar
psdcoder Apr 8, 2020
0d748ec
Move src/utils/node to src/gatsby
psdcoder Apr 8, 2020
7a35301
Fix animation for doc pages
psdcoder Apr 8, 2020
889f7ba
Fix styles for abbr tooltip
psdcoder Apr 8, 2020
56078f7
Fix svg images in the blog
psdcoder Apr 8, 2020
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
12 changes: 7 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,22 @@
{ "prefixWithI": "always" }
],
"no-tabs": "error",
"react/prop-types": "off", // Props should be described as TS types
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-var-requires": "warn"
"react/prop-types": "off" // Props should be described as TS types
},
"overrides": [
{
"files": [
"src/utils/**/*.?(js|ts)",
"src/utils/shared/*.?(js|ts)",
"src/gatsby/**/*.js",
"src/components/PageWrapper/index.js",
"scripts/**/*.js",
"src/server/**/*.js",
"plugins/**/*.js",
"gatsby-*.js"
],
"rules": {
"@typescript-eslint/no-var-requires": "off"
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off"
}
}
]
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
name: Bug or improvement report
about: Create a report to help us improve

---
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
name: Feature request
about: Suggest an idea for this project

---
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.cache/
.github
public/
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"semi": false,
"arrowParens": "avoid",
"singleQuote": true,
"trailingComma": "none",
"printWidth": 80,
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ignoreProperties": ["composes"]
}],
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["global"]
"ignorePseudoClasses": ["global", "local"]
}],
"at-rule-no-unknown": [true, {
"ignoreAtRules": ["mixin"]
Expand Down
Empty file removed .tmp-empty-package/index.d.ts
Empty file.
6 changes: 0 additions & 6 deletions .tmp-empty-package/package.json

This file was deleted.

1 change: 1 addition & 0 deletions config/postcss/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const screens = {
}

module.exports = {
screens,
customMedia: {
'--xxs-scr': `(max-width: ${screens.phone}px)`,
'--xs-scr': `(max-width: ${screens.phablet}px)`,
Expand Down
27 changes: 27 additions & 0 deletions config/postcss/mixins.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { customMedia } = require('./media')

const focus = {
'&:focus': {
color: 'var(--color-orange)',
Expand Down Expand Up @@ -75,6 +77,31 @@ module.exports = {
'font-size': '16px',
'line-height': '25px'
},
columns: {
display: 'flex',
'flex-direction': 'row',
'flex-flow': 'wrap',
'justify-content': 'space-between',

[`@media ${customMedia['--sm-scr']}`]: {
'flex-direction': 'row'
},

[`@media ${customMedia['--xs-scr']}`]: {
'justify-content': 'center'
}
},
column: {
'flex-basis': '33.3%',

[`@media ${customMedia['--sm-scr']}`]: {
'flex-basis': '50%'
},

[`@media ${customMedia['--xs-scr']}`]: {
'flex-basis': '100%'
}
},
link: {
'text-decoration': 'none',
color: 'var(--color-blue)',
Expand Down
1 change: 1 addition & 0 deletions config/prismjs/dvc-hook.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-env node */

const Prism = require('prismjs')
Expand Down
4 changes: 2 additions & 2 deletions content/docs/command-reference/move.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ $ tree

## Example: change an imported directory name and location

Let's try the same with an entire directory imported from an external <abbd>DVC
repository</abbd> with `dvc import`. Note that, as in the previous cases, the
Let's try the same with an entire directory imported from an external <abbr>DVC
repository</abbr> with `dvc import`. Note that, as in the previous cases, the
DVC-file is also moved.

```dvc
Expand Down
3 changes: 1 addition & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const plugins = [
}
},
'gatsby-plugin-postcss',
'gatsby-plugin-styled-components',
'gatsby-plugin-react-helmet',
'gatsby-plugin-sitemap',
'gatsby-plugin-twitter',
Expand Down Expand Up @@ -60,7 +59,6 @@ const plugins = [
},
resolve: 'gatsby-remark-prismjs'
},
'gatsby-remark-copy-linked-files',
{
resolve: 'gatsby-remark-smartypants',
options: {
Expand All @@ -74,6 +72,7 @@ const plugins = [
}
},
'gatsby-remark-relative-images',
'gatsby-remark-copy-linked-files',
{
resolve: 'gatsby-remark-external-links'
},
Expand Down
Loading