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 new Gatsby Documentation Website fixes #3296 #3978

Merged
merged 27 commits into from
Mar 14, 2017

Conversation

KyleAMathews
Copy link
Contributor

Heya folks! Did some initial work on getting the new Keystone docs website running to kick off the conversation about that. Lemme know what you think plus report any bugs you see.

Check it out at https://advisor-otter-67205.netlify.com/

We discussed offline hosting the site on Netlify. Once that's going then we'll have continuous deployment of the site going from all pushes to Github.

@bassjacob
Copy link
Contributor

Hey 😄

I think it looks pretty great. Feels very smooth and responsive.

Not sure if it's a bug, or just my browser, but the menu area feels a little constrained, esp with the non-functional scrollbars present?

scr1

I'm on a 15 inch screen at 1920*1080, and it feels a little pinched, but again, that might just be my machine.

Feature request wise, what do you think about linking headings on the page as well as other pages?

@KyleAMathews
Copy link
Contributor Author

@bassjacob what OS/browser are you using? The scrollbars don't show up on my machine. Haven't tested it on non-mac/non-chrome yet.

@bassjacob
Copy link
Contributor

bassjacob commented Feb 8, 2017

Archlinux and chrome, but all sorts of customisation, so if it's not showing up for you, it's very possibly something on my end.

If I change overflow: scroll to overflow: hidden on the sidebar nav it removes them, but that obviously isn't a solution here 😛

@jstockwin
Copy link
Contributor

Hey, this looks awesome, thanks!

I'm having the same issue with the scrollbars as Jacob, using Windows 10. Happens in Chrome, Firefox and Edge.

It also looks like you've got quite a few linting errors, which is why the build fails. Whatever you're working in has changed tabs to spaces, for example. eslint . --fix might sort out a fair amount of these if you're lucky.

@KyleAMathews
Copy link
Contributor Author

KyleAMathews commented Feb 8, 2017 via email

@KyleAMathews
Copy link
Contributor Author

Pushed a change which the internetz tells me which fix the scrollbars issue (use only overflow-y and add padding-right). Let me know if things are working! I'll fix the linting issue later.

@jstockwin
Copy link
Contributor

For me you've fixed the horizontal scroll bar at the bottom, but not the vertical one along the side.

@KyleAMathews
Copy link
Contributor Author

Instead of using display: fixed; overflow-y: scroll, I switched to using react-stickynode which does some fancy stuff to make a nice working sticky node. Things look good now?

https://advisor-otter-67205.netlify.com/guides/how-to-send-emails/

@jstockwin
Copy link
Contributor

Yeah, that's worked, LGTM.

@KyleAMathews
Copy link
Contributor Author

@bassjacob oh just noticed your comment on linking headers — that's already done (or should be) — the headers only show up when hovering like on Github.

@Noviny
Copy link
Contributor

Noviny commented Feb 17, 2017

@KyleAMathews Super excited to see this coming along!

Just wanted to make sure you knew, all the docs from the old website have already been markdownified over here: https://github.com/keystonejs/keystone/tree/website-doc-conversion/docs/website

If you want, I'm happy to work to make these usable for you as part of this 🙂

@KyleAMathews
Copy link
Contributor Author

@Noviny hey great! Perhaps just cherry-pick your commit into my branch?

@KyleAMathews
Copy link
Contributor Author

Or is there more work needed to make these pages usable?

@Noviny
Copy link
Contributor

Noviny commented Feb 18, 2017

@KyleAMathews The docs need updating, but I'd rather have them in here, and then PR changes into this branch as a single source of docs.

@Noviny
Copy link
Contributor

Noviny commented Feb 20, 2017

@KyleAMathews actually, I might update those docs and make a PR into your branch, if that's alright with you.

@KyleAMathews
Copy link
Contributor Author

KyleAMathews commented Feb 20, 2017 via email

@Noviny
Copy link
Contributor

Noviny commented Feb 21, 2017

@KyleAMathews Just wondering how easy it would be to pull in the field type documentation from where it currently is in the repo.

Currently each field has its documentation in fields/types/{typename}/readme.md, and it would be great to pull the field types and links to them out into the sidebar, but wasn't sure if there was an easy way forward with where they're currently located.

@KyleAMathews
Copy link
Contributor Author

@Noviny very straightforward — this is exactly what I'm doing with the WIP gatsby website for the various gatsby plugins — http://gatsbyjs.netlify.com/docs/plugins/

@KyleAMathews
Copy link
Contributor Author

Just added two new Gatsby plugins to the site, gatsby-plugin-offline, and gatsby-plugin-manifest. With these, the site now works offline! Kinda fun/useful for a docs site.

https://advisor-otter-67205.netlify.com/

@KyleAMathews
Copy link
Contributor Author

Thanks @Noviny for the PR! Merged and pushed the changes to the test website. It brought over documentation from the old site plus we're now pulling in READMEs from the fields.

Note that if you've opened the new site since I added service workers, you'll have to load the site, close the tab, and then open it again to see the changes. I'm planning on adding in the future a toaster that pops up whenever a new update has loaded.

Also it looks like stickynode is a bit buggy with a longer menu.

https://advisor-otter-67205.netlify.com/

@KyleAMathews
Copy link
Contributor Author

@Noviny I just noticed that since field pages are missing their title (since they don't have frontmatter). One solution would be to add heading { value } to the query to get the first header and then use that to set the title. If that turns out to be the best solution, I could add a limit argument to heading so we don't have to get every heading.

@Noviny
Copy link
Contributor

Noviny commented Feb 21, 2017

@KyleAMathews I was actually thinking of adding frontmatter to all the fields for ease of use, as well as some fields are being deprecated, and it would be good to be able to drop them to a second list, rather than the main list with a flag in the docs, which I assume would go in the frontmatter.

Though speaking of subheadings, we'll probably need to decide if we want to split some of the longer guides up, or whether we want to get nested menu items in the sidebar, such as displaying some of the H2s.

@KyleAMathews
Copy link
Contributor Author

@Noviny the downside to adding frontmatter to READMEs is it renders weird in Github (plus perhaps NPM). Another option for getting the title plus adding info about whether something is deprecated is to just put that in the package.json. Gatsby can query that info as well.

@Noviny
Copy link
Contributor

Noviny commented Feb 22, 2017

@KyleAMathews Ah yeah, the github view. Probably better to grab the h1 then.

@KyleAMathews
Copy link
Contributor Author

Switched to using react-custom-scrollbars — http://malte-wessel.github.io/react-custom-scrollbars/

This lets us return to just using a fixed scrollable container (far superior UX to stickynode) but by using custom scrollbars, it should auto-hide on windows/linux.

@bassjacob @jstockwin how do things look now? You might need to hard refresh to see the latest version.

https://advisor-otter-67205.netlify.com/

@jstockwin
Copy link
Contributor

@KyleAMathews Looks good to me!

@bassjacob
Copy link
Contributor

@KyleAMathews looks much cleaner!

@Noviny Noviny changed the base branch from master to docs March 14, 2017 03:09
@Noviny Noviny merged commit 6734f61 into keystonejs:docs Mar 14, 2017
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 this pull request may close these issues.

4 participants