-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
}, | ||
'gatsby-transformer-sharp', | ||
'gatsby-plugin-sharp', | ||
'gatsby-plugin-preact', |
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.
Preact breaks with React 18 installed, since Gatsby attempts to use the renderToPipeableStream
API that Preact does not have.
Ways to solve are:
- Remove Preact plugin
- Downgrade to React 17
I've opted for the first for now, I'll try the second and contrast the resulting sites in Lighthouse to see which is more performant between Preact and React 18.
content: [ | ||
'./src/**/*.js', | ||
'./src/**/*.jsx', | ||
'./src/**/*.ts', | ||
'./src/**/*.tsx' | ||
], | ||
darkMode: 'media', |
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.
Tailwind schema changed in an update
@@ -7,39 +7,15 @@ module.exports = { | |||
? `https://${process.env.HEROKU_APP_NAME}.herokuapp.com` | |||
: 'https://mlem.ai', | |||
twitterUsername: '@DVCorg', | |||
titleTemplate: '%s | MLEM' | |||
titleTemplate: '%s | MLEM', | |||
keywords: ['mlem'] |
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.
theme requires keywords
, we probably will want better ones.
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.
Studies show that keywords don't realy make a difference in the site. We can probably just add a couple like mlem
, ml
, and ml deployment
.
resolve: 'gatsby-plugin-manifest', | ||
options: { |
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.
Adding the theme to this site reminded me that manifest
is going to be pretty unique across even sites with the same theme, so I've removed it from the theme and it must be manually specified.
We can probably find a more streamlined way to handle the manifest and ensure it mandates all the fields we want (favicons come to mind)
Sorry for any notification spam that may have happened here, I was trying to get Gatsby Cloud to catch onto this pre-existing PR. Lessons learned:
|
Gatsby Cloud Build Reportmlem.ai 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 1m PerformanceLighthouse report
|
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.
Great job so far! The docs have definitely come a long way since the pr was first created. Minus a couple bugs I spotted, everything else looks to be working correctly!
@@ -0,0 +1,224 @@ | |||
import React, { useState, useEffect, useRef } from 'react' |
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.
src/@dvcorg/gatsby-theme-iterative/components/Documentation/Layout/index.tsx
Outdated
Show resolved
Hide resolved
Alright, we have lint checks and pass them, time to clean up the last few issues from @julieg18's review and we should be good to go! |
Question: where is the docs engine repo? Maybe we should move some questions, issues, etc. to it. E.g. #59 (comment) or #43 (comment). |
https://github.com/iterative/gatsby-theme-iterative, though many changes will be done in this PR and backported in the interest of speed. |
I get a 404. |
Sorry about that, I forgot that access was limited! I've added read permissions for the docs team on the theme repo, the same link should work now. |
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.
Found a couple of other small bugs and had a question about the CSS.
@@ -1,3 +1,4 @@ | |||
@custom-media --sm-scr (min-width: 414px); | |||
@custom-media --xs-scr (max-width: 572px); |
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.
If I'm understanding things correctly, the reason the mobile styles we're breaking was because the CSS in our docs theme relies on this media.css
?
If that's the case, shouldn't the CSS in the docs theme either use it's own media.css or just not have one at all if it's easier to impliment. The media.css that the docs theme normally relies on is very different from ours:
'--xxs-scr': '(max-width: 376px)',
'--xs-scr': '(max-width: 572px)',
'--sm-scr': '(max-width: 768px)',
'--md-scr': '(max-width: 1004px)',
'--lg-scr': '(min-width: 1005px)',
'--xl-scr': '(min-width: 1200px)'
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.
You're correct, this set of media queries was made as a compromise that fixes the breaks between the proper mobile-first tailwind
-based media queries on mlem.ai and the postcss-custom-media
queries from dvc.org that are mixed between max-width
and min-width
. The docs theme does need media queries since the docs themselves depend on them, but we definitely can use a more elegant implementation.
@@ -0,0 +1,224 @@ | |||
import React, { useState, useEffect, useRef } from 'react' | |||
import cn from 'classnames' |
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.
}} | ||
/> | ||
</div> | ||
<div className={styles.content}> |
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.
Shouldn't the entire company have read or even write permissions by default? |
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.
While we do have some bugs that need to get taken care of, since the engine is basically done, we should be good to merge as a first iteration!
@@ -0,0 +1,38 @@ | |||
# MLEM Documentation |
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 could keep this page as is or maybe put a note somewhere that the rest of the docs are coming soon 🤔
While there's still a few styling issues, we're pretty sure all the showstoppers have been handed so we've decided to merge this PR into mlem.ai and take care of the rest in follow-ups. This should make it easier to make more normal PRs both for us and @iterative/docs instead of keeping up the massive long-lived PRs like this and #43. |
I hadn't thought of that! I wasn't able to see other repo's permissions so I wasn't sure what the standard is. |
Extends #43
Adds
@dvcorg/gatsby-theme-iterative
, which includes all the code and assets of dvc.org's blog engine, along with a lot of opinions from dvc.org that break the site a bit.