-
Notifications
You must be signed in to change notification settings - Fork 3
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
Switch to apollo #13
Switch to apollo #13
Conversation
…omes with react-apollo)
Oooh, |
imports/server/parse.js
Outdated
@@ -12,11 +12,15 @@ export function parseMD(md) { | |||
|
|||
const contentBlocks = parseContentBlocks(content, metadata); | |||
|
|||
// these lines have already been used to create the introduction step, | |||
// remove them from the step root | |||
const { lineStart, lineEnd, ...cleanMetadata } = metadata; |
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.
in reference to #11
imports/components/Tour.js
Outdated
} | ||
|
||
render() { | ||
const { location, tour } = this.props; | ||
|
||
const [tourAuthor] = tour.repository.split('/'); |
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.
I'm starting to simplify the components, more work to do on them later 💯 (💅?)
imports/components/Tour.js
Outdated
); | ||
|
||
export default compose(withTour, displayLoadingState, displayNotFoundState, withMutation, pure)( | ||
Tour |
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.
prettier
🙄
It's a really cool tool, but sometimes I feel like it gets crazy (especially with gql
) -> weird indentation
@@ -15,5 +15,4 @@ | |||
</head> | |||
|
|||
<body> | |||
<div id="root"></div> |
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 one tricked me 🙄 "why the hell do I have two pages?" 😄
add index to step schema; clean stuff: collection helpers, components methods
}), | ||
{ | ||
configServer: server => { | ||
server.use('/graphql', OpticsAgent.middleware()); |
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.
imports/components/Tour.js
Outdated
// basic *forced* update, we shouldn't do that normally (automatic update) | ||
// note: tried without, it's not really updating the ui, maybe it's because | ||
// of how we are doing our mutation? | ||
refetchQueries: ['getTourWithSteps'], |
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.
💡 makes sense! we remove and then insert the tour, so the _id
changes and so the store freaks out! 🌮 🎉 fixing that.
* perform upserts on tour & steps when importing * the upserts keep track of the `_id` ➡️ no need of brutal refetchQueries for `getTourWithSteps` ; also use smooth updateQueries instead of refetchQueries on Sidebar * rename some variables & keys when parsing ➡️ more readability, clean resolvers & schema
🎈 Ready to take offWe have a fancy GraphQL layer handling our tours & steps 💃 Server-side capabilities
Data loading from the UI
Next steps (by documenting ideas/issues)We have two types of users: the writer ✍️ and the reader 👀 (..... who can become a 🗣!) We have room for a lot of crazy interesting stuff here! 🚀 On the ✍️ experience, we could improve how we parse files and provide more guidance / helpful errors / more automatic flow (#1) ? Also supporting images could be great (#2) On the 👀 experience, we could improve the navigation between steps with key controls, making sections/code easier to read (#6). ➡️ All this to lead to an awesome code documentation / presentation tool! And in fact there is another kind of users: the contributors When this PR is merged I'm really into adding storybook and simplify components. In this process, I'm in favor of using
I'm thinking also about:
Yay, here are the things that comes through my head at the moment 🦆 (emoji the closest to a parrot)! What do you think? |
* augment step type with previous / next * use the real step index when displaying the tour
Shall I merge dat? I've already started something for the new components on simpler-components branch |
@xavcz hey, this looks awesome - going to merge and deploy. Sorry I've been slow on this, got hit like a truck by the Apollo 1.0 release :] |
@xavcz BTW I set up Optics on the |
I did have to re-import all of the tours after deploying, but it seems to work fine now :] |
🎉🎉 that rocks! No bother for the wait, congrats to you and the team for delivering it!! Great job 🎩 I have commit right but I'm not in the party parrot organization, can you add me please? 😁 |
Done! |
WIPedit: ⬇️ see below