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

Feature: objectives and tasks oh my #1218

Merged
merged 21 commits into from
Dec 3, 2024
Merged

Feature: objectives and tasks oh my #1218

merged 21 commits into from
Dec 3, 2024

Conversation

SallyMcGrath
Copy link
Member

@SallyMcGrath SallyMcGrath commented Dec 3, 2024

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. Now
render-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?

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
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
Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-sdc ready!

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-sdc/deploys/674f381b6966d400089b58eb
😎 Deploy Preview https://deploy-preview-1218--cyf-sdc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-common canceled.

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-common/deploys/674f381b5779c500082de1a5

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-launch ready!

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-launch/deploys/674f381bd7af4a00081e4023
😎 Deploy Preview https://deploy-preview-1218--cyf-launch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-curriculum canceled.

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-curriculum/deploys/674f381b401ff600081bd9dc

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-programming ready!

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-programming/deploys/674f381bd004a50008a0aac5
😎 Deploy Preview https://deploy-preview-1218--cyf-programming.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 14 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-piscine ready!

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-piscine/deploys/674f381b7af3670008f17710
😎 Deploy Preview https://deploy-preview-1218--cyf-piscine.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-tracks ready!

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-tracks/deploys/674f381b596836000828b2c3
😎 Deploy Preview https://deploy-preview-1218--cyf-tracks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for cyf-itd canceled.

Name Link
🔨 Latest commit 1317a3f
🔍 Latest deploy log https://app.netlify.com/sites/cyf-itd/deploys/674f381bfc1fb60008fd0025

Copy link
Member

@illicitonion illicitonion left a 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?

…s.html


My formatter keeps doing this and I don't know why

Co-authored-by: Daniel Wagner-Hall <[email protected]>
@SallyMcGrath
Copy link
Member Author

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?

CodeYourFuture/Track-ERP-SAP-FICO#6

@illicitonion
Copy link
Member

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?

CodeYourFuture/Track-ERP-SAP-FICO#6

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
@SallyMcGrath
Copy link
Member Author

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?

CodeYourFuture/Track-ERP-SAP-FICO#6

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?

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
Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thanks!

@SallyMcGrath SallyMcGrath merged commit aa23941 into main Dec 3, 2024
34 checks passed
@SallyMcGrath SallyMcGrath deleted the objectives-and-tasks branch December 3, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants