-
Notifications
You must be signed in to change notification settings - Fork 67
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
Question link #63
Question link #63
Conversation
- Added link to GitHub repo for those who need help or have suggestions to improve the lessons - TODO: Improve styling
- Build the link to a new issue programmatically, including the lesson name, number, and path in the issue title and some questions we hope the user will answer in the body. - Remove request for user to copy URL, since we now are providing this automagically. - TODO: Not sure how to match max width of lesson box, though the text here is no longer wide enough for this to matter. - TODO: Create a specific GitHub issue template to use for questions originating from this lesson page, so that nicer formatting can be used in the body. (Don't know how to create line breaks in the current parameter format.)
@terichadbourne thanks! Pls can you drop a screenshot of what you expect to see on any PR with a visual change, so when we run it, we know that we're on the same page. |
src/components/Lesson.vue
Outdated
@@ -194,6 +200,10 @@ export default { | |||
lessonNumber: function () { | |||
return this.$route.path.slice(this.$route.path.lastIndexOf('/') + 1) | |||
}, | |||
issueURL: function () { | |||
let Url = "https://github.com/ipfs-shipyard/proto.school/issues/new?labels=question&title=Question+on+Lesson+" + this.lessonNumber + ": " + this.lessonTitle + " (" + this.$route.path + ")&body=Have+a+question+or+suggestion+regarding+a+ProtoSchool+lesson?+Share+it+here!+We've+noted+the+lesson+your+question+refers+to+in+the+title+of+this+issue.+Please+tell+us+what's+confusing+about+this+lesson.+What+additional+context+could+we+provide+to+help+you+succeed?+What+other+feedback+would+you+like+to+share+about+ProtoSchool?" |
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.
Cool! I didn't know you could configure github issues from the url!
With +
used in the string and to join it together, this would be mildy more readable as a template string like:
let Url = "https://github.com/ipfs-shipyard/proto.school/issues/new?labels=question&title=Question+on+Lesson+" + this.lessonNumber + ": " + this.lessonTitle + " (" + this.$route.path + ")&body=Have+a+question+or+suggestion+regarding+a+ProtoSchool+lesson?+Share+it+here!+We've+noted+the+lesson+your+question+refers+to+in+the+title+of+this+issue.+Please+tell+us+what's+confusing+about+this+lesson.+What+additional+context+could+we+provide+to+help+you+succeed?+What+other+feedback+would+you+like+to+share+about+ProtoSchool?" | |
let url = `https://github.com/ipfs-shipyard/proto.school/issues/new?labels=question&title=Question+on+Lesson+${this.lessonNumber}: ${this.lessonTitle} (${this.$route.path})&body=Have+a+question+or+suggestion+regarding+a+ProtoSchool+lesson?+Share+it+here!+We've+noted+the+lesson+your+question+refers+to+in+the+title+of+this+issue.+Please+tell+us+what's+confusing+about+this+lesson.+What+additional+context+could+we+provide+to+help+you+succeed?+What+other+feedback+would+you+like+to+share+about+ProtoSchool?" |
Also, uppercase first letter for variable names often implies it's a constructor or some global or module, so best to lowercase this one as url
Thanks for the great feedback, @olizilla. I'll work on those updates. Here's the visual change expected, the addition of this sentence/link under the exercise box on every lesson page on the site: |
- Use template string for improved readability of issueUrl - Add formatting to issue body - Change `Url` to `url` and `imageURL` to `imageUrl` to meet standards
My latest commit to this branch should address all the issues that @olizilla flagged, as well as adding encoded formatting to the body of the new issue. @mikeal suggested that I create the If I instead try Do I need to adjust some
(What's been committed is the working code before attempting this maneuver, not the failed maneuver.) |
- Set a max width on the section containing the issue link to ensure it doesn't get wider than the exercise box should we later change its text. - Use <p> tags around this wording.
@olizilla I also just implemented the max width on that footnote section as we discussed. Let me know if you had something else in mind. |
- Create the issueUrl in `data: self` instead of in `computed` - Although it currently works, I can't figure out any way to access the `lessonNumber` that lives in `computed`, nor to make a functional `lessonNumber` live in `data: self` so I can pull it from there. I had to rebuild the whole thing within the `issueUrl`, so it adds more code to the template string.
I'd just go with the |
Resolve merge conflicts, pulling Mikeal's recent changes from the `fix-output` branch that were already merged into `master` branch
- Change success message from "All works!" to "Everything works!" - Addresses issue #65
This branch now also addresses issue #65, correcting a grammar issue in success messages. |
- Remove comment lines from earlier merge
- Addresses issues #64 & #38, in which the the "Next" button appeared on the last lesson in a series and directed the user to a non-existent subsequent lesson. This is resolved by now showing instead a "More Workshops" button that goes back to the main list of all workshops so the user can choose what they'd like to do next. - In `Lesson.vue`, change the conditionals for success buttons to include an option (when the solution is correct and `last` has a value of ``"true"`) that loads a button with the text "More Workshops," bound to a new function `workshopMenu` that clears the output and directs the user to the main page, rather than incrementing the lesson number. - In Basics lesson 3 and Blog lesson 7 (the last of each series), follow the steps listed below. - WHEN CREATING THE LAST LESSON OF A NEW WORKSHOP: Add `last="true"` to the values being passed to the Lesson component. Use the success message "Great job! You've completed this series of lessons!" or something else that makes it clear this was the last lesson in the series. The button will populate automatically.
@olizilla Would you have a minute tomorrow to test this updated
|
- change "ipld" to "ipfs" in `ipfs.dag.put()` - change "array" to "an array"
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.
Good stuff. Very minor change suggestions.
src/components/Lesson.vue
Outdated
<section class="indent-1 mb4 mw-900"> | ||
<div> | ||
<p>Feeling stuck? We'd love to hear what's confusing so we can improve | ||
this lesson. Please <a :href="issueUrl">share your questions and feedback</a>.</p> |
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 would be more friendly if it opens github in a new tab, as we don't currently preserve your state across page reloads... right now if you click on it, your answer is lost.
<a :href="issueUrl" target="_blank">
src/lessons/Basics/03.vue
Outdated
@@ -37,7 +38,7 @@ const validate = async (result, ipfs) => { | |||
} | |||
|
|||
if (result.value === 1 && result.remainderPath === '') { | |||
return {success: 'Great job!'} | |||
return {success: "Great job! You've completed this series of lessons!"} |
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.
minor, but we're using singlequotes '
for strings in this project. The bigger issue is we should have CI checks and code linting as part of the PR process, but that's an issue for another PR!
src/lessons/Blog/07.vue
Outdated
@@ -170,7 +171,7 @@ const validate = async (result, ipfs) => { | |||
} catch (err) { | |||
return {fail: `Your function threw an error: ${err}.`} | |||
} | |||
return {success: 'All works!'} | |||
return {success: "Great job! You've completed this series of lessons!"} |
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.
single quotes again
Great suggestions, @olizilla! I'll fix those items. I really appreciate you clueing me in to the nuances of formatting choices we're trying to be consistent with in the code across the repo. |
Actually, @olizilla, I just remembered why I used double quotes there, and it's because that string includes an apostrophe in |
- In `Lesson.vue`, add `target="_blank"` to link so that when a user clicks the link to log an issue about a question they have, their original window stays open and anything they've typed in the exercise box isn't lost.
- Use backticks for template string instead of double quotes when the string needs to include an apostrophe in the success message for lessons Basics 3 and Blog 7
@terichadbourne I don't think we have anything set up to auto deploy this code yet, so it won't appear on the live site until it's manually updated. There is an issue to fix that #18 and another to fix the CI testing setup #71 |
@mikeal can you take a look at the CI/CD stuff when you get well? also, get well sir! |
Added a message to the bottom of the lesson template that encourages users to submit their questions/feedback on the lesson, linking to a new issue with the lesson number / title / path pre-filled and a body that explains the type of feedback we'd appreciate.
Addresses issues #45 and #42.