-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Feature: objectives and tasks oh my #1218
Conversation
this is temporary - we probably want to not just use codefencing and use commented out hugo shortcodes so the task lists still work on github. However we also don't want this sort of glob of code and it makes sense to rationalise all these various ways of getting objectives in order to make the success page cleaner. But that's a task for a clearer head than I currently have, so here, a quick fix so annotation can proceed without breaking the build
tasks shows up in the same place on the block, but doesn't come through to success
now for issues...
they won't show up in success any more
1. use graphql instead of rest 2. produce a map of "blocks" and pass into existing system
✅ Deploy Preview for cyf-sdc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-common canceled.
|
✅ Deploy Preview for cyf-launch ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-curriculum canceled.
|
✅ Deploy Preview for cyf-programming ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-piscine ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-tracks ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-itd canceled.
|
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.
Lovely!
Do you have an example of an external issue that's marked up with objectives which pipe through into all the right places, so I can look in the deploy preview?
common-theme/layouts/partials/strings/extract-github-objectives.html
Outdated
Show resolved
Hide resolved
…s.html My formatter keeps doing this and I don't know why Co-authored-by: Daniel Wagner-Hall <[email protected]>
|
I don't see those objectives in https://deploy-preview-1218--cyf-tracks.netlify.app/sap-fico/sprints/1/success/ but I'm expecting to? |
because my regex is APPALLING
Oh lol that is because of course the filter is only on the partial match. I've pushed a change to that one backlog md and it will show up now. |
Daniel wants both
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.
Amazing, thanks!
What does this change?
https://github.com/CodeYourFuture/curriculum/pull/1218/files?file-filters%5B%5D=.html&show-viewed-files=true
I went on a journey, friends.
We wanted to write objectives and show them on a block but not in success, so we said there are two kinds of objectives: objectives and tasks.
Objectives are tracked on success views
Tasks are rendered on blocks but not added to success views
Then we also wanted to assign objectives to readmes. This part was simple! Marking up a task list with the codefence objectives worked already. But it broke the task list on Github, so we wanted a shortcode we could pass in comments.
So I made a shortcode for objectives, and hell why not, one for tasks.
Then that seemed baggy so i extracted a function common to all these versions of objectives
objectives/get-list
. Nowrender-codeblock-objectives
render-codeblock-tasks
shortcodes/objectives
shortcodes/tasks
all just call objectives/get-list, which somersaults and calls objectives/block
When I marked up objectives in readmes and single issues, they showed up formatted as checklists. But we wanted more. So I moved the checklists out of the main body into a details twirldown to match the local blocks. To do this I needed to create some string manipulations, so this led us to
strings/extract-objectives <== only the objectives
strings/remove-objectives <== only not objectives
You may object to the heading extraction I have done here. It is probably stupid.
So we have objectives in our little twirl down block now on issues and readmes, but we wanted more. We wanted to track those objectives on the success view for a sprint.
We'd already done something like this, but now I renovated objectives/parsed and objectives/lookup to objectives/remote and objectives/local and made it work for issues and readmes as well.
But we wanted more. What about objectives marked up in issues assigned on the backlog of a sprint? At first I lazily repro'd issues-list.html, removed the other html, and chucked it in at the end. But what about duplicates? And what about Daniel's desire to dedupe objectives (not starring in this movie, but perhaps coming soon)?
So I needed instead to convert the list of issues to a list of blocks and add it to the slice of blocks already on the page, to be deduped. But to do this I really couldn't face the mega multi range of the rest API, so I tried out the graphql API.
This is much better --- we can get just open issues with the given label, and return just the title and url to a slice of blocks. This works with the caveat that it can only match labels exactly unlike our old Hugo matcher, so some cleanup is needed at some point.
Now our issues are added into all the other blocks and sent into the blocks render system instead. Maybe we can move other things to graphql as we see them.
Common Theme
Issue number: #1190 #950
Org Content?
I edited the energisers and other operational blocks to tasks. Probably more can be done when we see them.
Checklist
Who needs to know about this?