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

Fix last modified date issue #281

Merged
merged 8 commits into from
Dec 20, 2023
Merged

Fix last modified date issue #281

merged 8 commits into from
Dec 20, 2023

Conversation

alflennik
Copy link
Contributor

@alflennik alflennik commented Dec 5, 2023

The example pages include the date that the example last changed, which is sourced from the git history. However in CI builds of the site, the last modified date ends up being the date the build was last done.

The cause seems to be that GitHub Actions uses a shallow clone instead of a full clone with the complete history.

We won't know for sure if this is solution until we merge this PR to main and the offending action runs.

See #255.

Copy link

netlify bot commented Dec 5, 2023

Deploy Preview for aria-practices ready!

Name Link
🔨 Latest commit de939dd
🔍 Latest deploy log https://app.netlify.com/sites/aria-practices/deploys/6578a06a1e702d00089a55c2
😎 Deploy Preview https://deploy-preview-281--aria-practices.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.

@alflennik alflennik changed the title WIP: Fix last modified date issue Fix last modified date issue Dec 5, 2023
@alflennik alflennik requested a review from howard-e December 5, 2023 22:13
@mcking65
Copy link
Contributor

@alflennik This is a partial fix, and it is a good step forward.

However, waht we'd ultimately like is quite a bit more complicated. The last changed date should be the date of last change for any of the HTML, CSS, or JS that are specific to the example. We only want to consider the files specific to the example, not any of the shared CSS or JS.

For example, for the select-only combox example, we would want to show the date of most recent change for any of the following files in the content/patterns/combobox/examples directory:

  • combobox-select-only.html
  • css/select-only.css
  • js/select-only.js

@alflennik
Copy link
Contributor Author

@mcking65 the date now reflects all the CSS and JS files! @howard-e this is ready for review again.

@mcking65
Copy link
Contributor

Fantastic, thank you @alflennik.

Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

@alflennik looks good to me! I tested against an updated version of w3c/aria-practices locally, and I did also see the dates update where expected.

return date;
};

const dependencyFilePaths = html
Copy link
Contributor

Choose a reason for hiding this comment

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

Clever!

@alflennik alflennik merged commit 9fe8e43 into main Dec 20, 2023
7 checks passed
@alflennik alflennik deleted the last-modified-date-issue branch December 20, 2023 18:32
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.

3 participants