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

[WIP] Gatsby migration #1025

Merged
merged 46 commits into from
Mar 17, 2020
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1750b88
Move static pages to gatsby
iAdramelk Feb 26, 2020
18ba74a
In-progress docs page migration
iAdramelk Feb 28, 2020
2f08a9a
Add syntax highlingting and dvc-syntax
iAdramelk Mar 2, 2020
50cb710
Add external link marker
iAdramelk Mar 2, 2020
fc4fe51
Rewrite LocalLink without deprecated methods
iAdramelk Mar 2, 2020
13b7445
Fix non-working links in sidebar
iAdramelk Mar 2, 2020
0105f47
Move remark-linker to backend
iAdramelk Mar 2, 2020
8234008
Make syntax highlight work
iAdramelk Mar 3, 2020
ebb91fa
Ignore testes in .cache in jest
iAdramelk Mar 3, 2020
9ed2054
Fix lint errors
iAdramelk Mar 3, 2020
a2153b6
Make custom react ccomponents work in markdown
iAdramelk Mar 5, 2020
eede61f
Remove old markdown component
iAdramelk Mar 6, 2020
337c0ee
Fix button colors
iAdramelk Mar 6, 2020
e846001
Fix paths in learn block
iAdramelk Mar 6, 2020
ba1b3f7
Add middleware for API
iAdramelk Mar 6, 2020
2109582
Add middleware for redirects
iAdramelk Mar 6, 2020
5c8a420
Add simple Express server with middlewares
iAdramelk Mar 6, 2020
d496c3e
Update path to docs in edit link
iAdramelk Mar 10, 2020
847b997
Add title to the doc pages
iAdramelk Mar 10, 2020
95d2289
Rename middleware folder
iAdramelk Mar 10, 2020
8efa638
Remove unneeded comment
iAdramelk Mar 10, 2020
68459d2
Removed unneded prop
iAdramelk Mar 10, 2020
d662217
Add public for jest ignore path
iAdramelk Mar 10, 2020
5a6f23c
Add res.end to redirects
iAdramelk Mar 10, 2020
e65b415
Add env to jest config
iAdramelk Mar 10, 2020
46beb32
Uncomment manifest and favicons generation
iAdramelk Mar 13, 2020
29e957d
Add redirects for non-existent pages
iAdramelk Mar 13, 2020
2756e82
Remove react-syntax-highlighter from package.json
iAdramelk Mar 13, 2020
6fb5fa8
Fix typo
iAdramelk Mar 13, 2020
24caaf3
Add new commants to dvc commands list
iAdramelk Mar 13, 2020
298e4d6
Add newline to .gitignore
iAdramelk Mar 13, 2020
a20558b
Add return to redirects middware to prevent calling next()
iAdramelk Mar 13, 2020
ce55f58
Fix next links
iAdramelk Mar 13, 2020
4eb952c
Add 307 status for docs’ redirects
iAdramelk Mar 13, 2020
6571197
Add dvc highlingter to snippet
iAdramelk Mar 16, 2020
abc5cfa
Add 404 page
psdcoder Mar 16, 2020
0b68d2c
Fix visibility calculation for community's sections on mobiles
psdcoder Mar 16, 2020
f7845fb
Add handler for anchor navigation
psdcoder Mar 16, 2020
71209eb
Fix hover issues for community dropdown in the main navigation
psdcoder Mar 16, 2020
19ed779
Fix path for SEO component in the 404 page
psdcoder Mar 16, 2020
36230b6
Fix paths list for 'lint-check' package script
psdcoder Mar 16, 2020
d03beca
Add missing api-reference docs
psdcoder Mar 17, 2020
d22140b
Make two layouts: one main and one for docs. Use these layouts in Ga…
psdcoder Mar 17, 2020
17ce028
Handle trailing slash in the doc's sidebar menu
psdcoder Mar 17, 2020
2835251
Fix incorrect layout for 404 page
psdcoder Mar 17, 2020
f89b450
Merge branch 'master' into gatsby-migration
shcheklein Mar 17, 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
8 changes: 6 additions & 2 deletions src/components/DocLayout/SidebarMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,18 @@ export default function SidebarMenu({ id, sidebar, currentPath, onClick }) {
})
}

const node = document.getElementById(currentPath)
const node = document.getElementById(currentPath.replace(/\/$/, ''))
shcheklein marked this conversation as resolved.
Show resolved Hide resolved
const parent = document.getElementById(id)

setIsScrollHidden(true)

const timeout = setTimeout(() => {
psRef.current.update()
scrollIntoView(node, parent, { onlyScrollIfNeeded: true })

if (node && parent) {
scrollIntoView(node, parent, { onlyScrollIfNeeded: true })
}

setIsScrollHidden(false)
}, 400)

Expand Down