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

Fetch release note dates from metadata #300

Merged
merged 2 commits into from Jul 14, 2022

Conversation

andrewnicols
Copy link
Member

@andrewnicols andrewnicols commented Jul 11, 2022

As requested in #298.

This issue introduces a new React component:

<ReleaseNoteIntro releaseName="4.0.2" />

This will display the:

  • release date
  • link to the tracker

I've also updated the page description for the meta tag because the import statement and React tags mess with it.

@netlify
Copy link

netlify bot commented Jul 11, 2022

Deploy Preview for moodledevdocs ready!

Name Link
🔨 Latest commit a9678ed
🔍 Latest deploy log https://app.netlify.com/sites/moodledevdocs/deploys/62cd6d36b11bab000935d810
😎 Deploy Preview https://deploy-preview-300--moodledevdocs.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 settings.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 87 🟢 98 🟢 100 🟢 90 🟢 100 Report
/docs/apis/commonfiles 🟠 69 🟢 96 🟢 100 🟢 100 🟢 100 Report
/general/development/gettingstarted 🟢 91 🟢 96 🟢 100 🟢 90 🟢 100 Report
/general/releases 🟠 84 🟢 96 🟢 100 🟢 100 🟢 100 Report

@andrewnicols andrewnicols force-pushed the fetchReleaseNoteDatesFromMetadata branch from 5d7e8ec to 47cacb8 Compare July 11, 2022 16:05
@stronk7
Copy link
Member

stronk7 commented Jul 11, 2022

Couple of comments:

  1. I imagine those return null when a given release is not found means, in practice, print nothing, correct?
  2. Following on the previous point, could make sense (just asking!) to add the Release date: to be released + the link to the list of issues instead of printing nothing?

It looks great, I don't quite understand how those helpers work, but I'm sure you do, super Andrew!

Ciao :-)

@andrewnicols andrewnicols force-pushed the fetchReleaseNoteDatesFromMetadata branch from 47cacb8 to 0e961a7 Compare July 12, 2022 12:42
@andrewnicols andrewnicols force-pushed the fetchReleaseNoteDatesFromMetadata branch from 0e961a7 to a9678ed Compare July 12, 2022 12:46
@andrewnicols
Copy link
Member Author

andrewnicols commented Jul 12, 2022

  1. I imagine those return null when a given release is not found means, in practice, print nothing, correct?

Correct - it's known as conditional rendering. You can read more about it here:
https://reactjs.org/docs/conditional-rendering.html#preventing-component-from-rendering

  1. Following on the previous point, could make sense (just asking!) to add the Release date: to be released + the link to the list of issues instead of printing nothing?

We can do that :)

We already collect information about versions which aren't yet released - it's something we need to add to https://moodledev.io/general/development/process/release - I notice that it's not a current step for the current list of releases. When we add the new doc page for the next release, we should also be adding the versions.json entry.

I've created #302 - which I thought I had already created but hohum. That's to create a script to update the versions.json file and the skeleton for the next version.

It looks great, I don't quite understand how those helpers work, but I'm sure you do, super Andrew!

Copy link
Member

@sarjona sarjona left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, Andrew! It's great to keep adding this king of automatisation to the devdocs!! <3

@sarjona sarjona merged commit afe1832 into moodle:main Jul 14, 2022
@stronk7
Copy link
Member

stronk7 commented Jul 14, 2022

Yay, well done! 🎈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants